Skip to content

Improve CLI help text and examples#352

Merged
folbricht merged 1 commit into
masterfrom
cli-help-improvements
Jun 10, 2026
Merged

Improve CLI help text and examples#352
folbricht merged 1 commit into
masterfrom
cli-help-improvements

Conversation

@folbricht

Copy link
Copy Markdown
Owner

Review of the help screens of all commands in cmd/desync/, fixing inaccuracies and improving descriptions, flag texts, and examples.

Incorrect help text fixed

  • prune usage line said prune <index> [<file>..] — the extra arguments are indexes, not files. The description now also mentions that the operation is destructive and that a confirmation prompt is shown unless --yes is given.
  • mount-index claimed a <name>.state file is always written on termination. WriteState() is a no-op unless --cor-state-save is set, so the text now reflects that (and that it also triggers on SIGHUP). Also reworded "reload without needing to restart the server" — mount-index isn't a server.
  • chop had the typo "index(s)".

Missing documentation added

  • The root desync --help had no long description and the store location syntax wasn't documented anywhere in the CLI, even though nearly every command takes -s. It now lists all supported forms (local path, http(s)://, s3+http(s)://, gs://, sftp://, ssh://), multi-store ordering, and the | failover-group syntax.
  • manpage and chunk long descriptions; chunk now explains it's a dry-run useful for tuning chunking parameters before make.

Clarity/consistency

  • extract's 17-line single-paragraph description restructured into paragraphs (basic use, -k, seeds, invalid-seed handling); its two seed flag descriptions no longer start with a capital letter unlike all other flags.
  • cache description implied -c was optional, but the command errors without it.
  • Misleading flag texts: verify -s/prune -s said "target store" (now "local store to verify"/"store to prune"), --listen is repeatable, cat -l 0 reads to the end, chunk -S is in bytes. --ignore/--ignore-chunks wording unified between cache and chop.
  • New examples for documented but un-exampled modes: cat with offset/length, make writing the index to STDOUT with custom chunk sizes, verify -r, writable and HTTPS chunk-server, writable index-server, multi-index prune.

No behavior changes, only help/usage strings.

- Add a Long description to the root command documenting all supported
  store location formats and the '|' failover-group syntax
- Fix prune usage line: extra args are indexes, not files; document the
  confirmation prompt and --yes
- Fix mount-index help: a state file is only written when
  --cor-state-save is given; SIGHUP reload doesn't 'restart the server'
- Restructure the extract description into paragraphs
- Clarify misleading flag descriptions (verify/prune 'target store',
  repeatable --listen, cat --length 0, chunk --start in bytes) and make
  --ignore/--ignore-chunks wording consistent between cache and chop
- Add examples: cat with offset/length, make with custom chunk sizes to
  STDOUT, verify -r, writable/HTTPS chunk-server, writable index-server,
  multi-index prune
- Add missing Long texts for manpage and chunk
@folbricht folbricht marked this pull request as ready for review June 10, 2026 15:16
@folbricht folbricht merged commit c95093f into master Jun 10, 2026
3 checks passed
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.

1 participant