Conversation
Co-authored-by: Savannah Jackson <savannah.jackson@tutanota.com>
| Command::new("fission") | ||
| .args(["app", "delegate"]) | ||
| .args(args) | ||
| .args(remote) |
There was a problem hiding this comment.
The remote arg must come after the other args, but before flags for compatibility with the existing CLI.
| pub struct User { | ||
| #[clap(subcommand)] | ||
| command: UserCommands, | ||
| pub command: UserCommands, |
There was a problem hiding this comment.
Needed to make this public for the whoami command alias here
Line 85 in 4f48f7c
Would be open to alternative approaches!
|
Everything looks good to me. Though most of the aliases such as |
Ah yes, thanks for calling that out. Meant to mention it in the PR. My proposal is that we drop support for the |
Description
This PR implements initial CLI functionality by wrapping the existing Haskell CLI binary. Following this PR, we will implement each command natively in Rust. 🦀
This PR implements the the following commands:
fission setupfission user whoami(and afission whoamialias)fission user loginfission app registerfission app infofission app publishfission app delegateIt also implements the following global flags:
--verbose--remote--help(descriptions in attributes per command)We also started to add a
src/utils.rsmodule, but it is not used in the wrapped CLI implementation.Link to issue
Closes #6
Type of change
Please delete options that are not relevant.
Testing
Testing will be a bit manual, going through each command to see that it works. For each command, try some of the args and flags to see they work.
The recommended sequence is:
cargo run setupcargo run user whoamiandcargo run whoamicargo run user login<path-to-binary> app register<path-to-binary> app publish<path-to-binary> app info<path-to-binary> app delegateThe last
appcommands are best tested outside of the project directory, which is why<path-to-binary>is suggested for them. A temp directory with a text file can be created as a simple app to publish.The
app delegatecommand is slightly more involved than the other commands. At minimum, an app name and an audience must be specified. The app that was created and published while testingapp registerandapp publishcan be used for app name. The DID can be any validdid:key. For example:The global
verboseandremotecommands can also be tested. Verbose is a bit easier and can be added along the way. Testing remote is essentially a separate pass through each of the commands.