Skip to content

Commands

Every command below is a surface onto the same plugin registry and the same SQLite store. The Status column is the task id in plan.md that delivers it — done means it works today, anything else prints not implemented and exits 0.

CommandDoesStatus
rtok pluginslist plugins: id, enabled, surfacesdone
rtok config show|init|validate|get|set|pathone config file; show --sources says where each value came fromP12
rtok hook <event>Claude Code hook entry point (stdin JSON → stdout JSON)T2.1
rtok mcpMCP server over stdio: read, search, tree, expand, mem_*, graph toolsT4.1
rtok proxyANTHROPIC_BASE_URL / OPENAI_BASE_URL hop: usage capture, optional compress modeT5.1, P11
rtok run -- <cmd>run a command, archive the raw output, print the filtered versionT3.1
rtok expand <id>print an archived payloadT3.5
rtok statsmeasurements from session logs and the proxyT1.2
rtok doctorinspect hooks, MCP servers, proxy chainT1.4
rtok setup claudeinstall hooks / MCP / proxy into Claude Code, with backupsT2.3
rtok benchA/B two host configurations on fixed tasksT9.1

Every flag is a config key

There is no flag that cannot be made permanent. rtok proxy --port 8791 and [proxy] port = 8791 are the same setting reached two ways, and rtok config show --sources reports which layer won. See Configuration for the precedence chain.

Shortening and getting it back

rtok run -- <cmd> executes the command, archives the raw output, and prints a filtered version with an id attached. rtok expand <id> prints the original payload back. That pair is the whole lossless contract — nothing rtok shortens is unrecoverable.

Measurement

rtok stats reads the measurements table. Rows come from plugins calling Ctx::record with a Measurement, and from the proxy capturing real usage from API responses. rtok stats --calibrate refits the characters-per-token estimator against those real counts.

rtok bench runs two host configurations over the fixed task set in bench/tasks.toml and compares them.