CLI Reference
Overview
The root CLI — drive a ThinkingRoot engine from your terminal.
root is the open-source command-line interface to the engine. It runs a local
engine, compiles workspaces, asks grounded questions, and manages Root
Functions, secrets, and Compiled Prompts. The cloud runs the very same engine,
so what you learn locally transfers directly.
Common commands
| Command | Does |
|---|---|
root init | Initialise a new workspace |
root compile <path> | Compile a directory into claims (root <path> is shorthand) |
root ask "<question>" | Ask a grounded, cited question |
root query "<text>" | Raw retrieval against the graph |
root serve | Start the REST API + MCP server (the daemon) |
root watch | Recompile incrementally on file changes |
root branch / merge / diff / status | Branch operations |
root function / secrets / prompt | Manage functions, secrets, prompts |
root mcp | Manage external MCP servers |
The CLI is large — it also covers health, doctor, packs (pack/publish/
install/mount), cloud sync (login/push/pull/jobs), and more. Run
root --help or root <command> --help for the authoritative, version-matched
list.
Configuration
root keeps state under ~/.config/thinkingroot/:
| File | Holds |
|---|---|
secrets.toml | Local secrets (mode 0600), read by Root Functions as ctx.env |
auth.json | Cloud API token (root login) |
registry.toml | Registry configuration |
Useful environment variables include RUST_LOG (logging), THINKINGROOT_API_TOKEN
(cloud bearer), and TR_OUTBOUND_ALLOWLIST (egress — see
Egress).