Local-first proxy for LLM spend visibility and control.
Project description
TokLog
htopfor your LLM spend — proxy-only.
TokLog is a local-first HTTP proxy for LLM spend visibility and control.
Route OpenAI-, Anthropic-, and Gemini-compatible traffic through a local proxy. TokLog logs usage locally, attributes cost by model/provider/program/tag, and turns raw traffic into actionable waste reports.
No hosted backend. No account. No prompt egress by default.
Install
pip install toklog
tl proxy setup
tl proxy start --background
After setup, clients that support base URL overrides can route through TokLog with no app-specific SDK integration.
What it does
- Proxy-based capture — intercepts LLM traffic at the HTTP layer
- Cross-language — works with Python, TypeScript, Go, curl, and anything else that can point at a base URL
- Cross-provider — OpenAI, Anthropic, Gemini
- Local logs — normalized JSONL logs under
~/.toklog/logs/ - Spend reports — model, provider, endpoint, program, and tag breakdowns
- Waste detection — highlights expensive patterns worth fixing first
- Shareable output — terminal and exported reports
Core commands
tl proxy setup
tl proxy start --background
tl proxy status
tl proxy stop
tl report
tl gain
tl share --open
tl doctor
License
TBFUL-1.0 — free for non-commercial and small-scale use. Commercial license required above $10k annual LLM spend.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toklog-0.2.0.tar.gz.
File metadata
- Download URL: toklog-0.2.0.tar.gz
- Upload date:
- Size: 129.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ddc0d4e055847bafc81217cd8ba7a0fdf06a2616b7e9b3b428422d5120a986c
|
|
| MD5 |
c9ba656664047fedf4534d610a84c7b0
|
|
| BLAKE2b-256 |
19bab177e98cca3af033bf7b141d8160293ef8a3a3cf445794958e9b96767348
|
File details
Details for the file toklog-0.2.0-py3-none-any.whl.
File metadata
- Download URL: toklog-0.2.0-py3-none-any.whl
- Upload date:
- Size: 148.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af112ceeeb39c2e722c82e539d77bcd97a161c984add9b1a2ea84d8d0f88345f
|
|
| MD5 |
c4e038e2a89d8e575bea60d65ca0c845
|
|
| BLAKE2b-256 |
fac9d61998580d2583dc76d05a2569f50b5909879b36743ea8a677cbc1f8dc1f
|