Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commands cookbook to cargo-shuttle --help #985

Merged
merged 4 commits into from
Jun 19, 2023
Merged

Add commands cookbook to cargo-shuttle --help #985

merged 4 commits into from
Jun 19, 2023

Conversation

beyarkay
Copy link
Contributor

@beyarkay beyarkay commented Jun 8, 2023

This commit adds a couple of example cookbook style commands to the --help subcommand of cargo-shuttle.

Description of change

It took some time for me to realise the difference between deploy and deployments, or to discover that I could watch my logs in real time via logs --follow. My hope is that this extended help assists newcomers in figuring out what cargo-shuttle can do.

As a side note, I understand that this adds a bit of bloat to the help command, and maybe this sort of information is better off somewhere in the docs or in the descriptions for each of the subcommands, so feel free to close this PR if it does not fit in with the overall goals of where information should be.

This commit adds a couple of example `cookbook` style commands to the
`--help` subcommand of `cargo-shuttle`. It took some time for me to
realise the difference between `deploy` and `deployments`, or to
discover that I could watch my logs in real time via `logs --follow`. My
hope is that this extended help assists newcomers in figuring out what
cargo-shuttle can do.
Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @beyarkay, thanks for this! To me this feels a little bit redundant, but then again I am very familiar with the CLI 😄 We do have a page for the CLI in our docs, perhaps we should rather just add a link to that?

@jonaro00
Copy link
Member

jonaro00 commented Jun 8, 2023

I agree that having cookbook examples in the help command is too much, but such a list of common ways to use commands are a good addition to the docs page. The link to the docs page can be included here.

@beyarkay
Copy link
Contributor Author

beyarkay commented Jun 9, 2023

Ahh okay yeah this seems best. I'll ammend the PR to include a link to the docs page, and add a cookbook section to the docs.

@jonaro00
Copy link
Member

@beyarkay The comment you have now does not appear in the help output. The general description at the top of help page is taken from cargo-shuttle/Cargo.toml.

@beyarkay
Copy link
Contributor Author

beyarkay commented Jun 14, 2023

Ahh this was a sneaky line to find.

#[derive(Parser)]
#[command(
    version,
-    about,
    // Cargo passes in the subcommand name to the invoked executable. Use a
    // hidden, optional positional argument to deal with it.
    arg(clap::Arg::new("dummy")
        .value_parser([PossibleValue::new("shuttle")])
        .required(false)
        .hide(true))
)]
pub struct Args {
    #[command(flatten)]
pub project_args: ProjectArgs,

Copy link
Member

@jonaro00 jonaro00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

Copy link
Contributor

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks 👍

@oddgrd oddgrd merged commit 1b47611 into shuttle-hq:main Jun 19, 2023
AlphaKeks pushed a commit to AlphaKeks/shuttle that referenced this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants