Commit graph

29 commits

Author SHA1 Message Date
Trevin Chow
3f7470d29b feat(plan): subscription plan tracking with usage progress bar
Adds `codeburn plan set <id>` to configure a subscription plan (Claude Pro,
Claude Max, Cursor Pro, or custom). When set, the Overview panel renders
an API-equivalent progress bar against subscription price with a
projected month-end cost.

Closes the loudest demand signal on the repo: issue #11 ("Subscription
vs API Use") from two independent voices, plus the routing-decision use
case raised in #12.

- src/config.ts: extends CodeburnConfig with Plan, adds readPlan/savePlan/clearPlan
- src/plans.ts: presets (claude-pro $20, claude-max $200, cursor-pro $20)
- src/plan-usage.ts: getPlanUsage, resetDay-aware period math (1-28),
  median-of-7-day-trailing projection
- src/cli.ts: `codeburn plan [show|set|reset]` subcommand, plan wired
  into JSON outputs for report/today/month/status (only when active)
- src/dashboard.tsx: Plan row in Overview, color-coded (green under 80%,
  orange near, red over), with days-until-reset
- README.md: Plans section with honest framing (API-equivalent vs
  subscription price, not token allowance)
- tests/plan-usage.test.ts, tests/plans.test.ts, tests/cli-plan.test.ts:
  period math, presets, CLI round-trip

Resets respect resetDay across month boundaries. Uses median daily spend
(not mean) so one huge day doesn't distort the month-end projection.

Fixes #11
2026-04-21 04:20:50 -07:00
iamtoruk
361b9a7f76 docs: add star history chart to README 2026-04-21 04:20:43 -07:00
iamtoruk
9e7916d24d docs: credit CodexBar as inspiration 2026-04-21 04:20:42 -07:00
iamtoruk
fec5868379 chore: update readme badges and menubar screenshot
Remove bundlephobia and monthly downloads badges, update menubar
screenshot to 0.8.0.
2026-04-21 04:20:38 -07:00
iamtoruk
6e4db43c41 Release 0.8.0: model comparison, auto-refresh, menubar fix
Add compare command docs to README, update changelog for 0.8.0,
bump version. TUI auto-refresh default 30s, menubar refresh 15s.
2026-04-19 08:58:45 -07:00
AgentSeal
82df214958
docs: cover --from/--to, avgCostPerSession, and semgrep guard (#99)
Some checks are pending
CI / semgrep (push) Waiting to run
README gains a --from/--to example in the Usage block, a dedicated
'Date range filtering' subsection, and a note that JSON projects[]
now includes avgCostPerSession.

CHANGELOG opens an Unreleased section crediting @lfl1337 for PRs #78
and #80. Flags the projects.csv column-order shift (Avg/Session now
between Cost and Share) so consumers parsing by position read by
header instead.

Co-authored-by: AgentSeal <hello@agentseal.org>
2026-04-18 15:45:45 -07:00
AgentSeal
a031c8d32d
chore: point repo URLs at getagentseal org (#97)
Add package.json repository/bugs/homepage fields. Swap hardcoded
AgentSeal/codeburn URLs to getagentseal/codeburn across README,
mac README, macOS menubar star banner, and the menubar installer's
release-API endpoint. 301 redirects keep old URLs working, but
canonical links now point at the current org.

Co-authored-by: AgentSeal <hello@agentseal.org>
2026-04-18 14:55:44 -07:00
AgentSeal
2b15256189 docs: actually update README to the renamed screenshot path
The prior rename commit moved the PNG but forgot to stage the matching
README edit, leaving the live image tag pointing at a path that no
longer existed. This fixes it.
2026-04-17 17:43:09 -07:00
AgentSeal
feda92124d docs: bust CDN cache on menubar screenshot
Appends ?v=0.7.2 to the image URL so GitHub's Camo proxy re-fetches
the new 0.7.2 screenshot instead of serving its stale copy of the
SwiftBar-era one.
2026-04-17 17:29:16 -07:00
Resham Joshi
495a254338 feat(mac): native Swift menubar app + one-command install
Introduces mac/ with a native SwiftUI menubar app that replaces the
previous SwiftBar plugin entirely. Install via `npx codeburn menubar`,
which downloads the .app from GitHub Releases, strips Gatekeeper
quarantine, and drops it into ~/Applications.

Highlights

- mac/ SwiftUI app: agent tabs, Today/7/30/Month/All period switcher,
  Trend/Forecast/Pulse/Stats/Plan insights, activity + model
  breakdowns, optimize findings, CSV/JSON export, Star-on-GitHub
  banner, live 60s refresh, instant currency switching with offline FX
  cache.
- Security: CodeburnCLI argv-based spawn (no shell interpretation),
  SafeFile symlink guards + O_NOFOLLOW writes, FX rate clamping to
  [0.0001, 1_000_000], keychain filtered to account == "default",
  removed byte-window credential log, in-flight refresh guard, POSIX
  flock on config.json writes, TerminalLauncher validates argv before
  AppleScript interpolation.
- Performance: shared static NumberFormatter (thousands of allocations
  per popover redraw eliminated), concurrent pipe drain with 20 MB cap
  + 60s timeout in DataClient, Observation-tracked reactive UI, 5-min
  payload cache keyed on (period, provider).
- CLI: new `codeburn menubar` subcommand that downloads + installs +
  launches the .app (no clone, no build). New `status --format
  menubar-json` payload builder. `export` rewritten to produce a
  folder of one-table-per-file CSVs with a `.codeburn-export` marker
  so arbitrary -o paths cannot be silently deleted.
- Removed: src/menubar.ts (SwiftBar plugin generator),
  install-menubar / uninstall-menubar subcommands, `status --format
  menubar` directive output, tests/menubar.test.ts,
  tests/security/menubar-injection.test.ts.
- Release: .github/workflows/release-menubar.yml builds universal
  binary, assembles .app, ad-hoc signs, zips, uploads on mac-v* tag
  push. Runs on the free macos-latest runner.

Tests

- 230 TypeScript tests pass
- 10 Swift CapacityEstimator tests pass
- TypeScript typecheck clean
- Swift release build clean
2026-04-17 16:55:56 -07:00
AgentSeal
69268a9e91 docs: remove .claudeignore references from README 2026-04-17 05:24:16 -07:00
AgentSeal
40b7de6841 docs: add optimize section with screenshot and command reference
Sits between 'Reading the dashboard' (what the numbers mean) and
'How it reads data' (where the data comes from) so the feature lands
as the natural next step: here is how to act on the patterns you saw.
2026-04-16 16:27:33 -07:00
Travis Haley
67c504a60a feat: add --project and --exclude filters for project-level filtering
Adds two new repeatable flags to all commands (report, today, month, status, export):
- --project <name>: include only projects matching name (substring, case-insensitive)
- --exclude <name>: exclude projects matching name (substring, case-insensitive)

Both flags can be specified multiple times to match multiple projects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 15:54:37 -06:00
Travis Haley
09139b1d92 feat: add --format json to report, today, and month commands
Outputs full dashboard data as structured JSON to stdout, including:
overview, daily breakdown, projects, models with token counts,
activities with one-shot rates, core tools, MCP servers, and
shell commands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 12:21:51 -06:00
AgentSeal
6258d01b2f chore: release 0.6.0 -- Copilot provider, All Time, avg/s, Top Sessions
Release notes cover the two merged PRs:

- #44: GitHub Copilot provider parsing ~/.copilot/session-state/ with
  model tracking via session.model_change events. Adds fallback pricing
  for six gpt/o3/o4 models. Copilot logs only output tokens, so cost
  rows sit below actual API cost; documented in README and CHANGELOG.
- #51: All Time period (key 5, -p all), avg/s column in By Project,
  and a new Top Sessions panel showing the five most expensive sessions
  across all projects.

README: provider list updated (Copilot added, output-tokens-only caveat
alongside Cursor's Auto-mode estimation note), usage examples include
`-p all` and key `5`, provider filter list includes `copilot`.

CHANGELOG: 0.6.0 entry lists both features with contributor credits,
plus two fixes (longest-key-first model display sort and empty
firstTimestamp placeholder).

114 tests pass. Build succeeds at 132KB.
2026-04-16 10:18:14 -07:00
AgentSeal
22b096a841 docs: add reading-the-dashboard guide to README
Lists common signals in the dashboard (cache hit, retry rate,
model mix, tool patterns) and what each typically means.
Points readers toward interpreting their own data without
overpromising automatic diagnosis.
2026-04-16 02:15:19 -07:00
AgentSeal
5e095bf86e chore: polish Pi provider integration
- Add Pi entry to PROVIDER_COLORS (pink) and PROVIDER_DISPLAY_NAMES.
- Update README with Pi in supported providers, requirements,
  command examples, and the data-format section.
2026-04-16 02:11:48 -07:00
AgentSeal
e7e8273bb4 docs: add OpenCode to README 2026-04-15 14:28:49 -07:00
AgentSeal
0d1a51ed3c docs: add Cursor to README, repo description, and topics
- Cursor listed as supported provider with data location and caveats
- Auto mode pricing estimation explained
- Languages panel and cache behavior documented
- Project structure updated with new files
- Repo description and topics updated on GitHub
2026-04-15 05:46:25 -07:00
AgentSeal
d9e391be11 docs: update screenshot, add total downloads and install size badges, document --refresh flag 2026-04-15 01:40:48 -07:00
AgentSeal
fb18a79779 docs: update README for Codex support, provider system, currency command 2026-04-14 08:52:26 -07:00
BlairWelsh
d322d9b837 docs: mention menubar currency picker in README 2026-04-14 13:51:12 +01:00
BlairWelsh
d248f0d6df docs: add Currency section to README 2026-04-14 13:51:11 +01:00
AgentSeal
b2b405aabb fix: require Node 20+ (string-width uses /v regex flag) 2026-04-14 01:57:15 -07:00
AgentSeal
a25e5c22b4 fix: use raw.githubusercontent for dashboard image (jsDelivr cache stale) 2026-04-14 01:25:03 -07:00
AgentSeal
d20281514c feat: one-shot success rate per activity category
Detects edit/test/fix retry cycles (Edit -> Bash -> Edit) within each
turn. Shows 1-shot percentage in the By Activity panel for categories
that involve code edits. Updated screenshot and README.

Fixes #4
2026-04-14 01:14:34 -07:00
AgentSeal
ec074e75cf fix: use jsDelivr CDN for readme images
npm blocks raw.githubusercontent.com URLs. Switched to cdn.jsdelivr.net
which npm allows, same approach as ccusage.
2026-04-13 15:20:05 -07:00
AgentSeal
08d8c7528d fix: use absolute URLs for npm readme images
npm cannot resolve relative image paths. Switched to raw.githubusercontent
URLs so logo, dashboard screenshot, and menubar screenshot render on npmjs.com.
2026-04-13 15:18:11 -07:00
AgentSeal
00afed6930 v0.1.0 - initial release
Interactive TUI dashboard for Claude Code token observability.
13-category task classifier, per-project/model/tool breakdowns,
gradient bar charts, SwiftBar menu bar widget, CSV/JSON export.
2026-04-13 15:10:27 -07:00