From a usage counter to cost per client

ccusage is a free, open-source command line tool that reads the local logs of Claude Code, Codex and other coding agents and shows tokens and estimated cost per day, month or session. For your own usage it is hard to beat. You need a ccusage alternative once that usage belongs to clients: which project it was for, what it cost you in euros, and how it ends up on an invoice next to your working time. That is what Time Momentum does. Facts about ccusage as of 11 Oct 2026, from its repository and documentation.

As of 11 Oct 2026

What ccusage does well

  • Free and MIT-licensed, run with npx ccusage@latest without installing or signing up.
  • Local only: per its documentation it reads your usage logs without uploading your data.
  • 18 sources, among them Claude Code, Codex, OpenCode, Gemini CLI and GitHub Copilot CLI.
  • Reports per day, week, month and session, with cache tokens counted separately and costs estimated in USD from model prices; --offline works without a network.
  • Claude Code extras: --instances groups usage by project folder, statusline puts usage into Claude Code's status line, --json feeds your own scripts.
  • Widely used: around 290,000 npm downloads in the week to 10 Oct 2026.

When Time Momentum is the better ccusage alternative

Time Momentum is built for freelancers and agencies who do client work with AI agents.

  • Cost per client: every session is assigned to a project via its folder or repository, and projects belong to clients.
  • Euros instead of estimates in dollars: each session is valued at its model's list price when it started and converted at that day's ECB rate. On a Claude or ChatGPT plan, the monthly fee is split across projects by token share instead.
  • The whole effort: active agent runtime, tokens and commits next to your own working time from parallel timers.
  • Through to the invoice (Pro): pass AI costs on to clients, issue e-invoices, track payments and see the margin per project.
  • Several tools in one place: Claude Code, Codex and Cursor in the same projects, captured automatically by hooks, offline-proof.

ccusage vs. Time Momentum

FeatureccusageTime Momentum
PriceFree, open sourceFree plan, billing in Pro
Works without an account–
AI coding tools18 agent CLIsClaude Code, Codex, Cursor
Cost per sessionEstimate in USDIn euros, at list price
Cost per client projectpartlyBy folder, Claude CodePer project and client
Working time–Parallel timers
Invoices and e‑invoices–In Pro
Past sessionsAll local logspartlyClaude Code, Codex

As of: 11 Oct 2026

Stay with ccusage if

  • you want to know what you use, not what a client owes you,
  • your data must not leave your machine at all,
  • you use agent CLIs Time Momentum does not capture, such as Gemini CLI, OpenCode or Copilot CLI.

Using both

ccusage only reads log files, Time Momentum adds hooks. They do not get in each other's way, so you can keep ccusage for a quick look in the terminal and use Time Momentum for clients and invoices.

Prompts, responses and code never leave your machine. Time Momentum receives the model, tokens, runtime, working folder, repository and a session title, and you can switch off titles and folders or exclude single folders.

Switching from ccusage

There is no import from ccusage. Time Momentum reads the same local Claude Code and Codex logs instead.

  1. Create an account

  2. Run the install command

    On macOS or Linux. It installs the tm command line, asks for an API key from the app, detects Claude Code, Codex and Cursor and adds its hooks next to your existing ones.

    curl -fsSL https://app.time-momentum.com/install.sh | sh
  3. Past sessions come along

    Claude Code and Codex sessions still in your local logs are imported right away. Claude Code keeps them for 30 days by default.

  4. Assign folders to projects

    Once per folder or repository; later sessions follow automatically.

What Time Momentum captures per session: the full effort of a project.

Frequently asked questions

What is ccusage?

An open-source command line tool that reads the local logs of Claude Code, Codex and other coding agents and reports tokens and estimated cost per day, week, month and session.

Is ccusage free?

Yes. It is MIT-licensed and runs with npx ccusage@latest, without an account.

Does ccusage work with Codex?

Yes. Codex is one of its 18 sources, next to Claude Code. Time Momentum also captures Codex, including subagents and active runtime.

How do I see Claude Code cost per project?

ccusage groups Claude Code usage by project folder with --instances. Time Momentum assigns each session to a project and client and values it in euros, next to your working time.

Can I import my ccusage data into Time Momentum?

No. On setup, Time Momentum reads past Claude Code and Codex sessions from the same local logs ccusage uses, as far back as the tools keep them.

Does Time Momentum upload my prompts or code?

No. It receives the model, tokens, runtime, working folder, repository and a session title. Prompts, responses and code stay on your machine.

See what your agents cost per client

30 days of Pro, no credit card.

  • 30 days of Pro
  • No credit card
  • Then continue on Free