Get started
CLI usage
The CLI reads logs from stdin or a file and writes pruned context to stdout or a file. It is model-agnostic: pipe the result into any agent.
Examples
# Pipe from stdin cat deploy.log | roka prune --query "connection errors" --budget 8000 # Point at a file roka --input app.log --query "what broke during last night's deploy" --budget 12000 # Write output to a file roka --input big.log --query "OOM" --budget 5000 --output pruned.txt # Pro: API key for semantic ranking roka --input logs.txt --query "auth failures" --budget 8000 --api-key rk_live_...
Common flags
| Flag | Default | Description |
|---|---|---|
| -q, --query | summarize | What to focus on — plain English or keywords |
| -b, --budget | 8000 | Token budget for the output |
| -i, --input | stdin | Input file path |
| -o, --output | stdout | Output file path |
| -a, --api-key | — | API key (Pro). Semantic re-rank path. |
Exact flags can vary by release. Always check roka --help on the binary you installed.
What you get
- Collapse — adjacent duplicate / near-duplicate lines merge with counts so heartbeats and retries stop dominating.
- Rank / force-keep — lines matching ERROR, FATAL, CRITICAL, Exception, Traceback, panic survive; other lines score by rarity / anomaly.
- Fit — pack into your character/token budget.
Deterministic by default. Semantic re-ranking is Pro/optional. Local prune does not upload log contents.
Free CLI quota on the hosted side is 15K tokens lifetime per device. The local binary still runs offline for pruning. See pricing.