---
title: "Time and token tracking for Claude Code"
description: "Track Claude Code per project: time, lines written and the four token counts with their cost, in the terminal, the desktop app, IDEs and cloud sessions."
url: https://inlinr.com/integrations/claude-code
lang: en
---

[Integrations](https://inlinr.com/integrations)

# Time and token tracking for Claude Code

The inlinr plugin for Claude Code reads the transcripts Claude Code already keeps on your machine and turns them into time, lines written and token cost per project. One install covers the terminal, the desktop app and the IDE extensions.

[Start free](https://inlinr.com/signin) [Get it on GitHub](https://github.com/inlinrhq/inlinr-claude-code)

acme-api · feat/async-cookies Claude Code

Session today · claude-opus-5

- **Time**: 1h 42m
- **Lines**: +412 −58
- **Cost at API prices**: $6.10
- **Cache read**: 3.7M
- **Uncached input**: 412k
- **Cache write**: 91k
- **Output**: 80k

## Set it up

1. In a terminal, add the marketplace and install the plugin for every project on the machine:  
Terminal  
```
claude plugin marketplace add inlinrhq/inlinr-claude-code
claude plugin install inlinr@inlinr --scope user
```
2. In any Claude Code session, run this, then open the link and approve in your browser:  
Claude Code  
```
/inlinr:activate
```

## What gets recorded

- Time spent in each session, per project and branch
- Files edited and lines added or removed by the assistant
- Input, output, cache-creation and cache-read tokens, and the model
- An estimated cost at API prices, per project and per week

## Good to know

- Never your prompts, the assistant's replies or file contents.
- Tracking starts when you activate; past transcripts are not uploaded.
- One connection per machine: with the inlinr extension already signed in on it, there is nothing to activate, and activating here signs the extension in too. /inlinr:deactivate can pause Claude Code alone.

Never file contents, prompts or replies. [The full list of what is sent](https://inlinr.com/security)

[Tracking Claude Code, Codex and Gemini CLI, from terminal to cloud](https://inlinr.com/guides/track-claude-code)

## Questions about Claude Code

### Does it work in cloud sessions?

Yes. Paste one line from Settings → Editors into the cloud environment's Setup script, once: every session there is tracked, in every repository. A session that is not connected yet says so and connects in place.

### Is the work of subagents counted?

Yes. Subagents keep transcripts of their own, and the plugin reads them too, so what a subagent wrote lands on the same project as the session that started it.

### How is the cost worked out?

Each of the four token counts at its own API price for the model: uncached input, cache writes, cache reads and output. On a Pro or Max subscription you do not pay per token; the figure is what the same work would cost through the API.

### Does it read Codex and Gemini CLI too?

Yes. The same plugin reads the Codex and Gemini CLI sessions on the machine, with nothing more to install.

## Read also

- [Integration Time and token tracking for Codex Track OpenAI Codex, CLI or desktop app, per project: time, the lines its patches changed and its tokens, read on your machine. Open](https://inlinr.com/integrations/codex)
- [AI usage Reading a token bill: four prices, and the cache that is most of it Four counts, four prices, and a cache that re-reads the whole conversation every turn. How to read them without being off several times over. 7 min read](https://inlinr.com/guides/ai-token-costs)
- [Tool Claude token cost calculator What a Claude Code session costs at API prices, from its input, output and cache token counts. Open](https://inlinr.com/tools/ai-cost-calculator)

## Start tracking Claude Code

Free for solo use. Sign in with GitHub or by email, install, and your first session shows up on the dashboard.

[Start free](https://inlinr.com/signin) 

[Install in VS Code](https://inlinr.com/integrations/vscode)

No card to start · no source code leaves your machine

Not ready to sign in? [Try the demo dashboard](https://inlinr.com/demo)
