{"repo":"d-date/retok","free":true,"listed":false,"github":"https://github.com/d-date/retok","clone":"git clone https://github.com/d-date/retok.git","description":"Token-efficiency analyzer for AI coding agents (Claude Code, OpenAI Codex CLI): cost estimates, cache analysis, and savings advice. Zero dependencies.","language":"Python","stars":33,"topics":["ai-agents","anthropic","claude","claude-code","cli","codex","cost-analysis","i18n","openai","python"],"license":"MIT","category":"ai-agents","readme_excerpt":"retok(return-of-token) English 日本語 A CLI tool that analyzes your AI coding agent usage logs — Claude Code and OpenAI Codex CLI — to measure token efficiency , estimate cost, and print actionable recommendations. Runs on Python 3 with the standard library only — no dependencies. Installation Requires Python 3.7+. No dependencies. To run it from anywhere, symlink it into your PATH (the symlink is resolved, so translations in locales/ keep working): Alternatively, grab just the script — everything works, but the report falls back to English because locales/ is not present: Usage By default it scans Claude Code transcripts in /.claude/projects (plus $CLAUDE CONFIG DIR/projects when that environment variable is set) and Codex CLI rollouts in /.codex/sessions . If you keep transcripts elsewhere (multiple profiles, custom config dirs), pass every root with --dirs / --codex-dirs . Usage records are deduplicated globally, so overlapping roots are never double-counted. What it measures Metric Meaning --- --- Estimated cost USD estimate based on published per-model pricing (table below) Cache hit rate cache read / (input + cache read + cache write) — higher is cheaper Cost per prompt Cost consumed per human instruction Subagent share Consumption by subagents (Task/Explore; /subagents/agent- .jsonl ) maxCtx Peak context size within a session — the bigger, the more each request costs Recommendation rules - Cache TTL expiry — a large cache write (majority of the context) right after a gap ","default_branch":null,"files":null,"tree":[],"storefront":"/r/d-date","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/d-date/retok/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}