Skip to main content

CLI

@erdoai/cli wraps the same /v1 API the MCP server exposes, so anything an AI assistant can do over MCP you can do (and script) from a shell.

Install

Requires Node.js 18 or later.
npm install -g @erdoai/cli   # then run `erdo`
Or run it without installing:
npx @erdoai/cli --help
Verify and sign in:
erdo --version
erdo login                 # browser sign-in (multi-account, like gh)
erdo whoami

Update

erdo update                # checks npm and installs the latest if newer
Equivalent to npm install -g @erdoai/cli@latest.

Auth & orgs

Accounts are stored at ~/.config/erdo/config.json, one active at a time.
erdo login                      # browser OAuth; mints + stores a token
erdo login --key erdo_api_...   # headless/CI: paste an API key instead
erdo auth status                # list accounts (* = active)
erdo auth switch [email]        # switch active account (auto-toggles with two)
erdo logout [email]

erdo org list                   # your orgs (* = active)
erdo org use [id|slug]          # set the active org (resources are org-scoped)
erdo --org acme <command>       # one-off override for a single command
Env overrides for CI: ERDO_API_KEY, ERDO_ORG, ERDO_API_URL, ERDO_ACCOUNT.

Agents

Running an agent is sending it a message; the artifact-builder produces pages this way.
erdo agent ask "what was revenue last week?" --datasets sales
erdo agent thread --name "landing build"        # -> thread id
erdo agent send <thread> "Build a landing page for ACME ..." --agent erdo.artifact-builder
erdo agent threads
Long operations (building a landing page can take minutes) — add --async so the CLI kicks off the run and polls for the result instead of holding one long request open (which can hit the edge timeout):
erdo agent ask "Build and publish a landing page for ACME with a lead form ..." --async

Pages & artifacts

erdo pages deploy --title "ACME" --html @page.html --js @page.js --public
erdo pages update <artifact-id> --js @page.js
erdo pages update <artifact-id> --title "ACME v2" --html @page.html --css @page.css --public
erdo pages validate --html @page.html
erdo pages list --type html_page
erdo pages get <artifact-id>
--html/--js/--css accept @path to read a file. update edits an existing page in place (the URL and id stay the same) and merges the fields you pass, so you only send what’s changing. It takes the same content flags as deploy--title, --html, --js, --css (plus the --datasets / --writable-datasets / --kv / --writable-kv grants below) — but all are optional: pass just --js to swap the script while keeping the existing HTML, CSS, and title. --public / --private change visibility. (Runtime is fixed at create time, so there’s no --runtime on update.) Datasets and KV stores are wired with read/write grants. --datasets / --kv grant read (for window.erdo.queryDataset / erdo.kv.get); --writable-datasets / --writable-kv grant write (for erdo.insertRows / erdo.kv.set):
erdo pages deploy --title "Lead capture" --html @form.html --js @form.js \
  --datasets acme.products \
  --writable-datasets acme.leads \
  --writable-kv campaign-state
Without the writable grant those write calls return a permission error. Public pages capturing data from logged-out visitors should write through an event pipeline (erdo.submitEvent) instead — see Build Apps.

Agent runs

Inspect what agents have done (the runs behind ask/send/evals).
erdo runs list --agent erdo.artifact-builder --status failed
erdo runs get <run-id>

Datasets

erdo datasets list                                 # slug, type, status, name
erdo datasets query sales "top 10 customers by revenue"   # natural-language query

Knowledge

Knowledge is your agents’ shared brain — definitions, skills, and learnings.
erdo knowledge list
erdo knowledge search "how do we define active users" --limit 5

KV (collections)

Named KV stores (collections) are Erdo’s shared key/value store — the canonical config and values (pricing, targets, brand tokens) that pages read, Knowledge bodies reference as {{slug.key}}, and agents resolve. One store, consistent everywhere.
erdo kv list
erdo kv create pricing                   # slug: lowercase letters, digits, hyphens
erdo kv get pricing monthly
erdo kv set pricing monthly '"$29"'      # value parsed as JSON, else stored as a string
erdo kv set targets q3 '{"arr": 1200000, "logos": 40}'
erdo kv delete pricing monthly

Automations

Heartbeats are recurring agents that analyze your data on a schedule. See Automations.
erdo automations list                              # id, state, name
erdo automations run <id>                          # trigger now

Evals

erdo eval suites
erdo eval create landing-variations --agent erdo.artifact-builder --evaluate-artifact --no-cron \
  --case '{"name":"voice","input":"{\"artifact_kind\":\"landing_page\",\"description\":\"...\"}","rubric":[{"criterion":"voice widget loads","weight":2}]}'
erdo eval update landing-variations --agent erdo.data-question-answerer  # only passed flags change
erdo eval run landing-variations --watch        # CI gate: non-zero if a case fails
erdo eval results <run-id>
erdo eval case add <suite> --name x --input "..." --rubric '[{"criterion":"...","weight":1}]'
erdo eval case add <suite> --name y --input "..." --evaluator '{"type":"script","script":"function evaluate(ctx){return {score:5,passed:true,reasoning:\"ok\"}}"}'
# multi-step flow: --setup turns run first (same thread/agent), then --input is the evaluated turn
erdo eval case add <suite> --name voice --setup "Create a voice concierge widget for Lumen Yoga" \
  --input "Build the landing page wired to that concierge" --rubric '[{"criterion":"voice widget loads","weight":2}]'
See Evals for the evaluator model (LLM rubric vs deterministic script).

Workstreams

Workstreams track multi-step business work — campaigns, lead engines, comms loops — with phases, an event log, and overall state.
# list / inspect
erdo workstream list                       # all workstreams in the active org
erdo workstream list --status active blocked
erdo workstream get acme-lead-engine-2026-06
erdo workstream events acme-lead-engine-2026-06 --limit 50

# create
erdo workstream create \
  --project acme \
  --slug acme-lead-engine-2026-06 \
  --title "Acme lead engine" \
  --description "Stand up the Acme outbound lead engine"

# drive
erdo workstream phase-add acme-lead-engine-2026-06 --phase-slug brand-brief --title "Brand brief"
erdo workstream log acme-lead-engine-2026-06 "Landing pages live, monitoring conversions"
erdo workstream set-state acme-lead-engine-2026-06 --status awaiting_user --description "Awaiting brand sign-off"

Experiments

Experiments are structured tests — hypothesis, variants, decision rule — with an append-only observation log. They live on their own or inside a workstream.
# inspect
erdo experiment list --status running
erdo experiment get acme-cpl-ab
erdo experiment observations acme-cpl-ab --type metric_read   # the loop's evidence

# create + drive
erdo experiment create \
  --project acme \
  --slug acme-cpl-ab \
  --title "Landing page CPL A/B" \
  --workstream acme-lead-engine-2026-06 \
  --primary-metric cost_per_lead \
  --hypothesis "Variant B's shorter form lifts conversion"
erdo experiment set-status acme-cpl-ab running
erdo experiment decide acme-cpl-ab --decision ship --outcome "B cut CPL 22% over 2 weeks, shipping"