Skip to content

Add usage command - #6

Merged
quinnmil merged 6 commits into
mainfrom
5-usage-by-app
Mar 18, 2026
Merged

quinnmil merged 6 commits into
mainfrom
5-usage-by-app

Conversation

@quinnmil

@quinnmil quinnmil commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add scout usage command to show transaction usage across all apps for a given timeframe
  • Support --by-day, --by-app, and --all flags for daily and per-app breakdowns
  • Add animated progress bar (bubbles) during data fetching for better UX on large time ranges
  • Progress bar renders to stderr, auto-hidden for JSON/piped output

🤖 Generated with Claude Code

@quinnmil quinnmil linked an issue Mar 16, 2026 that may be closed by this pull request
@quinnmil quinnmil changed the title Add usage command with progress bar Add usage command Mar 16, 2026
@quinnmil
quinnmil merged commit cb87939 into main Mar 18, 2026
2 checks passed
@quinnmil
quinnmil deleted the 5-usage-by-app branch March 18, 2026 23:28
quinnmil added a commit that referenced this pull request Sep 10, 2026
- renderUsageBar shows one block whenever usage is nonzero. Below 2.5% the
  bar rounded to zero blocks and was indistinguishable from no usage at all.
- Cap table cells at 60 display columns with an ellipsis, so one long URI no
  longer stretches a table past a normal terminal. Structured output is
  uncapped, so scripts still get full values.
- Truncate by grapheme rather than by byte in the span tree, the table and
  the API client's body snippet, so a multibyte character can't be split
  mid-rune. cmd/errors.go's own byte-slicing message cap is now redundant and
  removed.
- Chart titles show a decoded endpoint name and the app's name instead of a
  raw Base64 id and "App #6".
- 'apps show' fills last_reported_at from the list payload, which carries the
  field the single-app payload omits.
- Drop a response body from an API error when it only repeats the HTTP status
  text ("Not Found: Not Found").
- 'scout setup' matches framework names case-insensitively and its error
  points at 'scout setup' with no arguments for the valid list.
- 'metrics get' and 'endpoints metrics' validate --type client-side with the
  valid list, matching 'jobs metrics', instead of round-tripping for a 422.
- Promote github.com/charmbracelet/x/ansi from an indirect to a direct
  dependency; it is already in the build graph via lipgloss and provides the
  ANSI-aware truncation the table needs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BK3fzED9ksTWsvoPfsEwpS
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.

Usage by app

2 participants