statusline

statusline is a command for coding agents from omrikais/cctally. It costs 0 tokens per session (5,717 once invoked), scanned B, original, Apache-2.0.

A command that creates a one-line display of Claude Code session status, including usage and cost information from conversation records.

In plain words
What is it for?
Use it as Claude Code’s statusLine hook to show context usage, session costs, and available five-hour or seven-day limits.
Why use it?
It gives you a quick status view without opening usage reports. Some cost figures are lower-bound estimates rather than exact billing totals.

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/statusline
Clone the repo
git clone --depth 1 https://github.com/omrikais/cctally

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for statusline

README.md
[![agentmods](https://agentmods.dev/badge/commands/omrikais/cctally/statusline.svg)](https://agentmods.dev/commands/omrikais/cctally/statusline)
Your own site
<a href="https://agentmods.dev/commands/omrikais/cctally/statusline"><img src="https://agentmods.dev/badge/commands/omrikais/cctally/statusline.svg" alt="Measured on agentmods" height="20"></a>
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 5,717 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.05717
Opus 5 $0.00000 $0.02858
Sonnet 5 $0.00000 $0.01143
Haiku 4.5 $0.00000 $0.00572

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

Security

Grade B, and why

statusline scanned grade B with 1 finding 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 3d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

This is a **Claude Code `settings.json` key**, not the `cctally statusline --refresh-interval N` flag — those are unrelated. The CLI `--refresh-interval` flag is a **no-op** accepted only for `ccusage` drop-in compatibil
docs/commands/statusline.md · 400 lines

How it starts

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

statusline

One-line status string for Claude Code's statusLine hook.

Cost coverage: cctally-derived Claude session, day, and block costs are transcript-derived lower bounds, not exact /usage billing totals. The --cost-source cc session value is supplied by Claude Code instead.

Canonical form: cctally claude statusline (this flat form remains as an alias).

cctally statusline is a drop-in replacement for ccusage statusline — the ccusage line shape is honored byte-for-byte for the segments cctally emits, plus two intentional improvements over upstream:

  1. Context % is computed, not N/A. ccusage defaults 🧠 N/A; cctally tail-reads the most recent assistant message.usage block in the transcript JSONL and divides into the model's context window.
  2. 5h X% · 7d Y% extension (default-on). Appended after the ccusage-shape segments when stdin carries rate_limits or cctally's snapshot DB has a recent row. Opt out with --no-cctally-extensions.

A third divergence is the stdin contract: ccusage exits 1 on missing transcript_path (and other fields); cctally only exits 1 on malformed JSON or non-object root. Every other field absence degrades gracefully so the hook line never breaks the user's status bar.

Synopsis

cctally statusline [-h]
                   [-B {off,emoji,text,emoji-text}]
                   [--cost-source {auto,cctally,cc,both}]
                   [--cache | --no-cache]
                   [--refresh-interval N]
                   [--context-low-threshold N]
                   [--context-medium-threshold N]
                   [-z TZ]
                   [-O | --no-offline]
                   [--color | --no-color]
                   [--cctally-extensions | --no-cctally-extensions]
                   [--usage-only | --no-usage-only]
                   [--config PATH]
                   [--single-thread]
                   [-d]

Reads the Claude Code hook payload from stdin. Writes the rendered line to stdout. Exits 0 on success.

Read the full file on GitHub · 400 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. 3d ago First seen · 400 lines · 0 tokens per session scan B 175a04d5a29a

Subscribe to this mod's changes

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