ThinkingRoot Docs
CLI Reference

functions, secrets & prompts

Manage Root Functions, secrets, and Compiled Prompts from the terminal.

These three command groups mirror the Console's Configure tabs. The function and prompt groups talk to a running engine over REST (so they accept --url and --api-key); secrets writes the local secrets file directly.

root function

Manage Root Functions. Defaults: --workspace main, --url http://127.0.0.1:31760.

# Deploy a function from a JS file
root function deploy fetch_thing --code ./fetch_thing.js

# Invoke with a JSON input
root function invoke fetch_thing --input '{"id":42}'

# List deployed functions
root function list
ActionKey args
deploy <name>--code <path> (JS body), --workspace, --url, --api-key
invoke <name>--input <json> (default {}), --workspace, --url, --api-key
list--workspace, --url, --api-key

root secrets

Manage local secrets in ~/.config/thinkingroot/secrets.toml (mode 0600). Read by Root Functions as ctx.env.

root secrets set OPENAI_API_KEY        # prompts on stdin (keeps it out of shell history)
root secrets set OPENAI_API_KEY sk-…   # or inline
root secrets list                       # names only — never values
root secrets unset OPENAI_API_KEY

Same names, two homes

A secret named X set here is env.X in a local Root Function. In the cloud, the vault provides the same env.X — so your function code doesn't change between local and hosted.

root prompt

Manage Compiled Prompts over the engine REST API.

root prompt edit support-reply    # opens $EDITOR, PUTs the new version back
root prompt list                  # templates with their latest version
root prompt version support-reply # version history + variables
ActionKey args
edit <name>--file <path> (or $EDITOR), --workspace, --url, --api-key
list--workspace, --url, --api-key
version <name>--workspace, --url, --api-key