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.
Or run it without installing:
Verify and sign in:

Update

Equivalent to npm install -g @erdoai/cli@latest.

Auth & orgs

Accounts are stored at ~/.config/erdo/config.json, one active at a time.
Env overrides for CI: ERDO_API_KEY, ERDO_ORG, ERDO_API_URL, ERDO_ACCOUNT.

Pin the org in automation

The active org set by erdo org use lives in machine-global config, so it is shared across every concurrent session — another shell (or another job) running org use switches the org for all of them. A command that only reads is harmless, but a mutation that lands in the wrong org is not, so any command that writes prints the org it is about to act in on stderr before it fires:
For scripts and CI, don’t rely on the shared active org — pin it explicitly with erdo --org <id|slug> <command> or by setting ERDO_ORG, so the command acts in the org you intended regardless of what any concurrent session did. Runs that build real artifacts enforce this: erdo eval run refuses an artifact-building suite unless the org is pinned (see Evals).

API tokens

An API token is an account-level credential — it acts as you in any org you belong to, not just one. The org stored on a token is only its default (used when a request names no org); erdo --org <x> <command> or erdo org use <x> steers any command to another of your orgs, and the backend re-checks your membership on every request.
Store the token the moment it’s printed — it can’t be retrieved again. Use it in CI via ERDO_API_KEY, or authenticate an interactive session with erdo login --key <token>. There is deliberately no way for an AI assistant (MCP) to mint tokens — creation lives only on the CLI/REST surface a human drives.

Manager accounts

A manager account operates many client (“managed”) orgs with one credential — the pattern a portal uses to provision and run an org per customer without a pasted key per tenant. Your active org is the manager (you must be an admin/owner of it); erdo org managed create provisions a client org, and erdo org managed key mints a single manager key that acts inside any managed org via --org <slug>.
The manager key is one non-expiring credential for every org you manage — target a specific one with erdo --org <slug> (or the X-Organization-ID header). Running erdo org managed key again rotates it. See Manager accounts for the full portal flow and the REST/MCP surface.

Agents

Running an agent is sending it a message; the artifact-builder produces pages this way.
ask and send start the run, print its thread id, and poll until it finishes. Agent runs routinely take minutes — building a landing page, screening variants — and a single HTTP request held open that long is cut off by the edge proxy, so polling is the default. The thread id is printed before the wait begins: if you interrupt the CLI, or the run pauses for approval, the work carries on server-side and you pick it back up by thread.
A run that paused for approval resumes once you erdo approvals decide <id> --approve; erdo agent wait <thread> then picks the wait back up and prints the answer when the run completes. Pass --sync to hold one request open instead. It returns faster on quick questions, and it will time out on anything long.

Pages & artifacts

list shows your pages newest first (id, created-at, visibility, title) and filters by title substring (--query) or a created-at window (--created-after / --created-before, RFC3339). Pass --type <type> to list any artifact type (charts, tables) instead of just pages. delete is a soft delete — the page’s public link stops working and it drops out of list, but restore brings it back (private, since deleting revoked its public grant). --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):
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).

Approvals

Some agent actions pause for a human decision. List them and approve/reject so the paused run can continue. See Approvals.

Review queue

The knowledge agents propose, the investigations they open, and the failure signals they keep counting — the queue of things awaiting a human decision. See the review queue.

Datasets

upload accepts CSV, TSV, Excel, JSON, JSONL, PDF, DOCX, TXT, Markdown, and more — the extension drives type detection. The schema is extracted before the command returns, so the printed slug is immediately usable with query. Larger files (over 20 MB) go through the web app’s resumable upload.

Integrations

Connect third-party apps and data sources from the terminal. Credential-based apps (databases, API keys, service accounts) connect in one command; OAuth apps print a connect URL to open in a browser, and status completes the connection once you’ve authorized.
Once a database is connected, make it queryable as a dataset — queries run live against the source, nothing is copied. Pass the schemas to include (some integrations allow only one); tables lists the selectable ones. Per-table column listing is available for SQL databases (Postgres, MySQL, and compatible); warehouses list schemas only.

Knowledge

Knowledge is your agents’ shared brain — definitions, skills, and learnings.
Entries are workspace (organization-internal) by default; public opts an entry into anonymous external surfaces such as the website voice widget — a draft is approved in the same step and goes live immediately. See Knowledge visibility.

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.

Automations

Heartbeats are recurring agents that analyze your data on a schedule. See Automations.

Evals

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.

Experiments

Experiments are structured tests — hypothesis, variants, decision rule — with an append-only observation log. They live on their own or inside a workstream.