Skip to main content
The naive CLI is built for agentic use — every command returns structured JSON with result data, contextual next steps, and guidance for autonomous operation.

Installation

Output modes

Machine JSON is the default. Human-readable output is opt-in — it is never inferred from isTTY, because a pty-wrapped agent looks exactly like a terminal. --json and --human are the only two global flags. stdout is always JSON.parse-able in machine mode; banners, update notices and deprecation notices go to stderr.

Active user

Naive is multi-tenant. Every subject-scoped command acts on a tenant user. By default that is the API key’s default user, so solo usage needs no setup.
--user <id> is not a global flag. It exists only on the commands that declare it — approvals, connections, vault, logs, loops, env, module add, agent-profiles provision and mobile proxy-set. On anything else it is an invalid_input error. Use naive use <id> or NAIVE_ACTIVE_USER_ID instead. Full resolution order on the use page.
See users and account-kits for managing tenants.

Active project

A tenant user (a child project) lives in a project. Every organization has a default one, so this is opt-in — with nothing selected the CLI acts exactly where it always did.
See projects.

Agent-Native Output

Every command returns a structured JSON response:

Exit codes

Exits 2 and 3 are opt-in and exist only on naive teams. Exit 3 is unreachable for a tenant on the durable runtime (its task states do not include unverified); the command warns on stderr in that case — see exit codes on naive teams.

Configuration

Config is stored at ~/.naive/config.json, written mode 0600 — it holds an API key and a 30-day session token.
The config is automatically populated when you register or login:

Environment Variables

Command Groups

The durable runtime

Knowledge

Legacy orchestration — deprecated, still working, frozen

Every group below keeps answering exactly as before, prints a deprecation banner on stderr, and is not scheduled for removal.

Authentication & account

Project lifecycle (naive.config.ts)

Multi-tenant governance

Primitives

This table lists groups, not every subcommand. naive <group> --help is authoritative and is generated from the same declaration the command tree is built from. A subcommand that is not in --help does not exist, and an unknown subcommand of a known group fails loudly with unknown_subcommand rather than falling through to the group’s help.

Getting Started

Error Handling

Errors also return structured JSON with recovery guidance:
Four error codes are minted by the CLI and never by the server, so they will not appear in the API reference: cli_outdated (unknown top-level command), unknown_subcommand, upstream_error (a non-JSON gateway response) and deprecated_command (a retired command that makes no request).

Detailed Help

Every command has comprehensive built-in help with examples: