Skip to content

[chore] cobra/cmd UX sweep: Example fields, restore help, version Go runtime info, flag capitalisation #173

@lugassawan

Description

@lugassawan

Type

  • Documentation (README, docs/, command help text)

Files to change

  • cmd/*.go (cosmetic changes to cobra command definitions)
  • cmd/version.go
  • cmd/restore.go

Description

A collection of small UX improvements to cobra command definitions — all cosmetic, no behaviour change. Grouping avoids four separate one-line PRs.

E1 — Example: field missing from all commands
No cmd/*.go file sets a cobra.Command.Example field. Running rimba help <cmd> omits the "Examples:" section entirely. Add 1–2 concise examples per command (e.g., rimba open auth, rimba sync --push).

E2 — restore Long description incomplete
cmd/restore.go:19 has a Long description but it does not mention the requirement that the branch must have been previously archived with rimba archive, nor does it document what happens if the branch no longer exists.

E8 — Flag-help capitalization inconsistent
Some flag Usage strings start with a capital letter, others are lowercase. Pick one convention (lowercase, matching Go stdlib flag style) and apply it consistently across cmd/.

G1 — rimba version does not print Go runtime version
cmd/version.go prints rimba <ver>, os, and arch but does not include the Go toolchain version (runtime.Version()). This is standard in Go CLI tools and useful when filing bug reports.

Acceptance

  • Every cmd/*.go file has a non-empty Example: field on its cobra command.
  • rimba restore --help describes the archive prerequisite and the missing-branch case.
  • All flag Usage strings in cmd/ follow a single capitalisation convention.
  • rimba version output includes a go: line (e.g., go: go1.24.0).
  • golangci-lint passes; no test regression.

Bundles

Original candidates folded into this issue:

  • E1: Example: field absent from all cobra commands in cmd/.
  • E2 (cmd/restore.go:19): Long description missing archive-prerequisite and missing-branch documentation.
  • E8 (cmd/): flag Usage string capitalisation inconsistency.
  • G1 (cmd/version.go:22–26): runtime.Version() not printed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions