@picahq/cli 1.10.0 → 1.11.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.
- package/README.md +86 -86
- package/dist/index.js +171 -171
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# One CLI
|
|
2
2
|
|
|
3
3
|
One CLI to connect AI agents to every API on the internet.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
One gives your AI agent authenticated access to 200+ platforms — Gmail, Slack, Shopify, HubSpot, Stripe, Notion, and everything else — through a single interface. No API keys to juggle, no OAuth flows to build, no request formats to memorize. Connect a platform once, and your agent can search for actions, read the docs, and execute API calls in seconds.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -14,10 +14,10 @@ Or install globally:
|
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npm install -g @picahq/cli
|
|
17
|
-
|
|
17
|
+
one init
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
`
|
|
20
|
+
`one init` walks you through setup: enter your [API key](https://app.withone.ai/settings/api-keys), pick your AI agents, and you're done. The MCP server gets installed automatically.
|
|
21
21
|
|
|
22
22
|
Requires Node.js 18+.
|
|
23
23
|
|
|
@@ -25,19 +25,19 @@ Requires Node.js 18+.
|
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
# Connect a platform
|
|
28
|
-
|
|
28
|
+
one add gmail
|
|
29
29
|
|
|
30
30
|
# See what you're connected to
|
|
31
|
-
|
|
31
|
+
one list
|
|
32
32
|
|
|
33
33
|
# Search for actions you can take
|
|
34
|
-
|
|
34
|
+
one actions search gmail "send email" -t execute
|
|
35
35
|
|
|
36
36
|
# Read the docs for an action
|
|
37
|
-
|
|
37
|
+
one actions knowledge gmail <actionId>
|
|
38
38
|
|
|
39
39
|
# Execute it
|
|
40
|
-
|
|
40
|
+
one actions execute gmail <actionId> <connectionKey> \
|
|
41
41
|
-d '{"to": "jane@example.com", "subject": "Hello", "body": "Sent from my AI agent"}'
|
|
42
42
|
```
|
|
43
43
|
|
|
@@ -49,7 +49,7 @@ Chain actions across platforms into reusable workflows:
|
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
# Create a flow that looks up a Stripe customer and sends a Gmail welcome email
|
|
52
|
-
|
|
52
|
+
one flow create welcome-customer --definition '{
|
|
53
53
|
"key": "welcome-customer",
|
|
54
54
|
"name": "Welcome New Customer",
|
|
55
55
|
"version": "1",
|
|
@@ -70,41 +70,41 @@ pica flow create welcome-customer --definition '{
|
|
|
70
70
|
}'
|
|
71
71
|
|
|
72
72
|
# Validate it
|
|
73
|
-
|
|
73
|
+
one flow validate welcome-customer
|
|
74
74
|
|
|
75
75
|
# Run it — connection keys auto-resolve if you have one connection per platform
|
|
76
|
-
|
|
76
|
+
one flow execute welcome-customer -i email=jane@example.com
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
Flows are stored as JSON at `.one/flows/<key>.flow.json` and support conditions, loops, parallel steps, transforms, and more. Run `
|
|
79
|
+
Flows are stored as JSON at `.one/flows/<key>.flow.json` and support conditions, loops, parallel steps, transforms, and more. Run `one guide flows` for the full reference.
|
|
80
80
|
|
|
81
81
|
## How it works
|
|
82
82
|
|
|
83
83
|
```
|
|
84
84
|
Your AI Agent
|
|
85
85
|
↓
|
|
86
|
-
|
|
86
|
+
One CLI
|
|
87
87
|
↓
|
|
88
|
-
|
|
88
|
+
One API (api.withone.ai/v1/passthrough)
|
|
89
89
|
↓
|
|
90
90
|
Gmail / Slack / Shopify / HubSpot / Stripe / ...
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Every API call routes through
|
|
93
|
+
Every API call routes through One's passthrough proxy. One injects the right credentials, handles rate limiting, and normalizes responses. You never see or manage raw OAuth tokens — your connection key is all you need.
|
|
94
94
|
|
|
95
95
|
## Commands
|
|
96
96
|
|
|
97
|
-
### `
|
|
97
|
+
### `one init`
|
|
98
98
|
|
|
99
99
|
Set up your API key and install the MCP server into your AI agents.
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
|
-
|
|
102
|
+
one init
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
Supports Claude Code, Claude Desktop, Cursor, Windsurf, Codex, and Kiro. Installs globally by default, or per-project with `-p` so your team can share configs (each person uses their own API key).
|
|
106
106
|
|
|
107
|
-
If you've already set up, `
|
|
107
|
+
If you've already set up, `one init` shows your current status and lets you update your key, install to more agents, or reconfigure.
|
|
108
108
|
|
|
109
109
|
| Flag | What it does |
|
|
110
110
|
|------|-------------|
|
|
@@ -112,24 +112,24 @@ If you've already set up, `pica init` shows your current status and lets you upd
|
|
|
112
112
|
| `-g` | Install globally (default) |
|
|
113
113
|
| `-p` | Install for current project only |
|
|
114
114
|
|
|
115
|
-
### `
|
|
115
|
+
### `one add <platform>`
|
|
116
116
|
|
|
117
117
|
Connect a new platform via OAuth.
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
one add shopify
|
|
121
|
+
one add hub-spot
|
|
122
|
+
one add gmail
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
Opens your browser, you authorize, done. The CLI polls until the connection is live. Platform names are kebab-case — run `
|
|
125
|
+
Opens your browser, you authorize, done. The CLI polls until the connection is live. Platform names are kebab-case — run `one platforms` to see them all.
|
|
126
126
|
|
|
127
|
-
### `
|
|
127
|
+
### `one list`
|
|
128
128
|
|
|
129
129
|
List your active connections with their status and connection keys.
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
|
|
132
|
+
one list
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
```
|
|
@@ -140,56 +140,56 @@ pica list
|
|
|
140
140
|
|
|
141
141
|
You need the connection key (rightmost column) when executing actions.
|
|
142
142
|
|
|
143
|
-
### `
|
|
143
|
+
### `one platforms`
|
|
144
144
|
|
|
145
145
|
Browse all 200+ available platforms.
|
|
146
146
|
|
|
147
147
|
```bash
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
one platforms # all platforms
|
|
149
|
+
one platforms -c "CRM" # filter by category
|
|
150
|
+
one platforms --json # machine-readable output
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
### `
|
|
153
|
+
### `one actions search <platform> <query>`
|
|
154
154
|
|
|
155
155
|
Search for API actions on a connected platform using natural language.
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
one actions search shopify "list products"
|
|
159
|
+
one actions search hub-spot "create contact" -t execute
|
|
160
|
+
one actions search gmail "send email"
|
|
161
161
|
```
|
|
162
162
|
|
|
163
163
|
Returns the top 5 matching actions with their action IDs, HTTP methods, and paths. Use `-t execute` when you intend to run the action, or `-t knowledge` (default) when you want to learn about it or write code against it.
|
|
164
164
|
|
|
165
|
-
### `
|
|
165
|
+
### `one actions knowledge <platform> <actionId>`
|
|
166
166
|
|
|
167
167
|
Get the full documentation for an action — parameters, validation rules, request/response structure, examples, and the exact API request format.
|
|
168
168
|
|
|
169
169
|
```bash
|
|
170
|
-
|
|
170
|
+
one actions knowledge shopify 67890abcdef
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
Always read the knowledge before executing. It tells you exactly what parameters are required, what format they need, and any platform-specific quirks.
|
|
174
174
|
|
|
175
|
-
### `
|
|
175
|
+
### `one actions execute <platform> <actionId> <connectionKey>`
|
|
176
176
|
|
|
177
177
|
Execute an API action on a connected platform.
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
180
|
# Simple GET
|
|
181
|
-
|
|
181
|
+
one actions execute shopify <actionId> <connectionKey>
|
|
182
182
|
|
|
183
183
|
# POST with data
|
|
184
|
-
|
|
184
|
+
one actions execute hub-spot <actionId> <connectionKey> \
|
|
185
185
|
-d '{"properties": {"email": "jane@example.com", "firstname": "Jane"}}'
|
|
186
186
|
|
|
187
187
|
# With path variables
|
|
188
|
-
|
|
188
|
+
one actions execute shopify <actionId> <connectionKey> \
|
|
189
189
|
--path-vars '{"order_id": "12345"}'
|
|
190
190
|
|
|
191
191
|
# With query params
|
|
192
|
-
|
|
192
|
+
one actions execute stripe <actionId> <connectionKey> \
|
|
193
193
|
--query-params '{"limit": "10"}'
|
|
194
194
|
```
|
|
195
195
|
|
|
@@ -202,37 +202,37 @@ pica actions execute stripe <actionId> <connectionKey> \
|
|
|
202
202
|
| `--form-data` | Send as multipart/form-data |
|
|
203
203
|
| `--form-url-encoded` | Send as application/x-www-form-urlencoded |
|
|
204
204
|
|
|
205
|
-
### `
|
|
205
|
+
### `one guide [topic]`
|
|
206
206
|
|
|
207
207
|
Get the full CLI usage guide, designed for AI agents that only have the binary (no MCP, no IDE skills).
|
|
208
208
|
|
|
209
209
|
```bash
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
one guide # full guide (all topics)
|
|
211
|
+
one guide overview # setup, --agent flag, discovery workflow
|
|
212
|
+
one guide actions # search, knowledge, execute workflow
|
|
213
|
+
one guide flows # multi-step API workflows
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
one --agent guide # full guide as structured JSON
|
|
216
|
+
one --agent guide flows # single topic as JSON
|
|
217
217
|
```
|
|
218
218
|
|
|
219
219
|
Topics: `overview`, `actions`, `flows`, `all` (default).
|
|
220
220
|
|
|
221
221
|
In agent mode (`--agent`), the JSON response includes the guide content and an `availableTopics` array so agents can discover what sections exist.
|
|
222
222
|
|
|
223
|
-
### `
|
|
223
|
+
### `one flow create [key]`
|
|
224
224
|
|
|
225
225
|
Create a flow from a JSON definition. Flows are saved to `.one/flows/<key>.flow.json`.
|
|
226
226
|
|
|
227
227
|
```bash
|
|
228
228
|
# From a --definition flag
|
|
229
|
-
|
|
229
|
+
one flow create welcome-customer --definition '{"key":"welcome-customer","name":"Welcome","version":"1","inputs":{},"steps":[]}'
|
|
230
230
|
|
|
231
231
|
# From stdin
|
|
232
|
-
cat flow.json |
|
|
232
|
+
cat flow.json | one flow create
|
|
233
233
|
|
|
234
234
|
# Custom output path
|
|
235
|
-
|
|
235
|
+
one flow create my-flow --definition '...' -o ./custom/path.json
|
|
236
236
|
```
|
|
237
237
|
|
|
238
238
|
| Option | What it does |
|
|
@@ -240,25 +240,25 @@ pica flow create my-flow --definition '...' -o ./custom/path.json
|
|
|
240
240
|
| `--definition <json>` | Flow definition as a JSON string |
|
|
241
241
|
| `-o, --output <path>` | Custom output path (default: `.one/flows/<key>.flow.json`) |
|
|
242
242
|
|
|
243
|
-
### `
|
|
243
|
+
### `one flow execute <key>`
|
|
244
244
|
|
|
245
245
|
Execute a flow by key or file path. Pass inputs with repeatable `-i` flags.
|
|
246
246
|
|
|
247
247
|
```bash
|
|
248
248
|
# Execute with inputs
|
|
249
|
-
|
|
249
|
+
one flow execute welcome-customer \
|
|
250
250
|
-i customerEmail=jane@example.com
|
|
251
251
|
|
|
252
252
|
# Dry run — validate and show plan without executing
|
|
253
|
-
|
|
253
|
+
one flow execute welcome-customer --dry-run -i customerEmail=jane@example.com
|
|
254
254
|
|
|
255
255
|
# Verbose — show each step as it runs
|
|
256
|
-
|
|
256
|
+
one flow execute welcome-customer -v -i customerEmail=jane@example.com
|
|
257
257
|
```
|
|
258
258
|
|
|
259
259
|
Connection inputs with a `connection` field in the flow definition are auto-resolved when the user has exactly one connection for that platform.
|
|
260
260
|
|
|
261
|
-
Press Ctrl+C during execution to pause — the run can be resumed later with `
|
|
261
|
+
Press Ctrl+C during execution to pause — the run can be resumed later with `one flow resume <runId>`.
|
|
262
262
|
|
|
263
263
|
| Option | What it does |
|
|
264
264
|
|--------|-------------|
|
|
@@ -266,45 +266,45 @@ Press Ctrl+C during execution to pause — the run can be resumed later with `pi
|
|
|
266
266
|
| `--dry-run` | Validate and show execution plan without running |
|
|
267
267
|
| `-v, --verbose` | Show full request/response for each step |
|
|
268
268
|
|
|
269
|
-
### `
|
|
269
|
+
### `one flow list`
|
|
270
270
|
|
|
271
271
|
List all flows saved in `.one/flows/`.
|
|
272
272
|
|
|
273
273
|
```bash
|
|
274
|
-
|
|
274
|
+
one flow list
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
### `
|
|
277
|
+
### `one flow validate <key>`
|
|
278
278
|
|
|
279
279
|
Validate a flow JSON file against the schema.
|
|
280
280
|
|
|
281
281
|
```bash
|
|
282
|
-
|
|
282
|
+
one flow validate welcome-customer
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
-
### `
|
|
285
|
+
### `one flow resume <runId>`
|
|
286
286
|
|
|
287
287
|
Resume a paused or failed flow run from where it left off.
|
|
288
288
|
|
|
289
289
|
```bash
|
|
290
|
-
|
|
290
|
+
one flow resume abc123
|
|
291
291
|
```
|
|
292
292
|
|
|
293
|
-
### `
|
|
293
|
+
### `one flow runs [flowKey]`
|
|
294
294
|
|
|
295
295
|
List flow runs, optionally filtered by flow key.
|
|
296
296
|
|
|
297
297
|
```bash
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
one flow runs # all runs
|
|
299
|
+
one flow runs welcome-customer # runs for a specific flow
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
-
### `
|
|
302
|
+
### `one config`
|
|
303
303
|
|
|
304
304
|
Configure access control for the MCP server. Optional — full access is the default.
|
|
305
305
|
|
|
306
306
|
```bash
|
|
307
|
-
|
|
307
|
+
one config
|
|
308
308
|
```
|
|
309
309
|
|
|
310
310
|
| Setting | Options | Default |
|
|
@@ -318,13 +318,13 @@ Settings propagate automatically to all installed agent configs.
|
|
|
318
318
|
|
|
319
319
|
## The workflow
|
|
320
320
|
|
|
321
|
-
The power of
|
|
321
|
+
The power of One is in the workflow. Every interaction follows the same pattern:
|
|
322
322
|
|
|
323
323
|
```
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
one list → What am I connected to?
|
|
325
|
+
one actions search → What can I do?
|
|
326
|
+
one actions knowledge → How do I do it?
|
|
327
|
+
one actions execute → Do it.
|
|
328
328
|
```
|
|
329
329
|
|
|
330
330
|
This is the same workflow whether you're sending emails, creating CRM contacts, processing payments, managing inventory, or posting to Slack. One pattern, any platform.
|
|
@@ -332,32 +332,32 @@ This is the same workflow whether you're sending emails, creating CRM contacts,
|
|
|
332
332
|
For multi-step workflows that chain actions across platforms, use **flows**:
|
|
333
333
|
|
|
334
334
|
```
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
335
|
+
one actions knowledge → Learn each action's schema
|
|
336
|
+
one flow create → Define the workflow as JSON
|
|
337
|
+
one flow validate → Check it
|
|
338
|
+
one flow execute → Run it
|
|
339
339
|
```
|
|
340
340
|
|
|
341
|
-
Flows support conditions, loops, parallel execution, transforms, code steps, and file I/O. Run `
|
|
341
|
+
Flows support conditions, loops, parallel execution, transforms, code steps, and file I/O. Run `one guide flows` for the full schema reference and examples.
|
|
342
342
|
|
|
343
343
|
## For AI agents
|
|
344
344
|
|
|
345
|
-
If you're an AI agent with only the `
|
|
345
|
+
If you're an AI agent with only the `one` binary (no MCP server or IDE skills), start with `one --agent guide` to get the full usage guide as structured JSON. This teaches you the complete workflow, JSON schemas, selector syntax, and more — everything you need to bootstrap yourself.
|
|
346
346
|
|
|
347
|
-
If you're an AI agent using the
|
|
347
|
+
If you're an AI agent using the One MCP server, the tools map directly:
|
|
348
348
|
|
|
349
349
|
| MCP Tool | CLI Command |
|
|
350
350
|
|----------|------------|
|
|
351
|
-
| `
|
|
352
|
-
| `
|
|
353
|
-
| `
|
|
354
|
-
| `
|
|
351
|
+
| `list_one_integrations` | `one list` + `one platforms` |
|
|
352
|
+
| `search_one_platform_actions` | `one actions search` |
|
|
353
|
+
| `get_one_action_knowledge` | `one actions knowledge` |
|
|
354
|
+
| `execute_one_action` | `one actions execute` |
|
|
355
355
|
|
|
356
356
|
The workflow is the same: list → search → knowledge → execute. Never skip the knowledge step — it contains required parameter info and platform-specific details that are critical for building correct requests.
|
|
357
357
|
|
|
358
358
|
## MCP server installation
|
|
359
359
|
|
|
360
|
-
`
|
|
360
|
+
`one init` handles this automatically. Here's where configs go:
|
|
361
361
|
|
|
362
362
|
| Agent | Global | Project |
|
|
363
363
|
|-------|--------|---------|
|
|
@@ -368,7 +368,7 @@ The workflow is the same: list → search → knowledge → execute. Never skip
|
|
|
368
368
|
| Codex | `~/.codex/config.toml` | `.codex/config.toml` |
|
|
369
369
|
| Kiro | `~/.kiro/settings/mcp.json` | `.kiro/settings/mcp.json` |
|
|
370
370
|
|
|
371
|
-
Project configs can be committed to your repo. Each team member runs `
|
|
371
|
+
Project configs can be committed to your repo. Each team member runs `one init` with their own API key.
|
|
372
372
|
|
|
373
373
|
## Development
|
|
374
374
|
|