Skip to main content
@devicai/cli wraps the Devic public API in a command-line tool. It is agent-first: structured JSON by default when piped, machine-readable errors, meaningful exit codes and polling that does not block forever.
The Devic CLI

Authentication

Credentials live in ~/.config/devic/config.json. Get a key from API keys.

Output

Human-readable tables in a terminal, JSON when piped or non-interactive. Force either with --output json / --output human. Errors always go to stderr as JSON — {"error":"…","code":"…"} — and the exit code says what happened: 0 success, 1 error, 2 authentication required, 3 poll timeout.

What it covers

Assistants

devic assistants list | get | chat, with conversation history and feedback.

Agents

devic agents … — CRUD, threads, approvals, pause and resume, evaluations, costs.

Tool servers

devic tool-servers … — MCP and custom servers, their tools, cloning.

Integrations and triggers

devic integrations … and devic triggers … — connect apps, pick tools, subscribe to events.

Knowledge and skills

devic documents …, devic skills … — read, write and install.

Projects

devic projects … — and --project on most listings.

Following a long run

--wait blocks until a run finishes, which is fine at a keyboard and wrong for an agent driving the CLI from a sandbox, where commands are killed after about 45 seconds. watch is the incremental alternative. It looks for a short window, reports only what changed since the previous call, and says whether watching further is worth it:
The exit code is the decision: Alongside them, advice carries a recommended cadence and diagnostics explains why a run is not moving — a disabled agent, one at its concurrency limit, a queue delay, a pending approval, a scheduled resume.
This is what makes the CLI usable as a tool for a coding agent: it can start work, come back, and be told exactly what changed and what to do next, without holding a process open.

Server-side SDK

For Node backends, @devicai/sdk offers the same API as a typed client — including minting tenant sessions:

Skills for coding assistants

If you work with an AI coding assistant, install the Devic skills so it knows these APIs properly:
See Skills.