project

A command-line reporting tool that groups Claude or Codex usage by project. It reports provider-specific costs and tokens over subscription or calendar-week ranges, with optional project and model breakdowns.

In plain words
What is it for?
Use it to review recent usage, sort projects by cost, inspect model-level details, choose date ranges, export machine-readable results, and compare provider totals.
Why use it?
Usage totals can be difficult to interpret when providers use different billing periods and measures. It keeps Claude and Codex figures separate and avoids presenting unsupported percentage values.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/omrikais/cctally/project
Clone the repo
git clone --depth 1 https://github.com/omrikais/cctally
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,874 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03874
Opus 5 $0.00000 $0.01937
Sonnet 5 $0.00000 $0.00775
Haiku 4.5 $0.00000 $0.00387

Measured 2d ago against content hash 811fc7959e91, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/project.md · 286 lines

How it starts

The opening of the file, as written. The whole thing — 286 lines — stays where its author put it; the contents beside it link to each section on GitHub.

project

Roll Claude or Codex usage up by project. Claude has per-project Used % against a subscription-week ceiling; Codex has calendar-week cost and token rollups without a fabricated Used %. In --source all, provider sections stay separate and --weeks resolves one absolute calendar range.

Claude cost coverage: Claude dollar and token totals are transcript-derived lower bounds, not exact /usage billing totals. Codex accounting is unaffected.

Quick examples

# Current Claude subscription week, sorted by cost desc
cctally project

# Last 2 Claude subscription weeks
cctally project --weeks 2

# Drill into one project with per-model breakdown
cctally project --project ccusage --breakdown

# Machine-readable output
cctally project --json

# Fixed Codex route; --weeks means calendar weeks
cctally codex project --weeks 2 --breakdown

# Keep provider rows separate while adding only physical cost/token totals
cctally project --source all --since 2026-07-14 --until 2026-07-20

# Or via the wrapper (after `install.sh`)
cctally-project --weeks 2

Flags

Flag Default Description
--since DATE, --until DATE Inclusive range (YYYY-MM-DD).
--weeks N Last N weeks ending now: Claude subscription weeks, Codex calendar weeks; all resolves one absolute calendar range. Mutually exclusive with --since/--until.
(no range flags) source-native current week Claude subscription week or Codex calendar week; all resolves one absolute calendar range.
--project PATTERN Claude: case-insensitive substring filter on display key. Fixed Codex: exact opaque projectKey or exact collision-safe display label. Repeatable (OR).
--model PATTERN Same but for model names. Repeatable.
--breakdown off Parent project row + one child row per model used.
--order asc|desc desc
--sort cost|used|name|last-seen cost Ties break on display key ascending. used is Claude-only and is rejected by the fixed Codex route and --source all.
--group git-root|full-path git-root full-path skips the walker and buckets by realpath(project_path) (symlink-aliased spellings collapse into one row; the displayed label is whichever spelling was seen first).
--tz TZ config Display timezone for this call (local, utc, or IANA, e.g. America/New_York). Overrides config display.tz. See Display timezone for the full contract (parsing scope, JSON UTC invariant).
--json off Emit structured JSON.
--no-color off Disable ANSI color.
--source {claude,codex,all} claude Analytics provider. The default and explicit claude preserve the established Claude report. all renders Claude then Codex as separate sections.
--speed {auto,standard,fast} auto Codex pricing tier for the Codex or all-source leg. A non-auto value is rejected for Claude-only requests.

Read the full file on GitHub · 286 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 286 lines · 0 tokens per session scan A 811fc7959e91

Subscribe to this mod's changes

project is a command published in the GitHub repository omrikais/cctally (5 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,874 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.