Anthropic Usage — {date} ({time} CET)
══════════════════════════════════════════
Total: {total} calls ({errors} errors)
⚠️ CLI: {cli_pct}% / API: {api_pct}%
{agent_name}:
🗄️ {cache_pct}% cache ({cache_read} read / {cache_create} create)
Tokens: {total_in} in ({new_in} new) / {total_out} out
Cost: ~${cost}
──────────────────────────────────────────
CLI potential:
⚠️ {n}× inline work (>{threshold} out, {sum} tok, max {max})
{n}× standard ({low}-{threshold} out)
{n}× heartbeat (<{low} out)
──────────────────────────────────────────
Total estimate: ~${total_cost}
API: X (Y ok, Z err) | CLI: X (Y ok, Z err) ONLY when errors > 0Icons appear ONLY on these lines, ALWAYS at line start:
⚠️ or ✅ — CLI/API ratio🗄️ — Cache rate⚠️ or ✅ — Inline work countNO icons on: header, totals, tokens, cost, heartbeat count, standard count, separator lines.
Default language is English. To localize, edit LANG dict in scripts/format_report.py:
LANG = {
"total": "Total",
"calls": "calls",
"errors": "errors",
"cache": "cache",
"tokens": "Tokens",
"cost": "Cost",
"total_est": "Total estimate",
"cli_potential": "CLI potential",
"inline_work": "inline work",
"standard": "standard",
"heartbeat": "heartbeat",
"no_calls": "No API calls today.",
"no_inline": "No inline work",
}
Presets available in scripts/:
lang_cs.py — Czech / ČeštinaReference implementation: scripts/format_report.py
To apply to an existing installation:
python3 scripts/patch_format.py /path/to/anthropic-report.py
共 1 个版本