Skip to content

fix(cli): clean up CLI output, inline help, and error formatting - #389

Merged
sweepies merged 1 commit into
mainfrom
fix/cli-output
Nov 23, 2026
Merged

sweepies merged 1 commit into
mainfrom
fix/cli-output

Conversation

@sweepies

@sweepies sweepies commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Overhauls CLI output, parse/error formatting, spinner/stderr noise, and help copy across patchula-cli:

  • Voice: Keeps "the Count" only in summary headlines (reports, apply, TUI summaries). Operational messages (spinner, errors, prompts, --help, TUI chrome) are plain and direct.
  • No extra --help step: Bare patchula prints root help directly (arg_required_else_help); parse errors print error: plus the failing command's short help inline (without For more information, try '--help'.), and emit JSON on stdout when --json is set.
  • Error formatting: Non-Pkl errors render as plain error: / hint: lines matching flag parse errors; miette source-snippet boxes remain for Pkl config/settings errors.
  • Quieter stderr: Shows only the spinner on normal local and patchula remote runs; prints cache status only when cold, partly cold, or with -v; suppresses stderr chatter under --json and interactive tui (including never prompting for missing config under --json).
  • patchula apply streams & flags: Writes normal/--check summaries to stdout and --dry-run summaries to stderr so stdout stays a clean diff; validates --manager as an enum; hides --allow-lockfile-pending; fixes misplaced --copier hints.
  • Help, TUI & server polish: Plain root --help tagline, root-only exit codes/subcommand hint, exact flag/env names in serve errors, unified TUI Blocked state for key bar/messages, <name> in <file> on all skipped-update reasons, and updated snapshots/docs.

Verification

  • cargo test --locked -p patchula-cli (97 unit tests + 17 integration tests)
  • mise run lint (cargo-fmt, clippy, secrets, zizmor, nu-lint)
  • mise run help:snapshot, mise run docs:cli, mise run docs:build

View guided diff Turn on auto-fix

@sweepies
sweepies merged commit 6aef388 into main Nov 23, 2026
13 checks passed
@sweepies
sweepies deleted the fix/cli-output branch November 23, 2026 10:56
@sweepies-ops sweepies-ops Bot mentioned this pull request Nov 23, 2026
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