> ## Documentation Index
> Fetch the complete documentation index at: https://usenaive.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Overview

> The naive CLI — an agent-native command-line toolkit for email, search, AI generation, and business operations.

The `naive` CLI is built for **agentic use** — every command returns structured JSON with result data, contextual next steps, and guidance for autonomous operation. It follows the same patterns as tools like Meow and Lindy.

## Installation

```bash theme={"theme":"css-variables"}
npm install -g @usenaive-sdk/cli
```

## Active user

Naive is multi-tenant. Every primitive command acts on a **tenant user**. By default
that's the API key's default user, so solo usage needs no setup.

* `naive use <user_id>` — set the active user for subsequent commands
* `naive use --clear` — reset to the default user
* `--user <id>` — override the active user for a single command

```bash theme={"theme":"css-variables"}
naive use alice_user_id
naive cards list                  # acts on alice
naive cards list --user bob_id    # one-off override
```

See [users](/docs/cli/users) and [account-kits](/docs/cli/account-kits) for managing tenants.

## Agent-Native Output

Every command returns a structured JSON response:

```json theme={"theme":"css-variables"}
{
  "success": true,
  "action": "email.send",
  "result": { "message_id": "msg-uuid-123" },
  "next_steps": [
    { "command": "naive email inbox", "description": "Monitor inbox for replies" },
    { "command": "naive email read msg-uuid-123", "description": "View sent message details" }
  ],
  "hints": [
    "Email sent successfully",
    "Cost: 10 credits"
  ],
  "related_commands": ["naive email inbox", "naive email read"]
}
```

This makes it trivial for AI agents to:

* Parse results programmatically
* Determine what to do next
* Chain operations autonomously
* Understand error recovery paths

## Configuration

Config is stored at `~/.naive/config.json`:

```json theme={"theme":"css-variables"}
{
  "api_key": "nv_sk_live_...",
  "base_url": "https://api.usenaive.ai",
  "agent_id": "uuid",
  "company_id": "uuid",
  "company_name": "Acme Corp"
}
```

The config is automatically populated when you register or login:

```bash theme={"theme":"css-variables"}
naive register --name "My Agent" --email me@example.com --password mypassword
# or
naive login --email me@example.com --password mypassword
```

## Environment Variables

| Variable         | Description                                           |
| ---------------- | ----------------------------------------------------- |
| `NAIVE_API_KEY`  | Override API key (for CI/headless use)                |
| `NAIVE_BASE_URL` | Override API URL (default: `https://api.usenaive.ai`) |

## Command Groups

### Orchestration

| Group          | Commands                                                                                                                                       | Description                                           |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| **CEO**        | `ceo run`, `ceo message`, `ceo status`, `ceo sessions`, `ceo stream`, `ceo team-approve`                                                       | CEO agent — run prompts, approve teams, stream output |
| **Tasks**      | `tasks list`, `tasks create`, `tasks show`, `tasks complete`, `tasks block`, `tasks unblock`, `tasks comment`, `tasks dispatch`, `tasks stats` | Kanban task management                                |
| **Objectives** | `objectives list`, `objectives create`, `objectives show`, `objectives update`, `objectives pause`, `objectives abandon`                       | Strategic goals                                       |
| **Employees**  | `employees list`, `employees hire`, `employees fire`, `employees configure`                                                                    | AI workforce management                               |
| **Cron**       | `cron create`, `cron list`, `cron trigger`, `cron pause`, `cron remove`                                                                        | Scheduled recurring jobs                              |
| **Memory**     | `memory add`, `memory list`, `memory remove`                                                                                                   | Persistent agent context                              |

### Primitives

| Group            | Commands                                                                                                                                                                                                                     | Description                                                                                                                                                         |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Auth**         | `register`, `login`, `link`, `verify`, `whoami`, `companies`, `keys`                                                                                                                                                         | Account creation, authentication, company management                                                                                                                |
| **Identity**     | `identity`, `identity emails`, `identity resources`                                                                                                                                                                          | View provisioned resources                                                                                                                                          |
| **Apps**         | `apps list`, `apps create`, `apps templates`, `apps show`, `apps deploy [--dir]`, `apps publish`, `apps deployments`, `apps retry`, `apps secrets`, `apps domains`, `apps db`, `apps vercel`, `apps supabase`, `apps delete` | Managed web apps with optional managed backend — build locally from public templates and deploy directly, or via engineer agents; incl. scoped provider API proxies |
| **Domains**      | `domains`, `domains connect`, `domains setup-records` (alias: `dns-records`), `domains verify`, `domains search`, `domains purchase`, `domains zone-records`, `domains set-record`, `domains delete-record`                  | Domain management, search + purchase, agent DNS record editing                                                                                                      |
| **Billing**      | `billing plans`, `billing subscribe`, `billing upgrade`, `billing status`, `billing portal`, `billing packs`, `billing topup`                                                                                                | Plans, subscriptions, credit top-ups                                                                                                                                |
| **Email**        | `email inboxes`, `email create`, `email delete`, `email send`, `email inbox`, `email read`                                                                                                                                   | Create inboxes, send/receive email                                                                                                                                  |
| **Phone**        | `phone provision`, `phone list`, `phone status`, `phone send`, `phone messages`, `phone read`, `phone assign`, `phone release`                                                                                               | Provision US numbers + send/receive SMS (Surge, carrier-registered)                                                                                                 |
| **Search**       | `search`, `search url`, `search research`                                                                                                                                                                                    | Web search, URL extraction, deep research                                                                                                                           |
| **LLM**          | `llm chat`, `llm models`                                                                                                                                                                                                     | OpenRouter-backed chat completions across 300+ models                                                                                                               |
| **Images**       | `images generate`, `images stock`, `images status`, `images models`                                                                                                                                                          | AI image generation and stock photos                                                                                                                                |
| **Video**        | `video generate`, `video status`, `video models`                                                                                                                                                                             | AI video generation                                                                                                                                                 |
| **Social**       | `social status`, `social activate`, `social connect`, `social accounts`, `social post`, `social posts`, `social publish`, `social analytics`                                                                                 | Social media management via Naive's social infrastructure                                                                                                           |
| **Trading**      | `trading connect`, `trading connections`, `trading account`, `trading assets`, `trading positions`, `trading order`, `trading orders`, `trading close`, `trading cancel`, `trading quote`                                    | Link a brokerage account (OAuth) and trade stocks, options & crypto                                                                                                 |
| **Verification** | `verification start`, `verification list`, `verification status`, `verification complete`, `verification resend`                                                                                                             | Naive-native identity verification (KYC)                                                                                                                            |
| **Formation**    | `formation naics-codes`, `formation submit`, `formation list`, `formation status`, `formation documents`, `formation download`                                                                                               | Naive-native LLC formation                                                                                                                                          |
| **Travel**       | `business google hotel-searches`, `business google hotel-info`, `business tripadvisor search`                                                                                                                                | Travel discovery and hotel intelligence                                                                                                                             |
| **Reviews**      | `business google my-business-info`, `business google reviews`, `business google qna`, `business trustpilot`, `business tripadvisor reviews`, `business social`, `business tasks-ready`, `business task-get`                  | Reputation, review aggregation, and engagement metrics                                                                                                              |
| **Jobs**         | `jobs`, `jobs get`, `jobs cancel`                                                                                                                                                                                            | Monitor async operations                                                                                                                                            |
| **Status**       | `status`, `usage`                                                                                                                                                                                                            | Account status and credit history                                                                                                                                   |

## Getting Started

```bash theme={"theme":"css-variables"}
# 1. Create account
naive register --name "Research Agent" --email agent@company.com --password s3cur3pw

# 2. Verify connectivity
naive status

# 3. Discover resources
naive identity emails

# 4. Start using primitives
naive search "latest AI developments"
naive email send --from-inbox <uuid> --to team@company.com --subject "Report" --body "..."
naive images generate "product mockup" --model fal-ai/flux/schnell --wait
```

## Error Handling

Errors also return structured JSON with recovery guidance:

```json theme={"theme":"css-variables"}
{
  "success": false,
  "action": "email.send",
  "error": {
    "code": "insufficient_credits",
    "message": "Not enough credits for this operation",
    "hint": "Add credits at https://usenaive.ai/billing"
  },
  "recovery_steps": [
    { "command": "naive usage", "description": "Check credit usage history" },
    { "command": "naive status", "description": "View current balance and tier" }
  ]
}
```

## Detailed Help

Every command has comprehensive built-in help with examples:

```bash theme={"theme":"css-variables"}
naive --help                    # Full CLI overview
naive email --help              # Email command group
naive email send --help         # Specific command with examples
naive video generate --help     # Parameters, models, costs
```
