Get started

Tracee CLI

Every Tracee action from your terminal, scripts, CI and coding agents.

tracee does everything Tracee's MCP server and REST API do: posts, media and AI generation, clips, the brand, memory, the social inbox, Radar, the CRM, connected apps and workflows. It's built for people, scripts and AI coding agents (Claude Code, Codex, Cursor) alike.

Install

npm install -g https://traceeai.com/cli/tracee-cli.tgz

Node.js 18.17 or newer. The CLI is one file with no dependencies, served by Tracee itself. Run the install again to update; tracee --version shows the version you have.

Sign in

tracee login                  # opens your browser; press Allow
tracee login --no-browser     # over SSH: open the link anywhere and paste the code
tracee login --key "$KEY"     # a personal or workspace key from Settings (--paste hides it)
tracee whoami                 # who you act as, and in which workspace
tracee logout                 # forget the key and turn off the browser login's key

The key is saved to ~/.config/tracee/config.json (or under $XDG_CONFIG_HOME), readable only by you. See Authentication for which key to use where.

How commands work

tracee <group> <command> [arguments] [--flags]
  • Arguments are the ids in the endpoint's path, in order: tracee inbox reply <thread_id> --text "Thanks!".
  • Flags are the API's field names with - for _: --min-strength, --alt-text, --thread-ids.
  • Booleans: --close for true, --no-close for false.
  • Lists: repeat the flag or use commas: --thread-ids a,b --thread-ids c.
  • JSON fields (--fields, --trigger, --steps, --args…) take JSON text or @file.json.
  • --data <json|@file|-> sends a whole JSON body instead of flags; flags you also pass win.
  • --wait <seconds> on long jobs.

tracee --help lists the groups, tracee <group> --help its commands, and tracee <group> <command> --help every flag with its type, allowed values and the endpoint it calls.

Options for every command

OptionEffect
--jsonPrint the API's JSON instead of text.
--workspace <id>Act in this workspace for one command (personal keys).
--key <key>Use this key instead of the saved one. Also TRACEE_API_KEY.
--base-url <url>Another Tracee address. Also TRACEE_BASE_URL.
-h, --helpHelp for the group or command.

Scripting

--json prints exactly what the API returns, so jq works on it:

# The strongest buying signals of the week, as "person: gist"
tracee radar signals --min-strength 3 --days 7 --json | jq -r '.[] | "\(.person): \(.gist)"'

# Draft a reply for every conversation that needs one
for id in $(tracee inbox list --view needs_reply --json | jq -r '.threads[].id'); do
  tracee inbox draft "$id" --instruction "Thank them and offer a demo"
done

Exit codes: 0 done, 1 Tracee refused or failed, 2 the command was mistyped (nothing was sent). See Errors.

For anything without a command of its own, tracee api <METHOD> <path> calls any endpoint: tracee api GET /radar/signals --query min_strength=3.

With AI coding agents

Claude Code, Codex and Cursor can drive the CLI in a terminal: give them a workspace or personal key and tell them to run tracee --help. Every command's help names its endpoint, flags and allowed values, and --json gives them structured answers. To connect them as MCP clients instead, see MCP.

Commands