Video launch
https://www.youtube.com/shorts/uZCAqzqLfi4
AI API cost observability — one import, full transparency.
Tirith is a local CLI + transparent proxy that logs every AI API call with cost, tokens, latency, and custom tags. Add one import line to your app — nothing else changes.
Quickstart (30 seconds)
Install the binary, then pick the column that matches your stack:
shell · terminal
brew install joedaviesio/homebrew-tap/tirith
| Anthropic · Proxy | Anthropic · Python SDK | Anthropic · TypeScript SDK | OpenAI · Python SDK |
|---|---|---|---|
|
shell · export ANTHROPIC_BASE_URL=\
http://localhost:5555/proxy/anthropicshell · curl $ANTHROPIC_BASE_URL/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -d '{...}' |
shell · pip install tirith-sdk anthropic python · import tirith import anthropic |
shell · npm install tirith-sdk @anthropic-ai/sdk typescript · import "tirith-sdk"; import Anthropic from "@anthropic-ai/sdk"; |
shell · pip install tirith-sdk openai python · import tirith from openai import OpenAI |
Once your code is wired up, start the proxy and run your app:
shell · terminal
tirith start # proxy on :5555, dashboard on :5556Then view your spend:
shell · terminal
tirith report
open http://localhost:5556 # dashboardIntegration Paths
Pick whichever fits your workflow — all three do the same thing:
| Path | How | When to use |
|---|---|---|
| SDK wrapper | import tirith (Python) / import "tirith-sdk" (TS) |
Recommended — zero config, auto-patches clients at import |
| CLI wrapper | tirith run -- python app.py |
Ad-hoc runs without touching code |
| Manual env var | export ANTHROPIC_BASE_URL=http://localhost:5555/proxy/anthropic |
Anything that reads *_BASE_URL |
Supported Providers
| Provider | Proxy | Python SDK | TypeScript SDK |
|---|---|---|---|
| Anthropic | ✅ | ✅ | ✅ |
| OpenAI | 🚧 planned | ✅ (patches client) | 🚧 planned |
| 🚧 planned | 🚧 planned | 🚧 planned |
Tagging Calls
Attribute spend to features, users, or environments via headers:
X-Tirith-Tag # feature tag (e.g., "grant-scanner")
X-Tirith-User # user attribution
X-Tirith-Session # session grouping
X-Tirith-Environment # production, staging, dev
Privacy
- Prompts and responses are never logged — metadata only.
- API keys pass through the proxy; Tirith never stores them.
- All data stays local in
~/.tirith/data.db(SQLite).
Configuration
- Proxy port:
5555(configurable viatirith start --port) - Dashboard port:
5556 - Config file:
~/.tirith/config.yaml - Data file:
~/.tirith/data.db
Contributing
See CONTRIBUTING.md for build instructions and PR guidelines. Security issues: see SECURITY.md.
License
MIT — see LICENSE.

























