ThinkingRoot Docs
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

CommandDoes
root initInitialise 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 serveStart the REST API + MCP server (the daemon)
root watchRecompile incrementally on file changes
root branch / merge / diff / statusBranch operations
root function / secrets / promptManage functions, secrets, prompts
root mcpManage 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/:

FileHolds
secrets.tomlLocal secrets (mode 0600), read by Root Functions as ctx.env
auth.jsonCloud API token (root login)
registry.tomlRegistry configuration

Useful environment variables include RUST_LOG (logging), THINKINGROOT_API_TOKEN (cloud bearer), and TR_OUTBOUND_ALLOWLIST (egress — see Egress).

Next