@usenaive-sdk/cli
v0.4.0
Published
CLI for Naive AI Business Primitives API
Readme
@usenaive-sdk/cli
Command-line interface for the Naive API v2. Register, manage identity, and use all primitives directly from the terminal.
What It Provides
- Auth & Onboarding — Register new accounts, login, link existing ones, manage API keys
- Identity — View agent profile, company, email inboxes, resources
- Domains — List domains, connect custom domains (BYOD), view DNS records, verify, search, purchase
- Billing — Plans, subscribe, upgrade, credit top-ups, billing portal
- Email — Create/delete inboxes, send emails, read inboxes
- Search — Web search, URL extraction, deep research
- Images — Generate via fal.ai, search stock photos (dynamic pricing)
- Video — Generate via fal.ai (dynamic pricing)
- Social — Connect accounts, create posts, schedule, analytics (via bundle.social)
- Verification — Identity verification (KYC) for company founders/members via Footprint
- Formation — Company formation (LLC incorporation) via Doola ($249 fee via Stripe Checkout)
- Cards — Virtual cards — create, fund, assign agents, track transactions (Stripe Issuing + Reloadly)
- Jobs — List, inspect, and cancel async jobs
- Status — Credit balance and usage history
Local Development
Prerequisites
- Node.js 20+
- pnpm 9+
Setup
# From monorepo root
pnpm installRun (development)
# Run any command directly with tsx
pnpm --filter @usenaive-sdk/cli dev -- register --name "Test" --email [email protected]
# Or from packages/cli
cd packages/cli
pnpm dev -- search "AI frameworks"Build
pnpm --filter @usenaive-sdk/cli buildLink locally (test as global binary)
cd packages/cli
pnpm link --global
naive --helpUsage
Configuration
The CLI stores config at ~/.naive/config.json:
{
"api_key": "nv_sk_live_...",
"base_url": "https://api.usenaive.ai"
}Set via registration or environment:
# Auto-saved on register/login/link
naive register --name "My Agent" --email [email protected] --password yourpassword
# Or set manually
export NAIVE_API_KEY=nv_sk_live_...
export NAIVE_BASE_URL=http://localhost:3100 # for local devCommands
# Auth
naive register --name "Agent" --email [email protected] --password mypassword --company "Acme"
naive login --email [email protected] --password mypassword
naive link --email [email protected]
naive whoami
naive companies
naive keys list
naive keys create "Production"
naive keys revoke <key-id>
# Identity
naive identity
naive identity emails
naive identity resources
# CEO (orchestration)
naive ceo run "Launch my product"
naive ceo stream <runId>
naive ceo message "Approved, hire the team"
naive ceo status
naive ceo sessions
# Tasks (kanban)
naive tasks list
naive tasks list --status running --assignee "Jordan Kim"
naive tasks create "Build landing page" --description "Responsive hero section" --assignee "Jordan Kim" --priority high
naive tasks show <id> # Accepts UUID or hermes task ID (t_*)
naive tasks complete <id> --summary "Deployed to prod"
naive tasks block <id> --reason "Waiting for DNS"
naive tasks unblock <id>
naive tasks comment <id> "Added SEO meta tags"
naive tasks dispatch
naive tasks stats
# Employees
naive employees list
naive employees hire --name "Jordan Kim" --role engineer --skills "typescript,react"
naive employees fire <id>
naive employees configure <id> --model gpt-4o
# Objectives
naive objectives list
naive objectives create "Launch product" --criteria "100 signups"
naive objectives update <id> --status completed
naive objectives show <id>
# Cron Jobs
naive cron create "0 9 * * *" "Check email and summarize"
naive cron list
naive cron trigger <id>
naive cron pause <id>
# Memory
naive memory add --target memory "Brand color is #FF6B00"
naive memory list
naive memory remove <id>
# Domains
naive domains # List all domains
naive domains connect example.com # Connect a custom domain (BYOD)
naive domains dns-records <domain-id> # Show required DNS records
naive domains verify <domain-id> # Trigger domain verification
naive domains search example.com # Check domain availability + price
naive domains purchase example.com # Purchase a domain via Stripe
# Billing
naive billing plans # List plans with pricing
naive billing subscribe --plan starter # Subscribe to a plan
naive billing upgrade --plan pro # Upgrade existing subscription
naive billing status # Check subscription + credits
naive billing portal # Stripe billing management
naive billing packs # List credit top-up packs
naive billing topup --pack medium # Buy credits
# Email
naive email inboxes
naive email create --local-part hello # Create new inbox on active domain
naive email delete <inbox-id> # Delete an inbox
naive email send --from-inbox <uuid> --to [email protected] --subject "Hi" --body "Hello"
naive email inbox --inbox <uuid> --limit 20
naive email read <email-id>
# Search
naive search "AI agent frameworks"
naive search url https://example.com --extract "Main points?"
naive search research "Compare React vs Astro" --depth thorough --wait
# Images
naive images generate "A tech logo" --model "fal-ai/flux-pro/v1.1" --wait
naive images generate --input '{"prompt":"...","num_images":2}' --wait
naive images status <job-id>
naive images stock "office workspace" --count 5
naive images models
# Video
naive video generate "Dog on beach" --model "fal-ai/kling-video/v3/pro/text-to-video" --duration 5 --wait
naive video status <job-id>
naive video models
# Social
naive social status # Check activation + accounts
naive social activate # Activate social media
naive social connect --platform twitter --redirect-url https://example.com # OAuth URL
naive social portal --redirect-url https://example.com # Multi-platform portal
naive social accounts # List connected accounts
naive social label <account-id> --label "Main" # Label an account
naive social disconnect <account-id> # Disconnect account
naive social sync # Sync from bundle.social
naive social upload --url https://example.com/video.mp4 # Upload media
naive social posts # List posts
naive social posts --status draft # Filter by status
naive social post "Hello world!" --platforms twitter,linkedin --publish # Create + publish (1 credit)
naive social post "Draft" --platforms twitter # Create draft (free)
naive social post "Demo" --platforms youtube --media-url https://example.com/video.mp4 --youtube-type SHORT --publish
naive social get <post-id> # Get post details
naive social edit <post-id> --content "Updated" # Edit draft
naive social delete <post-id> # Delete post
naive social publish <post-id> # Publish draft (1 credit)
naive social analytics <post-id> # Post analytics
naive social comments <post-id> # Post comments
naive social account-analytics <account-id> # Account analytics
# Cards
naive cards # List all cards
naive cards cardholder # View cardholder
naive cards create-cardholder --first-name John --last-name Doe --billing-line1 "123 Main St" --billing-city "SF" --billing-state CA --billing-postal-code 94105 --dob-day 15 --dob-month 6 --dob-year 1990
naive cards create --name "Marketing" --spending-limit 10000 # Returns checkout URL
naive cards check-payment <card-id> # Issue card after payment
naive cards details <card-id> # Get PAN/CVC or redeem code
naive cards top-up <card-id> --amount 5000 # Returns checkout URL
naive cards cancel <card-id> # Cancel a card
naive cards assign <card-id> --agent-id <uuid> # Assign agent
naive cards unassign <card-id> <agent-id> # Remove assignment
naive cards log-transaction <card-id> --amount 2500 --description "Purchase"
naive cards transactions --card-id <uuid> # List transactions
# Jobs
naive jobs
naive jobs --status processing
naive jobs get <job-id>
naive jobs cancel <job-id>
# Status
naive status
naive usage --days 7Global Options
--api-key <key> Override API key (env: NAIVE_API_KEY)
--base-url <url> Override base URL (env: NAIVE_BASE_URL)
--help Show help
--version Show versionProduction / Publishing
Publish to npm
cd packages/cli
pnpm build
npm publish --access publicUsers install with:
npm install -g @usenaive-sdk/cli
naive --helpUse without installing
npx @usenaive-sdk/cli register --name "My Agent" --email [email protected]
npx @usenaive-sdk/cli search "AI frameworks"Architecture
src/
├── index.ts # Entry point, commander program setup
├── config.ts # ~/.naive/config.json read/write
├── client.ts # HTTP client (fetch wrapper with auth + error handling)
├── output.ts # Structured agent-native JSON output (agentOutput/agentError)
└── commands/
├── ceo.ts # naive ceo (run/message/status/sessions/stream)
├── tasks.ts # naive tasks (list/create/show/complete/block/unblock/comment/dispatch/stats)
├── employees.ts # naive employees (list/hire/fire/configure)
├── objectives.ts # naive objectives (list/create/update/show)
├── memory.ts # naive memory (add/list/remove)
├── cron-jobs.ts # naive cron (create/list/trigger/pause/resume/delete)
├── register.ts # naive register
├── login.ts # naive login
├── link.ts # naive link
├── whoami.ts # naive whoami
├── companies.ts # naive companies
├── keys.ts # naive keys
├── identity.ts # naive identity
├── status.ts # naive status
├── usage.ts # naive usage
├── domains.ts # naive domains (list/connect/dns-records/verify/search/purchase)
├── billing.ts # naive billing (plans/subscribe/upgrade/status/portal/packs/topup)
├── email.ts # naive email (inboxes/create/delete/send/inbox/read)
├── search.ts # naive search (web/url/research)
├── images.ts # naive images (generate/stock/models)
├── video.ts # naive video (generate/models)
├── social.ts # naive social (status/activate/connect/portal/accounts/label/disconnect/sync/upload/posts/post/get/edit/delete/publish/analytics/comments/account-analytics)
├── verification.ts # naive verification (start/list/status/complete/resend)
├── formation.ts # naive formation (naics-codes/submit/retry-payment/execute/list/status/documents/download)
├── cards.ts # naive cards (list/cardholder/create-cardholder/create/details/check-payment/retry-issue/top-up/refund/cancel/assignments/assign/unassign/log-transaction/transactions)
└── jobs.ts # naive jobs (list/get/cancel)