npm package: 11xos
Description: CLI for the 11x CRM — manage leads, views, calls, and more
Latest version: 0.1.2

# 11xos

11x CRM CLI — manage leads, content, sources, views, calls, and more from the terminal.

[11x.agency](https://11x.agency) is a lean AI-enabled CRM. This CLI is designed for both human operators and agentic systems (AI agents) to interact with the API programmatically.

## Install

```bash
npm install -g 11xos
```

Or run directly:

```bash
npx 11xos login --api-key <key>
```

## Quick Start

```bash
# Authenticate with your API key
11xos login --api-key <key> --api-url https://11xos-web.vercel.app

# Check your identity
11xos whoami

# List leads
11xos leads list

# Create a lead
11xos leads create --first-name "Jane" --last-name "Doe" --company "Acme"

# View dashboard
11xos dashboard
```

## Commands

```
11xos login --api-key <key> [--api-url <url>]
11xos logout
11xos whoami [--json]

11xos leads list [--status, --owner, --search, --type, --page, --limit, --sort-by, --sort-order, --filters]
11xos leads get <id> [--json]
11xos leads create --first-name <name> --last-name <name> [--company, --phone, --email, --type, --metadata]
11xos leads update <id> [--first-name, --last-name, --company, --phone, --email, --type, --metadata]
11xos leads delete <id> --yes [--json]
11xos leads status <id> <NEW|CONTACTED|QUALIFIED|DISQUALIFIED|NURTURE>
11xos leads assign <id> [--owner <userId> | --unassign]
11xos leads activities <id> [--page, --limit]
11xos leads note <id> [--set <content>]
11xos leads add-note <id> --content <text>
11xos leads types [--json]
11xos leads metadata-keys [--type] [--json]
11xos leads import --file <path> --type <type> [--mappings <json> | --preview]
11xos leads calls <id> [--json]

11xos views list [--json]
11xos views get <id> [--json]
11xos views create --name <name> [--filters, --columns, --sort-by, --sort-order, --color, --icon, --default]
11xos views update <id> [--name, --filters, --columns, --sort-by, --sort-order, --color, --icon, --default]
11xos views delete <id> --yes [--json]

11xos content list [--status, --platform, --owner, --search, --page, --limit, --sort-by, --sort-order, --filters] [--json]
11xos content get <id> [--json]
11xos content create --url <url> --title <title> --platform <PLATFORM> [--author, --summary, --angles, --transcript, --notes, --metadata] [--json]
11xos content update <id> [--title, --author, --summary, --angles, --transcript, --notes, --metadata] [--json]
11xos content delete <id> --yes [--json]
11xos content status <id> <NEW|KEPT|ADAPTED|SKIPPED> [--json]
11xos content assign <id> [--owner <userId> | --unassign] [--json]
11xos content scout --url <url> [--platform] [--json]

11xos sources list [--platform, --tag, --enabled, --page, --limit] [--json]
11xos sources get <id> [--json]
11xos sources add --platform <PLATFORM> --handle <handle> --name <name> [--url, --tags, --metadata] [--json]
11xos sources update <id> [--name, --url, --tags, --enabled, --metadata] [--json]
11xos sources remove <id> --yes [--json]

11xos calls token [--json]
11xos calls initiate <leadId> [--json]

11xos users list [--json]

11xos settings update-profile --name <name> [--json]
11xos settings delete-account --yes [--json]

11xos dashboard [--json]
```

All commands support `--json` for machine-readable output with `{ ok, data }` / `{ ok, error }` envelope.

## Auth

```bash
11xos login --api-key <API_KEY>
```

Credentials are stored at `~/.11xos/config.json` (dir `0700`, file `0600`).

Env var overrides: `XOS_API_KEY` and `XOS_API_URL` take precedence over the config file. Default API URL is `http://localhost:3000`.

## Agentic Usage

The CLI is designed for AI agent consumption:

- **`--json` on all commands** — structured `{ ok, data, error }` envelope
- **No interactive prompts** — agents must use `--yes` for destructive ops
- **Exit codes** — 0 success, 1 client error, 2 server error
- **Stdin piping** — `echo '{"firstName":"Test","lastName":"Lead"}' | 11xos leads create --json`
- **Env var auth** — set `XOS_API_KEY` + `XOS_API_URL` in the agent's environment

## License

MIT