ThinkingRoot Docs
CLI Reference

serve & compile

Run the engine daemon and turn directories into claims.

root serve

Starts the REST API + MCP server — the daemon the Console and AI tools talk to.

root serve --port 31760 --host 127.0.0.1
FlagDefaultPurpose
--port <PORT>31760Port to bind (Cortex Protocol canonical port)
--host <HOST>127.0.0.1Host to bind
--api-key <KEY>Enable bearer auth (compared in constant time)
--path <PATH>Mount a workspace by path (repeatable)
--name <NAME>Mount a single workspace by registry name
--branch <BRANCH>Serve a specific branch instead of main
--mcp-stdiooffRun as an MCP stdio server (no HTTP)
--no-rest / --no-mcpoffDisable one of the two surfaces
--install-serviceoffInstall an OS service file (launchd/systemd/Windows)

This is what the cloud runs

Each cloud project runs root serve in its own container with a unique --api-key that the gateway injects. Self-hosting is the same command — see Cloud vs Self-host.

root compile

Compiles a directory through the knowledge pipeline into claims.

root compile ./docs           # compile a directory
root ./docs                   # shorthand for the above
root compile ./docs --watch   # recompile on changes
FlagDefaultPurpose
--branch <NAME>mainCompile into a specific branch
--watchoffStay running and recompile on file changes
--debounce <MS>200Debounce window for --watch
--no-incrementaloffForce a full pipeline (ignore incremental cutoffs)
--jsonoffEmit the run summary as one line of JSON (pipe to jq)
--cloudoffOffload compilation to ThinkingRoot Cloud (requires root login)

Asking and searching

root ask "what depends on the billing service?"   # grounded, cited answer
root query "rate limiting"                          # raw retrieval
root status                                         # current branch + workspace
root health                                         # knowledge health score