# Show HN: Decant – Understand how you spend tokens

> Source: <https://github.com/dosu-ai/decant>
> Published: 2026-08-12 21:56:21+00:00

Decant turns the Claude Code and Codex session logs on your machine into tangible insights. See where tokens, cost, and agent time go, inspect context usage, find the files and tools agents touch, and search complete transcripts from a CLI or local web UI.

Decant is local-first. It makes no outbound network calls at runtime, and your transcripts never leave your machine.

Built by
[Dosu](https://dosu.dev?utm_source=decant&utm_medium=github&utm_campaign=attribution&utm_content=readme),
Knowledge Infrastructure for Agents. Dosu helps make agents faster, cheaper,
and more effective.

Run Decant with `npx`

with no Bun install or global package required.

```
npx @dosu/decant@latest
```

This starts the local UI at [http://127.0.0.1:3000](http://127.0.0.1:3000), indexes the Claude Code and
Codex logs on your machine, and watches for changes.

- One SQLite archive for Claude Code and Codex sessions.
- Full-text search across messages, tool calls, and transcripts.
- Token,
[estimated cost](/dosu-ai/decant/blob/main/docs/pricing.md), context, activity, tool, MCP, and file analytics. - Browsable sessions, projects, files, and ingest diagnostics.
- Markdown, JSON, report, and trajectory exports.
- Deterministic scripts, replays, and agent instructions distilled from command history.

Published binaries support macOS and Linux on x64 and arm64. Native Windows binaries are not currently available.

Install a persistent command with npm:

```
npm install --global @dosu/decant@latest
decant
```

Or use Homebrew:

```
brew install dosu-ai/dosu/decant
decant
```

Or install the latest release without Node.js or Bun:

```
curl -fsSL https://raw.githubusercontent.com/dosu-ai/decant/main/install.sh | sh
decant
```

See [Distribution](/dosu-ai/decant/blob/main/docs/distribution.md) for installer options, Docker, source
builds, and release verification.

```
docker run --rm \
  -p 127.0.0.1:3000:3000 \
  -v decant-data:/var/lib/decant \
  -v "$HOME/.claude/projects:/sources/claude:ro" \
  -v "$HOME/.codex:/sources/codex:ro" \
  ghcr.io/dosu-ai/decant:latest
```

Keep the `127.0.0.1:`

prefix. Publishing `-p 3000:3000`

exposes the
unauthenticated archive API on every host interface. Custom container networks
may need the trusted-peer setting documented under
[Docker distribution](/dosu-ai/decant/blob/main/docs/distribution.md#docker).

```
decant                         # start the local web UI
decant sync                    # index new and changed sessions
decant ls                      # list sessions
decant show 1                  # render a transcript
decant search "auth bug"       # full-text search
decant stats --by model        # usage and cost rollups
decant economics               # token, cost, and time breakdowns
decant files --group ext       # file hotspots
decant tool stats              # tool usage
decant mcp stats               # MCP server usage
decant export 1 > session.md   # export a session
```

Run `decant --help`

or `decant <command> --help`

for all commands and flags.
Read commands support `--json`

; global flags include `--db`

, `--format`

,
`--quiet`

, `--no-color`

, and `--no-sync`

.

To index selected files or a temporary source tree:

```
decant --db /tmp/decant.db sync --path ./session.jsonl --path ./sessions
```

The OpenAPI 3.1 contract is [docs/api/openapi.yaml](/dosu-ai/decant/blob/main/docs/api/openapi.yaml), and
a running server exposes it at
[http://127.0.0.1:3000/api/openapi.json](http://127.0.0.1:3000/api/openapi.json). See [API recipes](/dosu-ai/decant/blob/main/docs/api/recipes.md)
for examples.

[Analytics methodology](/dosu-ai/decant/blob/main/docs/analytics-methodology.md)[Pricing estimates](/dosu-ai/decant/blob/main/docs/pricing.md)[Archive and data lifecycle](/dosu-ai/decant/blob/main/docs/data-lifecycle.md)[Local Serve API](/dosu-ai/decant/blob/main/docs/api/routes.md)[Distribution and release verification](/dosu-ai/decant/blob/main/docs/distribution.md)[Architecture](/dosu-ai/decant/blob/main/docs/architecture.md)

Contributions are welcome. Read [CONTRIBUTING.md](/dosu-ai/decant/blob/main/CONTRIBUTING.md) for setup,
tests, and privacy requirements. Coding agents should also read
[AGENTS.md](/dosu-ai/decant/blob/main/AGENTS.md).

Use synthetic session data in issues and tests. Real transcripts can contain source code, prompts, credentials, and local paths.

Report vulnerabilities privately as described in [SECURITY.md](/dosu-ai/decant/blob/main/SECURITY.md).

Decant is built and maintained by
[Dosu](https://dosu.dev?utm_source=decant&utm_medium=github&utm_campaign=attribution&utm_content=about),
Knowledge Infrastructure for Agents. Dosu helps make agents faster, cheaper,
and more effective. Decant shows what your agents spent, read, and touched via
your agent logs.

Decant was inspired in part by
[Letta's Trajectory](https://github.com/letta-ai/trajectory), which normalizes
agent transcripts across runtimes into a shared record format.

Decant is licensed under the [Apache License 2.0](/dosu-ai/decant/blob/main/LICENSE).
