Skip to content

feat(cli): harden CLI ergonomics for agent use#8

Open
jbohnevail wants to merge 2 commits into
mainfrom
feat/cli-agent-ergonomics
Open

feat(cli): harden CLI ergonomics for agent use#8
jbohnevail wants to merge 2 commits into
mainfrom
feat/cli-agent-ergonomics

Conversation

@jbohnevail

Copy link
Copy Markdown
Collaborator

Summary

Agent-friendliness hardening for the FreeClimb CLI, addressing four findings from a CLI-for-agents audit:

  • Pure-JSON dry-run when piped — the decorative DRY RUN - No API call will be made banner is now gated on isTTY(), so --dry-run output is parseable JSON in pipelines/agents.
  • Accurate --json help — removed the false "auto-enabled when stdout is not a TTY" claim from all command flag descriptions (behavior never did this).
  • Safer destructive commandsapplications:delete, incoming-numbers:delete, recordings:delete, and conference-participants:remove now accept --yes/-y and prompt for confirmation in an interactive terminal. Non-interactive/agent runs proceed unchanged (no hang, backward compatible).
  • Actionable arg errors — missing-argument errors now append a copy-pasteable example invocation, handled centrally in bin/run.
  • Idempotency docs — added a "Retries & Idempotency" section to AGENTS.md (incl. that the CLI auto-retries 429/5xx/network up to 3x for all methods, so POST retries can duplicate).

Test plan

  • tsc -b clean
  • ESLint on changed files: 0 new errors (only pre-existing warnings)
  • Test suite: 658 passing
  • Pre-existing failures verified unrelated (login keyring + missing generation/ dir) by reproducing on a clean stashed baseline
  • Manual: piped --dry-run is pure JSON; missing-args prints an Example; describe/--help reflect new descriptions
  • Verify interactive TTY delete confirmation in a real terminal

Notes

  • Command files are marked auto-generated from a generation/ directory that is not present in this working tree, so edits were applied to the generated .ts files directly. If the generator is restored, port these into its templates.

- Gate the dry-run banner on TTY so piped `--dry-run` output is pure JSON
- Correct inaccurate `--json` flag descriptions across all commands
- Add `--yes` flag + interactive confirmation prompt to destructive
  delete/remove commands (prompts only in a TTY; non-interactive runs
  proceed unchanged)
- Enrich missing-argument errors with a copy-pasteable example invocation
- Document retry/idempotency caveats in AGENTS.md
Remove the stale freeclimb-cli fork workflow note ("never PR against
FreeClimbAPI; push to work fork") and document the freeclimb-plugin
origin/PR workflow.
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