Skip to content

Improve CLI UX: help text, empty results, update notification#1

Merged
jhuiting merged 1 commit into
mainfrom
fix/cli-ux-help-empty-results-update-notification
Mar 12, 2026
Merged

Improve CLI UX: help text, empty results, update notification#1
jhuiting merged 1 commit into
mainfrom
fix/cli-ux-help-empty-results-update-notification

Conversation

@jhuiting
Copy link
Copy Markdown
Owner

Summary

  • Better --after/--before help: Flag descriptions now include concrete format examples (e.g. 2024-01-01, 7d, 24h, 1700000000). Timestamp examples moved to cobra's Example field for prominent display in --help.
  • Friendly empty list output: Empty list responses now show No results. on stderr instead of raw JSON. In --raw mode, the JSON passes through unchanged for piping.
  • Throttle update notification: The "new version available" banner now shows at most once per 24 hours, tracked via NotifiedAt in the update cache file.

Test plan

  • cb customers list --help shows improved flag descriptions and examples section
  • cb customers list --email nonexistent@example.com shows "No results."
  • cb customers list --email nonexistent@example.com --raw outputs {"list":[]} JSON
  • Run any command twice — update notification only appears on first run
  • make verify and make test pass

🤖 Generated with Claude Code

- Add concrete format examples to --after/--before flag descriptions
  and move timestamp examples to cobra Example field for better visibility
- Show "No results." on stderr for empty list responses (interactive only);
  raw mode passes through the JSON unchanged for piping
- Throttle update notification to once per 24h by tracking NotifiedAt in
  the update cache

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jhuiting jhuiting merged commit b8555bd into main Mar 12, 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.

2 participants