Roka Roka Docs

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

FlagDefaultDescription
-q, --querysummarizeWhat to focus on — plain English or keywords
-b, --budget8000Token budget for the output
-i, --inputstdinInput file path
-o, --outputstdoutOutput file path
-a, --api-keyAPI key (Pro). Semantic re-rank path.

Exact flags can vary by release. Always check roka --help on the binary you installed.

What you get

  1. Collapse — adjacent duplicate / near-duplicate lines merge with counts so heartbeats and retries stop dominating.
  2. Rank / force-keep — lines matching ERROR, FATAL, CRITICAL, Exception, Traceback, panic survive; other lines score by rarity / anomaly.
  3. 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.