@usenaive-sdk/cli 0.15.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/README.md +43 -402
  2. package/dist/index.js +51775 -502
  3. package/package.json +22 -18
  4. package/dist/client.d.ts +0 -108
  5. package/dist/client.js +0 -458
  6. package/dist/client.js.map +0 -1
  7. package/dist/commands/account-kits.d.ts +0 -2
  8. package/dist/commands/account-kits.js +0 -71
  9. package/dist/commands/account-kits.js.map +0 -1
  10. package/dist/commands/aeo.d.ts +0 -2
  11. package/dist/commands/aeo.js +0 -451
  12. package/dist/commands/aeo.js.map +0 -1
  13. package/dist/commands/agent-profiles.d.ts +0 -11
  14. package/dist/commands/agent-profiles.js +0 -120
  15. package/dist/commands/agent-profiles.js.map +0 -1
  16. package/dist/commands/agents.d.ts +0 -2
  17. package/dist/commands/agents.js +0 -916
  18. package/dist/commands/agents.js.map +0 -1
  19. package/dist/commands/app-data.d.ts +0 -2
  20. package/dist/commands/app-data.js +0 -445
  21. package/dist/commands/app-data.js.map +0 -1
  22. package/dist/commands/approvals.d.ts +0 -2
  23. package/dist/commands/approvals.js +0 -242
  24. package/dist/commands/approvals.js.map +0 -1
  25. package/dist/commands/apps.d.ts +0 -9
  26. package/dist/commands/apps.js +0 -844
  27. package/dist/commands/apps.js.map +0 -1
  28. package/dist/commands/audio.d.ts +0 -9
  29. package/dist/commands/audio.js +0 -391
  30. package/dist/commands/audio.js.map +0 -1
  31. package/dist/commands/auth.d.ts +0 -31
  32. package/dist/commands/auth.js +0 -428
  33. package/dist/commands/auth.js.map +0 -1
  34. package/dist/commands/billing.d.ts +0 -2
  35. package/dist/commands/billing.js +0 -250
  36. package/dist/commands/billing.js.map +0 -1
  37. package/dist/commands/brain.d.ts +0 -2
  38. package/dist/commands/brain.js +0 -1300
  39. package/dist/commands/brain.js.map +0 -1
  40. package/dist/commands/browser.d.ts +0 -2
  41. package/dist/commands/browser.js +0 -378
  42. package/dist/commands/browser.js.map +0 -1
  43. package/dist/commands/business.d.ts +0 -2
  44. package/dist/commands/business.js +0 -566
  45. package/dist/commands/business.js.map +0 -1
  46. package/dist/commands/cards.d.ts +0 -2
  47. package/dist/commands/cards.js +0 -419
  48. package/dist/commands/cards.js.map +0 -1
  49. package/dist/commands/ceo.d.ts +0 -2
  50. package/dist/commands/ceo.js +0 -369
  51. package/dist/commands/ceo.js.map +0 -1
  52. package/dist/commands/clone.d.ts +0 -2
  53. package/dist/commands/clone.js +0 -203
  54. package/dist/commands/clone.js.map +0 -1
  55. package/dist/commands/companies.d.ts +0 -10
  56. package/dist/commands/companies.js +0 -283
  57. package/dist/commands/companies.js.map +0 -1
  58. package/dist/commands/company-data.d.ts +0 -2
  59. package/dist/commands/company-data.js +0 -168
  60. package/dist/commands/company-data.js.map +0 -1
  61. package/dist/commands/compute.d.ts +0 -2
  62. package/dist/commands/compute.js +0 -498
  63. package/dist/commands/compute.js.map +0 -1
  64. package/dist/commands/config.d.ts +0 -2
  65. package/dist/commands/config.js +0 -36
  66. package/dist/commands/config.js.map +0 -1
  67. package/dist/commands/connections.d.ts +0 -8
  68. package/dist/commands/connections.js +0 -137
  69. package/dist/commands/connections.js.map +0 -1
  70. package/dist/commands/cron-jobs.d.ts +0 -2
  71. package/dist/commands/cron-jobs.js +0 -245
  72. package/dist/commands/cron-jobs.js.map +0 -1
  73. package/dist/commands/domains.d.ts +0 -2
  74. package/dist/commands/domains.js +0 -474
  75. package/dist/commands/domains.js.map +0 -1
  76. package/dist/commands/ecommerce.d.ts +0 -2
  77. package/dist/commands/ecommerce.js +0 -277
  78. package/dist/commands/ecommerce.js.map +0 -1
  79. package/dist/commands/email.d.ts +0 -2
  80. package/dist/commands/email.js +0 -336
  81. package/dist/commands/email.js.map +0 -1
  82. package/dist/commands/employees.d.ts +0 -2
  83. package/dist/commands/employees.js +0 -190
  84. package/dist/commands/employees.js.map +0 -1
  85. package/dist/commands/env.d.ts +0 -7
  86. package/dist/commands/env.js +0 -112
  87. package/dist/commands/env.js.map +0 -1
  88. package/dist/commands/formation.d.ts +0 -2
  89. package/dist/commands/formation.js +0 -273
  90. package/dist/commands/formation.js.map +0 -1
  91. package/dist/commands/identity.d.ts +0 -2
  92. package/dist/commands/identity.js +0 -110
  93. package/dist/commands/identity.js.map +0 -1
  94. package/dist/commands/images.d.ts +0 -2
  95. package/dist/commands/images.js +0 -371
  96. package/dist/commands/images.js.map +0 -1
  97. package/dist/commands/init.d.ts +0 -5
  98. package/dist/commands/init.js +0 -43
  99. package/dist/commands/init.js.map +0 -1
  100. package/dist/commands/jobs.d.ts +0 -2
  101. package/dist/commands/jobs.js +0 -144
  102. package/dist/commands/jobs.js.map +0 -1
  103. package/dist/commands/keys.d.ts +0 -2
  104. package/dist/commands/keys.js +0 -156
  105. package/dist/commands/keys.js.map +0 -1
  106. package/dist/commands/legacy-auth.d.ts +0 -27
  107. package/dist/commands/legacy-auth.js +0 -64
  108. package/dist/commands/legacy-auth.js.map +0 -1
  109. package/dist/commands/llm.d.ts +0 -2
  110. package/dist/commands/llm.js +0 -125
  111. package/dist/commands/llm.js.map +0 -1
  112. package/dist/commands/login.d.ts +0 -2
  113. package/dist/commands/login.js +0 -65
  114. package/dist/commands/login.js.map +0 -1
  115. package/dist/commands/logout.d.ts +0 -7
  116. package/dist/commands/logout.js +0 -55
  117. package/dist/commands/logout.js.map +0 -1
  118. package/dist/commands/logs.d.ts +0 -2
  119. package/dist/commands/logs.js +0 -42
  120. package/dist/commands/logs.js.map +0 -1
  121. package/dist/commands/loops.d.ts +0 -2
  122. package/dist/commands/loops.js +0 -260
  123. package/dist/commands/loops.js.map +0 -1
  124. package/dist/commands/media.d.ts +0 -2
  125. package/dist/commands/media.js +0 -183
  126. package/dist/commands/media.js.map +0 -1
  127. package/dist/commands/memory.d.ts +0 -2
  128. package/dist/commands/memory.js +0 -151
  129. package/dist/commands/memory.js.map +0 -1
  130. package/dist/commands/mobile.d.ts +0 -4
  131. package/dist/commands/mobile.js +0 -382
  132. package/dist/commands/mobile.js.map +0 -1
  133. package/dist/commands/module.d.ts +0 -8
  134. package/dist/commands/module.js +0 -48
  135. package/dist/commands/module.js.map +0 -1
  136. package/dist/commands/objectives.d.ts +0 -2
  137. package/dist/commands/objectives.js +0 -243
  138. package/dist/commands/objectives.js.map +0 -1
  139. package/dist/commands/payments.d.ts +0 -2
  140. package/dist/commands/payments.js +0 -131
  141. package/dist/commands/payments.js.map +0 -1
  142. package/dist/commands/people.d.ts +0 -2
  143. package/dist/commands/people.js +0 -197
  144. package/dist/commands/people.js.map +0 -1
  145. package/dist/commands/phone.d.ts +0 -2
  146. package/dist/commands/phone.js +0 -289
  147. package/dist/commands/phone.js.map +0 -1
  148. package/dist/commands/projects.d.ts +0 -13
  149. package/dist/commands/projects.js +0 -220
  150. package/dist/commands/projects.js.map +0 -1
  151. package/dist/commands/queue.d.ts +0 -2
  152. package/dist/commands/queue.js +0 -121
  153. package/dist/commands/queue.js.map +0 -1
  154. package/dist/commands/register.d.ts +0 -2
  155. package/dist/commands/register.js +0 -88
  156. package/dist/commands/register.js.map +0 -1
  157. package/dist/commands/report.d.ts +0 -17
  158. package/dist/commands/report.js +0 -109
  159. package/dist/commands/report.js.map +0 -1
  160. package/dist/commands/sandbox.d.ts +0 -2
  161. package/dist/commands/sandbox.js +0 -558
  162. package/dist/commands/sandbox.js.map +0 -1
  163. package/dist/commands/search.d.ts +0 -2
  164. package/dist/commands/search.js +0 -223
  165. package/dist/commands/search.js.map +0 -1
  166. package/dist/commands/seo.d.ts +0 -2
  167. package/dist/commands/seo.js +0 -528
  168. package/dist/commands/seo.js.map +0 -1
  169. package/dist/commands/sessions.d.ts +0 -6
  170. package/dist/commands/sessions.js +0 -109
  171. package/dist/commands/sessions.js.map +0 -1
  172. package/dist/commands/social-data.d.ts +0 -2
  173. package/dist/commands/social-data.js +0 -245
  174. package/dist/commands/social-data.js.map +0 -1
  175. package/dist/commands/social.d.ts +0 -2
  176. package/dist/commands/social.js +0 -407
  177. package/dist/commands/social.js.map +0 -1
  178. package/dist/commands/status.d.ts +0 -2
  179. package/dist/commands/status.js +0 -79
  180. package/dist/commands/status.js.map +0 -1
  181. package/dist/commands/support.d.ts +0 -2
  182. package/dist/commands/support.js +0 -134
  183. package/dist/commands/support.js.map +0 -1
  184. package/dist/commands/tasks.d.ts +0 -2
  185. package/dist/commands/tasks.js +0 -409
  186. package/dist/commands/tasks.js.map +0 -1
  187. package/dist/commands/teams.d.ts +0 -69
  188. package/dist/commands/teams.js +0 -503
  189. package/dist/commands/teams.js.map +0 -1
  190. package/dist/commands/trading.d.ts +0 -2
  191. package/dist/commands/trading.js +0 -333
  192. package/dist/commands/trading.js.map +0 -1
  193. package/dist/commands/up.d.ts +0 -551
  194. package/dist/commands/up.js +0 -1149
  195. package/dist/commands/up.js.map +0 -1
  196. package/dist/commands/usage.d.ts +0 -2
  197. package/dist/commands/usage.js +0 -73
  198. package/dist/commands/usage.js.map +0 -1
  199. package/dist/commands/use.d.ts +0 -12
  200. package/dist/commands/use.js +0 -96
  201. package/dist/commands/use.js.map +0 -1
  202. package/dist/commands/users.d.ts +0 -10
  203. package/dist/commands/users.js +0 -82
  204. package/dist/commands/users.js.map +0 -1
  205. package/dist/commands/vault.d.ts +0 -2
  206. package/dist/commands/vault.js +0 -101
  207. package/dist/commands/vault.js.map +0 -1
  208. package/dist/commands/verification.d.ts +0 -2
  209. package/dist/commands/verification.js +0 -152
  210. package/dist/commands/verification.js.map +0 -1
  211. package/dist/commands/verify-email.d.ts +0 -19
  212. package/dist/commands/verify-email.js +0 -130
  213. package/dist/commands/verify-email.js.map +0 -1
  214. package/dist/commands/video.d.ts +0 -2
  215. package/dist/commands/video.js +0 -417
  216. package/dist/commands/video.js.map +0 -1
  217. package/dist/commands/voice.d.ts +0 -2
  218. package/dist/commands/voice.js +0 -516
  219. package/dist/commands/voice.js.map +0 -1
  220. package/dist/commands/wallet.d.ts +0 -2
  221. package/dist/commands/wallet.js +0 -244
  222. package/dist/commands/wallet.js.map +0 -1
  223. package/dist/commands/webhooks.d.ts +0 -13
  224. package/dist/commands/webhooks.js +0 -119
  225. package/dist/commands/webhooks.js.map +0 -1
  226. package/dist/commands/whoami.d.ts +0 -2
  227. package/dist/commands/whoami.js +0 -53
  228. package/dist/commands/whoami.js.map +0 -1
  229. package/dist/config.d.ts +0 -42
  230. package/dist/config.js +0 -83
  231. package/dist/config.js.map +0 -1
  232. package/dist/index.d.ts +0 -3
  233. package/dist/index.js.map +0 -1
  234. package/dist/lib/brain-select.d.ts +0 -193
  235. package/dist/lib/brain-select.js +0 -403
  236. package/dist/lib/brain-select.js.map +0 -1
  237. package/dist/lib/cli-validation.d.ts +0 -12
  238. package/dist/lib/cli-validation.js +0 -46
  239. package/dist/lib/cli-validation.js.map +0 -1
  240. package/dist/lib/config-errors.d.ts +0 -4
  241. package/dist/lib/config-errors.js +0 -13
  242. package/dist/lib/config-errors.js.map +0 -1
  243. package/dist/lib/deprecation.d.ts +0 -158
  244. package/dist/lib/deprecation.js +0 -140
  245. package/dist/lib/deprecation.js.map +0 -1
  246. package/dist/lib/duration.d.ts +0 -8
  247. package/dist/lib/duration.js +0 -11
  248. package/dist/lib/duration.js.map +0 -1
  249. package/dist/lib/http-response.d.ts +0 -11
  250. package/dist/lib/http-response.js +0 -96
  251. package/dist/lib/http-response.js.map +0 -1
  252. package/dist/lib/llm-paywall.d.ts +0 -82
  253. package/dist/lib/llm-paywall.js +0 -231
  254. package/dist/lib/llm-paywall.js.map +0 -1
  255. package/dist/lib/pricing.d.ts +0 -132
  256. package/dist/lib/pricing.js +0 -148
  257. package/dist/lib/pricing.js.map +0 -1
  258. package/dist/lib/starter-config.d.ts +0 -13
  259. package/dist/lib/starter-config.js +0 -71
  260. package/dist/lib/starter-config.js.map +0 -1
  261. package/dist/lib/stream-frames.d.ts +0 -114
  262. package/dist/lib/stream-frames.js +0 -169
  263. package/dist/lib/stream-frames.js.map +0 -1
  264. package/dist/lib/teams-catalog.d.ts +0 -141
  265. package/dist/lib/teams-catalog.js +0 -841
  266. package/dist/lib/teams-catalog.js.map +0 -1
  267. package/dist/lib/unknown-command.d.ts +0 -71
  268. package/dist/lib/unknown-command.js +0 -132
  269. package/dist/lib/unknown-command.js.map +0 -1
  270. package/dist/lib/version-check.d.ts +0 -26
  271. package/dist/lib/version-check.js +0 -21
  272. package/dist/lib/version-check.js.map +0 -1
  273. package/dist/output.d.ts +0 -246
  274. package/dist/output.js +0 -539
  275. package/dist/output.js.map +0 -1
  276. package/dist/prompt.d.ts +0 -17
  277. package/dist/prompt.js +0 -70
  278. package/dist/prompt.js.map +0 -1
  279. package/dist/version.d.ts +0 -2
  280. package/dist/version.js +0 -14
  281. package/dist/version.js.map +0 -1
package/README.md CHANGED
@@ -1,436 +1,77 @@
1
1
  # @usenaive-sdk/cli
2
2
 
3
- Command-line interface for the Naive API v2. Register, manage identity, and use all primitives directly from the terminal.
3
+ The `naive` command line — drive the whole Naive Managed Agents API from a terminal or a script: agents, sessions,
4
+ computers, skills, files, identities, vaults, comms, deployments, webhooks, the model proxy, the
5
+ monthly plan and credits.
4
6
 
5
- ## What It Provides
7
+ It is built on [`@usenaive-sdk/managed-agents`](https://www.npmjs.com/package/@usenaive-sdk/managed-agents), the same typed
8
+ client the dashboard uses, so the CLI and the API never drift apart.
6
9
 
7
- - **Auth & Onboarding** — Register new accounts, login, link existing ones, manage API keys
8
- - **Identity** — View agent profile, company, email inboxes, resources
9
- - **Domains** — List domains, connect custom domains (BYOD), view DNS records, verify, search, purchase
10
- - **Billing** — Plans, subscribe, upgrade, credit top-ups, billing portal
11
- - **Email** — Create/delete inboxes, send emails, read inboxes
12
- - **Search** — Web search, URL extraction, deep research
13
- - **Images** — Generate via fal.ai, search stock photos (dynamic pricing)
14
- - **Video** — Generate via fal.ai (dynamic pricing)
15
- - **Social** — Connect accounts, create posts, schedule, analytics (via bundle.social)
16
- - **Verification** — Identity verification (KYC) for company founders/members via Footprint
17
- - **Formation** — Company formation (LLC incorporation) via Doola ($349 fee via Stripe Checkout)
18
- - **Cards** — Virtual cards — create, fund, assign agents, track transactions (Stripe Issuing + Reloadly)
19
- - **Jobs** — List, inspect, and cancel async jobs
20
- - **Status** — Credit balance and usage history
21
-
22
- ## Local Development
23
-
24
- ### Prerequisites
25
-
26
- - Node.js 20+
27
- - pnpm 9+
28
-
29
- ### Setup
30
-
31
- ```bash
32
- # From monorepo root
33
- pnpm install
34
- ```
35
-
36
- ### Run (development)
37
-
38
- ```bash
39
- # Run any command directly with tsx
40
- pnpm --filter @usenaive-sdk/cli dev -- register --name "Test" --email test@example.com
41
-
42
- # Or from packages/cli
43
- cd packages/cli
44
- pnpm dev -- search "AI frameworks"
45
- ```
46
-
47
- ### Build
48
-
49
- ```bash
50
- pnpm --filter @usenaive-sdk/cli build
51
- ```
52
-
53
- ### Link locally (test as global binary)
10
+ ## Install
54
11
 
55
12
  ```bash
56
- cd packages/cli
57
- pnpm link --global
58
- naive --help
13
+ npm i -g @usenaive-sdk/cli
59
14
  ```
60
15
 
61
- ## Usage
62
-
63
- ### Configuration
64
-
65
- The CLI stores config at `~/.naive/config.json`:
66
-
67
- ```json
68
- {
69
- "api_key": "nv_sk_live_...",
70
- "base_url": "https://api.usenaive.ai"
71
- }
72
- ```
73
-
74
- Set via registration or environment:
75
-
76
- ```bash
77
- # Auto-saved on register/login/browser auth
78
- naive register --name "My Agent" --email owner@example.com --password yourpassword
79
-
80
- # Or set manually
81
- export NAIVE_API_KEY=nv_sk_live_...
82
- export NAIVE_BASE_URL=http://localhost:3100 # for local dev
83
- ```
84
-
85
- ### The durable runtime — `naive teams`
86
-
87
- The addressing tuple is `(company, tenant, team)` and it is in the path, not
88
- inferred, so `--tenant` is required on every subcommand except `list`. There is
89
- no default: `--tenant @self` is the only shorthand.
90
-
91
- ```bash
92
- naive teams list
93
- naive teams show support --tenant tu_8f21
94
- naive teams submit support "refund the duplicate charge" --tenant tu_8f21
95
- naive teams board support --tenant tu_8f21
96
- naive teams watch support --tenant tu_8f21 --run run_01J8 --follow # NDJSON
97
- naive teams approvals support --tenant tu_8f21
98
- naive teams decide support apr_01J --allow --because "verified with the customer"
99
- ```
100
-
101
- All 27 subcommands, their flags, their REST paths and their ActionIds are
102
- declared once in `src/lib/teams-catalog.ts`; `src/commands/teams.ts` builds the
103
- commander tree by walking it and declares no subcommand of its own.
104
-
105
- `--because` is a required *flag* (never a positional) on every op that widens
106
- authority or destroys state: `unblock decide settle model stop migrate rollback`.
107
-
108
- Exit codes it uses: `0` success · `1` error · `2` success with a diff
109
- (`plan --detailed-exitcode`) · `3` success where the terminal state is not
110
- success (`tasks|task --fail-on-unverified`, `watch --fail-on-terminal`).
111
- `unverified` is a third terminal state, and a CI script that reads `0` as "the
112
- work is done" would otherwise count an unattested task as a pass. The full
113
- CLI-wide ladder, including `4`, is under [Exit codes](#exit-codes).
114
-
115
- **Not yet served.** There is no `/v1/teams` mount on `packages/api` in this
116
- repository. Every `naive teams` subcommand therefore reaches the API's catch-all
117
- today, and the CLI says exactly that — it reports the missing *route*, not a
118
- missing team.
119
-
120
- ### Deprecation
121
-
122
- `ceo · tasks · objectives · employees · cron · loops · memory` drive the legacy
123
- orchestration runtime, which is frozen. **They all keep working**, unchanged.
124
- Each prints a one-line banner on stderr carrying a greppable `[dep.<group>]` id
125
- and its replacement, and attaches a `deprecation` object to the JSON envelope on
126
- stdout, so stdout stays `JSON.parse`-able. Nothing is disabled and no route is
127
- removed.
128
-
129
- Where a capability genuinely has no successor (`tasks complete`, `cron pause`,
130
- the provisioning verbs) the notice says so and gives the reason, rather than
131
- inventing a replacement — the record's `replacement` is a closed union, so a
132
- missing one cannot render as an empty string.
133
-
134
- ### Commands
16
+ ## First run
135
17
 
136
18
  ```bash
137
- # Auth
138
- naive register --name "Agent" --email user@example.com --password mypassword --company "Acme"
139
- naive login --email user@example.com --password mypassword
140
- naive auth email existing@example.com
19
+ printf '%s\n' "$KEY" | naive login # key on stdin; or: naive login --email … --password …
141
20
  naive whoami
142
- naive companies
143
- naive keys list
144
- naive keys create "Production"
145
- naive keys revoke <key-id>
146
-
147
- # Identity
148
- naive identity
149
- naive identity emails
150
- naive identity resources
151
-
152
- # CEO (orchestration)
153
- naive ceo run "Launch my product"
154
- naive ceo stream <runId>
155
- naive ceo message "Approved, hire the team"
156
- naive ceo status
157
- naive ceo sessions
158
-
159
- # Tasks (kanban)
160
- naive tasks list
161
- naive tasks list --status running --assignee "Jordan Kim"
162
- naive tasks create "Build landing page" --description "Responsive hero section" --assignee "Jordan Kim" --priority high
163
- naive tasks show <id> # Accepts UUID or hermes task ID (t_*)
164
- naive tasks complete <id> --summary "Deployed to prod"
165
- naive tasks block <id> --reason "Waiting for DNS"
166
- naive tasks unblock <id>
167
- naive tasks comment <id> "Added SEO meta tags"
168
- naive tasks dispatch
169
- naive tasks stats
170
-
171
- # Employees
172
- naive employees list
173
- naive employees hire --name "Jordan Kim" --role engineer --skills "typescript,react"
174
- naive employees fire <id>
175
- naive employees configure <id> --model gpt-4o
176
-
177
- # Objectives
178
- naive objectives list
179
- naive objectives create "Launch product" --criteria "100 signups"
180
- naive objectives update <id> --status completed
181
- naive objectives show <id>
182
-
183
- # Cron Jobs
184
- naive cron create "0 9 * * *" "Check email and summarize"
185
- naive cron list
186
- naive cron trigger <id>
187
- naive cron pause <id>
188
-
189
- # Memory
190
- naive memory add --target memory "Brand color is #FF6B00"
191
- naive memory list
192
- naive memory remove <id>
193
-
194
- # Domains
195
- naive domains # List all domains
196
- naive domains connect example.com # Connect a custom domain (BYOD)
197
- naive domains dns-records <domain-id> # Show required DNS records
198
- naive domains verify <domain-id> # Trigger domain verification
199
- naive domains search example.com # Check domain availability + price
200
- naive domains purchase example.com # Purchase a domain via Stripe
201
-
202
- # Billing
203
- naive billing plans # List plans with pricing
204
- naive billing subscribe --plan pro # Subscribe to a plan
205
- naive billing upgrade --plan pro # Upgrade existing subscription
206
- naive billing status # Check subscription + credits
207
- naive billing portal # Stripe billing management
208
- naive billing packs # List credit top-up packs
209
- naive billing topup --pack medium # Buy credits
210
-
211
- # LLM router — REQUIRES A PAID ACCOUNT (a pack or a plan; free credit is refused)
212
- naive llm models claude # Free, no payment needed
213
- naive llm chat -m openai/gpt-5.2 "hi" # exit 4 + decision_required until paid
214
-
215
- # Email
216
- naive email inboxes
217
- naive email create --local-part hello # Create new inbox on active domain
218
- naive email delete <inbox-id> # Delete an inbox
219
- naive email send --from-inbox <uuid> --to user@example.com --subject "Hi" --body "Hello"
220
- naive email inbox --inbox <uuid> --limit 20
221
- naive email sent --limit 20
222
- naive email read <email-id>
223
-
224
- # Search
225
- naive search "AI agent frameworks"
226
- naive search url https://example.com --extract "Main points?"
227
- naive search research "Compare React vs Astro" --depth thorough --wait
228
-
229
- # Images
230
- naive images generate "A tech logo" --model "fal-ai/flux-pro/v1.1" --wait
231
- naive images generate --input '{"prompt":"...","num_images":2}' --wait
232
- naive images status <job-id>
233
- naive images stock "office workspace" --count 5
234
- naive images models
235
-
236
- # Video
237
- naive video generate "Dog on beach" --model "fal-ai/kling-video/v3/pro/text-to-video" --duration 5 --wait
238
- naive video status <job-id>
239
- naive video models
240
-
241
- # Social
242
- naive social status # Check activation + accounts
243
- naive social activate # Activate social media
244
- naive social connect --platform twitter --redirect-url https://example.com # OAuth URL
245
- naive social portal --redirect-url https://example.com # Multi-platform portal
246
- naive social accounts # List connected accounts
247
- naive social label <account-id> --label "Main" # Label an account
248
- naive social disconnect <account-id> # Disconnect account
249
- naive social sync # Sync from bundle.social
250
- naive social upload --url https://example.com/video.mp4 # Upload media
251
- naive social posts # List posts
252
- naive social posts --status draft # Filter by status
253
- naive social post "Hello world!" --platforms twitter,linkedin --publish # Create + publish (2.5 credits; 3 for X)
254
- naive social post "Draft" --platforms twitter # Create draft (free)
255
- naive social post "Demo" --platforms youtube --media-url https://example.com/video.mp4 --youtube-type SHORT --publish
256
- naive social get <post-id> # Get post details
257
- naive social edit <post-id> --content "Updated" # Edit draft
258
- naive social delete <post-id> # Delete post
259
- naive social publish <post-id> # Publish draft (2.5 credits; 3 for X)
260
- naive social analytics <post-id> # Post analytics
261
- naive social comments <post-id> # Post comments
262
- naive social account-analytics <account-id> # Account analytics
263
-
264
- # Cards
265
- naive cards # List all cards
266
- naive cards cardholder # View cardholder
267
- 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
268
- naive cards create --name "Marketing" --spending-limit 10000 # Returns checkout URL
269
- naive cards check-payment <card-id> # Issue card after payment
270
- naive cards details <card-id> # Get PAN/CVC or redeem code
271
- naive cards top-up <card-id> --amount 5000 # Returns checkout URL
272
- naive cards cancel <card-id> # Cancel a card
273
- naive cards assign <card-id> --agent-id <uuid> # Assign agent
274
- naive cards unassign <card-id> <agent-id> # Remove assignment
275
- naive cards log-transaction <card-id> --amount 2500 --description "Purchase"
276
- naive cards transactions --card-id <uuid> # List transactions
277
-
278
- # Jobs
279
- naive jobs
280
- naive jobs --status processing
281
- naive jobs get <job-id>
282
- naive jobs cancel <job-id>
283
-
284
- # Status
285
- naive status
286
- naive usage --days 7
21
+ naive plan show # an org with no plan is refused everywhere else
287
22
  ```
288
23
 
289
- ### Global Options
24
+ Credentials are stored on a named profile, so several organizations can be driven from one machine
25
+ with `--profile`.
290
26
 
291
- ```
292
- --api-key <key> Override API key (env: NAIVE_API_KEY)
293
- --base-url <url> Override base URL (env: NAIVE_BASE_URL)
294
- --help Show help
295
- --version Show version
296
- ```
27
+ ## Shape
297
28
 
298
- ### Which stream the envelope is on
299
-
300
- **stdout is the machine document on every outcome.** The success envelope
301
- (`{success:true, action, result, next_steps, …}`) and the failure envelope
302
- (`{success:false, action, error, recovery_steps}`) both go to stdout, so
303
- `naive <anything> | jq` and any agent reading stdout gets an answer whether the
304
- command worked or not — including the `recovery_steps` that are its route out.
305
- Exit code is still `1` on failure.
306
-
307
- **stderr carries only human-facing noise**: the deprecation banner, the
308
- update-available box, the "try human mode" tip, and — in `--human` mode only —
309
- the red `✗ … failed` diagnostic. Nothing on stderr is required to understand
310
- what happened; stdout stays `JSON.parse`-able whole.
311
-
312
- ### Exit codes
313
-
314
- | code | meaning |
315
- |---|---|
316
- | `0` | success |
317
- | `1` | error |
318
- | `2` | success, and a diff exists (`teams plan --detailed-exitcode`) |
319
- | `3` | success, and the terminal state is not success (`--fail-on-unverified`, `--fail-on-terminal`) |
320
- | `4` | **a human has to decide this, and nothing was done** |
321
-
322
- `4` exists because `1` is the code every caller retries. It means the command
323
- did not fail in any way that re-running can fix — the way forward is known,
324
- there is more than one of them, and picking between them is not the CLI's to do.
325
- The envelope carries a `decision_required` object alongside the usual `error`:
326
-
327
- ```jsonc
328
- {
329
- "success": false,
330
- "action": "llm.chat",
331
- "error": { "code": "llm_routing_requires_payment", "retryable": false, "balance": 20, … },
332
- "decision_required": {
333
- "question": "The LLM router needs paid credit on this account. Add a subscription, buy credits, or stop here?",
334
- "because": "Both ways out spend real money, and they are not the same deal…",
335
- "options": [ { "id": "topup", "label": …, "command": "naive billing topup --pack medium" }, … ],
336
- "chosen": null // null ⇒ NOTHING was decided on your behalf
337
- },
338
- "recovery_steps": [ … ] // reads only — never a purchase
339
- }
29
+ ```
30
+ naive <group> <command> [flags]
340
31
  ```
341
32
 
342
- An agent relays `decision_required` to its operator and stops. It does not pick.
343
- The purchases appear only under `options`, never in `recovery_steps`, because
344
- `recovery_steps` is the array every other error on this surface teaches an agent
345
- to just run.
33
+ Groups: `agent` `audit` `auth` `computer` `connections` `credits` `deploy` `domain` `email` `file`
34
+ `identity` `keys` `login` `logout` `models` `org` `phone` `plan` `proxy` `run` `session` `skill`
35
+ `vault` `webhook` `whoami`.
346
36
 
347
- **Today the only source is the LLM router.** `naive llm chat` (and `/v1/llm/*`,
348
- and the provider proxies) require a **paid** account: free and comped credit do
349
- not buy model routing, at any balance. Any credit pack or any subscription
350
- unlocks it permanently. At a real interactive terminal (`--human` + a TTY) the
351
- CLI asks the question instead of only printing it — and still only echoes the
352
- chosen command, never runs it, since a keystroke at an unbidden prompt is not
353
- consent to open a Stripe checkout.
37
+ `naive <group> --help` lists a group's commands.
354
38
 
355
- ## Production / Publishing
39
+ Global flags: `--json` (the default) · `--human` · `--profile <name>` · `--api-key <key>` ·
40
+ `--org <org_id>` · `--api-base-url <url>`
356
41
 
357
- ### Publish to npm
42
+ ## Example
358
43
 
359
44
  ```bash
360
- cd packages/cli
361
- pnpm build
362
- npm publish --access public
363
- ```
45
+ # Create an agent, run one task, and read what it cost.
46
+ naive agent create \
47
+ --name summariser \
48
+ --model openai/gpt-oss-120b \
49
+ --system "Answer in one sentence." \
50
+ --budget-usd 2.00 --max-task-usd 0.10 --budget-period day
364
51
 
365
- Users install with:
366
-
367
- ```bash
368
- npm install -g @usenaive-sdk/cli
369
- naive --help
52
+ naive session run --agent agt_… --message "What is 17 times 3?"
53
+ naive session get ses_… --human
370
54
  ```
371
55
 
372
- ### Use without installing
373
-
374
56
  ```bash
375
- npx @usenaive-sdk/cli register --name "My Agent" --email user@example.com
376
- npx @usenaive-sdk/cli search "AI frameworks"
377
- ```
378
-
379
- ## Architecture
57
+ # Let one agent read a short list of trusted hosts, and nothing else on the open web.
58
+ naive agent tools agt_… --tool web_fetch --allow-domain docs.example.com --max-content-tokens 2000
380
59
 
60
+ # Point an existing Messages-format client at the same models, and check it answers.
61
+ naive proxy url --human
62
+ naive proxy message --model openai/gpt-oss-120b --text "Name three sorting algorithms."
381
63
  ```
382
- src/
383
- ├── index.ts # Entry point, commander program setup
384
- ├── config.ts # ~/.naive/config.json read/write
385
- ├── client.ts # HTTP client (fetch wrapper with auth + error handling)
386
- ├── output.ts # Structured agent-native JSON output (agentOutput/agentError)
387
- └── commands/
388
- ├── ceo.ts # naive ceo (run/message/status/sessions/stream)
389
- ├── tasks.ts # naive tasks (list/create/show/complete/block/unblock/comment/dispatch/stats)
390
- ├── employees.ts # naive employees (list/hire/fire/configure)
391
- ├── objectives.ts # naive objectives (list/create/update/show)
392
- ├── memory.ts # naive memory (add/list/remove)
393
- ├── cron-jobs.ts # naive cron (create/list/trigger/pause/resume/delete)
394
- ├── register.ts # naive register
395
- ├── login.ts # naive login
396
- ├── link.ts # naive link
397
- ├── whoami.ts # naive whoami
398
- ├── companies.ts # naive companies
399
- ├── keys.ts # naive keys
400
- ├── identity.ts # naive identity
401
- ├── status.ts # naive status
402
- ├── usage.ts # naive usage
403
- ├── domains.ts # naive domains (list/connect/dns-records/verify/search/purchase)
404
- ├── billing.ts # naive billing (plans/subscribe/upgrade/status/portal/packs/topup)
405
- ├── email.ts # naive email (inboxes/create/delete/send/inbox/read)
406
- ├── search.ts # naive search (web/url/research)
407
- ├── images.ts # naive images (generate/stock/models)
408
- ├── video.ts # naive video (generate/models)
409
- ├── social.ts # naive social (status/activate/connect/portal/accounts/label/disconnect/sync/upload/posts/post/get/edit/delete/publish/analytics/comments/account-analytics)
410
- ├── verification.ts # naive verification (start/list/status/complete/resend)
411
- ├── formation.ts # naive formation (naics-codes/submit/retry-payment/execute/list/status/documents/download)
412
- ├── cards.ts # naive cards (list/cardholder/create-cardholder/create/details/check-payment/retry-issue/top-up/refund/cancel/assignments/assign/unassign/log-transaction/transactions)
413
- └── jobs.ts # naive jobs (list/get/cancel)
414
- ```
415
-
416
64
 
417
- ## Purpose
418
65
 
419
- Naïve CLI — provision and govern a real-world agent profile per agent (identity, card, comms, runtime). Formerly @usenaive/cli.
66
+ ## Output
420
67
 
421
- ## Consumers
68
+ `--json` is the default because the CLI is meant to be piped. Every command writes a single JSON
69
+ document to stdout and nothing else; diagnostics go to stderr. `--human` switches to a readable
70
+ table when you are driving it yourself.
422
71
 
423
- Part of the Naive monorepo. See the [root README](../../README.md) for how components fit together and which packages depend on this one.
424
-
425
- ## Run standalone
426
-
427
- ```bash
428
- pnpm --filter @usenaive-sdk/cli dev
429
- pnpm --filter @usenaive-sdk/cli build
430
- pnpm --filter @usenaive-sdk/cli test
431
- pnpm --filter @usenaive-sdk/cli typecheck
432
- ```
72
+ Exit codes follow the API's error taxonomy, so a script can branch on the failure rather than
73
+ parsing a message.
433
74
 
434
- ## Place in the topology
75
+ ## License
435
76
 
436
- One node in the Naive monorepo (open plumbing). The [root README](../../README.md) has the full architecture diagram.
77
+ MIT