cctally 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +7 -0
- package/bin/cctally +5833 -248
- package/bin/cctally-npm-postinstall.js +26 -0
- package/bin/cctally-update +5 -0
- package/dashboard/static/assets/index-D04GnY3n.css +1 -0
- package/dashboard/static/assets/index-Y2WlBP34.js +18 -0
- package/dashboard/static/dashboard.html +2 -2
- package/package.json +15 -2
- package/dashboard/static/assets/index-BIql6NB3.js +0 -12
- package/dashboard/static/assets/index-ee87BMyX.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [1.5.0] - 2026-05-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `cctally update` subcommand for self-updating npm and Homebrew installs, with auto-suggest banner in CLI and amber update badge in the dashboard, plus `--check`, `--skip`, `--remind-later`, `--version` (npm only), `--json`, `--dry-run` flags. Source/dev installs fall through to a manual-recipe message. Dashboard modal streams live subprocess output and survives subprocess `execvp` restart via SSE auto-reconnect.
|
|
12
|
+
- `update.check.enabled` and `update.check.ttl_hours` config keys for opting out of automatic version checks or extending the 24-hour default TTL up to 30 days.
|
|
13
|
+
- `cctally setup` auto-detects hooks from prior install patterns under `~/.claude/hooks/` (`record-usage-stop.py`, `usage-poller-{start,stop}.py`, `usage-poller.py`) and offers to migrate them: unwires the matching `settings.json` entries, moves the `.py` files to a timestamped `~/.claude/cctally-legacy-hook-backup-<UTC ts>/` directory (reversible — files moved, not deleted), and best-effort stops any currently-running background daemon those hooks spawned. Before sending SIGTERM, the migration verifies the PID at `/tmp/claude-usage-poller.pid` is actually the legacy `usage-poller.py` process (via `ps -p <pid> -o command=`) so a stale sentinel pointing at a recycled PID is treated as `stale-pid` rather than risking a kill against an unrelated user process. The backup directory is resolved before the settings write so a directory-creation failure (unwriteable parent, name collision, disk full) exits 1 with `~/.claude/settings.json` byte-identical, never leaving a half-applied state. New flags `--migrate-legacy-hooks` / `--no-migrate-legacy-hooks` for non-interactive control (install-mode only; rejected with exit 2 against `--status` / `--uninstall`). `setup --status` reports the migration state in both text and JSON (`legacy.bespoke_hooks`); `setup --dry-run --migrate-legacy-hooks` previews without touching disk and warns when `~/.claude/settings.json` is malformed.
|
|
14
|
+
- `npm install -g cctally` now prints a one-time hint pointing to `cctally setup` after install, mirroring what brew already shows via `Formula#caveats`. The postinstall hook (`bin/cctally-npm-postinstall.js`) is gated on `npm_config_global=true` so per-project node_modules pulls stay silent, never auto-executes `cctally setup` (which is interactive and writes outside the package surface), and honors `CCTALLY_NPM_POSTINSTALL_QUIET=1` as an escape hatch for CI / fixtures.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- `release` Phase 6 now refuses (exit 2) to write a brew formula whose URL pins a *lower* SemVer than the on-disk `Formula/cctally.rb` — the monotonic-version gate that closes the regression class behind issue #30, where the brew tap silently rolled back from v1.3.0 to v1.0.0 twice in one day. The gate compares with SemVer-aware ordering (stable > prerelease at the same MAJOR.MINOR.PATCH per §11.4) so prerelease promotions still flow through. New `--allow-formula-downgrade` flag overrides the gate for genuine yank/revert cases and prints a loud stderr warning when invoked.
|
|
18
|
+
|
|
19
|
+
## [1.4.0] - 2026-05-09
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Shareable reports — all 8 reporting subcommands (`report`, `daily`, `monthly`, `weekly`, `forecast`, `project`, `five-hour-blocks`, `session`) now accept `--format md|html|svg` to emit shareable artifacts to a filename like `cctally-<cmd>-<utcdate>.<ext>`. Flags: `--theme light|dark`, `--no-branding`, `--reveal-projects` (project labels are anonymized to `project-N` by default), `--output <path>` / `--output -` for stdout, `--copy` (markdown only), `--open` (html/svg only). `session --format` also accepts `--top-n N` to cap the chart's project breakdown. See `docs/commands/share.md` and the per-command "Shareable output" sections.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Dashboard 5-hour row now shows the post-reset delta (`⚡ Δ +Xpp this block`) when a 5h block spans a weekly reset, instead of suppressing the number behind a `⚡ reset` line. The cross-reset flag now detects natural weekly boundaries from `weekly_usage_snapshots.week_start_at` in addition to Anthropic-shifted mid-week resets, and all interval comparisons normalize through `unixepoch()` so the flag flips correctly on non-UTC hosts (the prior lex-compare silently failed for `+03:00` and other non-zero offsets, leaving the panel showing a misleading `Δ −94pp this block`).
|
|
26
|
+
- `record-usage`: self-heal `percent_milestones` and `five_hour_blocks` rows that were silently dropped when an earlier invocation was killed between snapshot insert and milestone insert (e.g. Claude Code self-update kill window). On a dedup'd tick, re-runs the idempotent milestone helpers against the latest snapshot — recovering missed rows at the next status-line tick instead of waiting for the percent to advance.
|
|
27
|
+
- Root `.gitignore` now anchors `/node_modules` and `/package-lock.json`, preventing `npm install` next to the repo-root `package.json` (the npm-publish sentinel) from leaving the working tree dirty and blocking `cctally release`. `dashboard/web/node_modules` and the tracked `dashboard/web/package-lock.json` are unaffected by the anchored entries.
|
|
28
|
+
|
|
8
29
|
## [1.3.0] - 2026-05-08
|
|
9
30
|
|
|
10
31
|
### Changed
|
package/README.md
CHANGED
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
<strong>Track Claude Code subscription usage as a weekly $-per-1% trend. Local web dashboard, terminal UI, forecasts, and threshold alerts.</strong>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/cctally"><img src="https://img.shields.io/npm/v/cctally.svg" alt="npm version"></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/cctally"><img src="https://img.shields.io/npm/dm/cctally.svg" alt="npm downloads"></a>
|
|
15
|
+
<a href="https://github.com/omrikais/cctally/blob/main/LICENSE"><img src="https://img.shields.io/github/license/omrikais/cctally.svg" alt="Apache-2.0 license"></a>
|
|
16
|
+
<a href="https://github.com/omrikais/cctally/stargazers"><img src="https://img.shields.io/github/stars/omrikais/cctally.svg" alt="GitHub stars"></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
12
19
|
If you're using `ccusage` to watch Claude Code spend, `cctally` covers the same ground and adds the parts you reach for next: a live web dashboard, a forecast that tells you whether you're going to cap this week, threshold alerts when you cross a percent, and a persistent week-over-week trend of cost per percent of quota. All local, no account, no telemetry.
|
|
13
20
|
|
|
14
21
|
<p align="center">
|