Why this is a good first issue
The CLI supports inspecting server history and restoring an older value, but history --help and rollback --help provide no worked examples. The distinction matters: rollback creates a new local version and needs a subsequent push to sync it.
This is a small Rust/clap help-text contribution in crates/cli/src/main.rs, similar in size to the completed share/run help tasks (#149 and #175).
What to do
Add after_help examples to the History and Rollback command variants:
# history help
sotto history DATABASE_URL
sotto history DATABASE_URL --reveal
# rollback help
sotto history DATABASE_URL
sotto rollback DATABASE_URL 2
sotto push
Explain briefly that:
- History and rollback use the server and require login and an unlocked local store.
- History normally shows version numbers and sizes;
--reveal prints plaintext values.
2 is illustrative: choose an available version from history and pass its numeric version, without the displayed v prefix.
- Rollback restores that value as a new local version; it does not erase history.
sotto push synchronises the restored value.
Check wording against the history and rollback functions and crates/cli/src/remote/sync.rs. The comments describing a login requirement apply to running the command, not requesting help.
Done when
cargo run -p sotto-cli -- history --help and cargo run -p sotto-cli -- rollback --help show readable examples and exit successfully without login or project setup.
- Paste both rendered help outputs in the PR.
- Run
cargo fmt --all --check and cargo test -p sotto-cli.
Scope
Help text only. Keep argument parsing, version selection, reveal behaviour, remote sync and other subcommands unchanged. No real credentials or destructive example execution are needed. This does not duplicate the README export/setup issues.
Use British English and plain hyphens. Link this issue in the PR and sign off commits with git commit -s, following CONTRIBUTING.md.
Why this is a good first issue
The CLI supports inspecting server history and restoring an older value, but
history --helpandrollback --helpprovide no worked examples. The distinction matters: rollback creates a new local version and needs a subsequent push to sync it.This is a small Rust/clap help-text contribution in crates/cli/src/main.rs, similar in size to the completed share/run help tasks (#149 and #175).
What to do
Add
after_helpexamples to theHistoryandRollbackcommand variants:Explain briefly that:
--revealprints plaintext values.2is illustrative: choose an available version from history and pass its numeric version, without the displayedvprefix.sotto pushsynchronises the restored value.Check wording against the
historyandrollbackfunctions andcrates/cli/src/remote/sync.rs. The comments describing a login requirement apply to running the command, not requesting help.Done when
cargo run -p sotto-cli -- history --helpandcargo run -p sotto-cli -- rollback --helpshow readable examples and exit successfully without login or project setup.cargo fmt --all --checkandcargo test -p sotto-cli.Scope
Help text only. Keep argument parsing, version selection, reveal behaviour, remote sync and other subcommands unchanged. No real credentials or destructive example execution are needed. This does not duplicate the README export/setup issues.
Use British English and plain hyphens. Link this issue in the PR and sign off commits with
git commit -s, followingCONTRIBUTING.md.