@withone/cli 1.13.9 → 1.15.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
CHANGED
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
One CLI
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<img src="https://assets.withone.ai/banners/cli.png" alt="One CLI - Connect your agents to every API on the internet." style="border-radius: 5px;">
|
|
2
|
+
|
|
3
|
+
<h3 align="center">One CLI</h3>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://withone.ai"><strong>Website</strong></a>
|
|
7
|
+
·
|
|
8
|
+
<a href="https://withone.ai/docs"><strong>Docs</strong></a>
|
|
9
|
+
·
|
|
10
|
+
<a href="https://app.withone.ai"><strong>Dashboard</strong></a>
|
|
11
|
+
·
|
|
12
|
+
<a href="https://withone.ai/changelog"><strong>Changelog</strong></a>
|
|
13
|
+
·
|
|
14
|
+
<a href="https://x.com/withoneai"><strong>X</strong></a>
|
|
15
|
+
·
|
|
16
|
+
<a href="https://linkedin.com/company/withoneai"><strong>LinkedIn</strong></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://npmjs.com/package/@withone/cli"><img src="https://img.shields.io/npm/v/%40withone%2Fcli" alt="npm version"></a>
|
|
21
|
+
|
|
22
|
+
<a href="https://withone.ai/knowledge"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fapi.withone.ai%2Fopen%2Fcount%2Fplatforms" alt="platforms"></a>
|
|
23
|
+
|
|
24
|
+
<a href="https://withone.ai/knowledge"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fapi.withone.ai%2Fopen%2Fcount%2Ftools" alt="tools"></a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
One gives your AI agent authenticated access to 250+ 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
28
|
|
|
7
29
|
## Install
|
|
8
30
|
|
|
@@ -41,7 +63,7 @@ one actions execute gmail <actionId> <connectionKey> \
|
|
|
41
63
|
-d '{"to": "jane@example.com", "subject": "Hello", "body": "Sent from my AI agent"}'
|
|
42
64
|
```
|
|
43
65
|
|
|
44
|
-
That's it. Five commands to go from zero to sending an email through Gmail's API
|
|
66
|
+
That's it. Five commands to go from zero to sending an email through Gmail's API - fully authenticated, correctly formatted, without touching a single OAuth token.
|
|
45
67
|
|
|
46
68
|
### Multi-step flows
|
|
47
69
|
|
|
@@ -72,7 +94,7 @@ one flow create welcome-customer --definition '{
|
|
|
72
94
|
# Validate it
|
|
73
95
|
one flow validate welcome-customer
|
|
74
96
|
|
|
75
|
-
# Run it
|
|
97
|
+
# Run it - connection keys auto-resolve if you have one connection per platform
|
|
76
98
|
one flow execute welcome-customer -i email=jane@example.com
|
|
77
99
|
```
|
|
78
100
|
|
|
@@ -90,7 +112,7 @@ Your AI Agent
|
|
|
90
112
|
Gmail / Slack / Shopify / HubSpot / Stripe / ...
|
|
91
113
|
```
|
|
92
114
|
|
|
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
|
|
115
|
+
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
116
|
|
|
95
117
|
## Commands
|
|
96
118
|
|
|
@@ -122,7 +144,7 @@ one add hub-spot
|
|
|
122
144
|
one add gmail
|
|
123
145
|
```
|
|
124
146
|
|
|
125
|
-
Opens your browser, you authorize, done. The CLI polls until the connection is live. Platform names are kebab-case
|
|
147
|
+
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
148
|
|
|
127
149
|
### `one list`
|
|
128
150
|
|
|
@@ -164,7 +186,7 @@ Returns the top 5 matching actions with their action IDs, HTTP methods, and path
|
|
|
164
186
|
|
|
165
187
|
### `one actions knowledge <platform> <actionId>`
|
|
166
188
|
|
|
167
|
-
Get the full documentation for an action
|
|
189
|
+
Get the full documentation for an action - parameters, validation rules, request/response structure, examples, and the exact API request format.
|
|
168
190
|
|
|
169
191
|
```bash
|
|
170
192
|
one actions knowledge shopify 67890abcdef
|
|
@@ -250,16 +272,16 @@ Execute a workflow by key or file path. Pass inputs with repeatable `-i` flags.
|
|
|
250
272
|
one flow execute welcome-customer \
|
|
251
273
|
-i customerEmail=jane@example.com
|
|
252
274
|
|
|
253
|
-
# Dry run
|
|
275
|
+
# Dry run - validate and show plan without executing
|
|
254
276
|
one flow execute welcome-customer --dry-run -i customerEmail=jane@example.com
|
|
255
277
|
|
|
256
|
-
# Verbose
|
|
278
|
+
# Verbose - show each step as it runs
|
|
257
279
|
one flow execute welcome-customer -v -i customerEmail=jane@example.com
|
|
258
280
|
```
|
|
259
281
|
|
|
260
282
|
Connection inputs with a `connection` field in the workflow definition are auto-resolved when the user has exactly one connection for that platform.
|
|
261
283
|
|
|
262
|
-
Press Ctrl+C during execution to pause
|
|
284
|
+
Press Ctrl+C during execution to pause - the run can be resumed later with `one flow resume <runId>`.
|
|
263
285
|
|
|
264
286
|
| Option | What it does |
|
|
265
287
|
|--------|-------------|
|
|
@@ -304,7 +326,7 @@ one flow runs welcome-customer # runs for a specific workflow
|
|
|
304
326
|
|
|
305
327
|
### `one config`
|
|
306
328
|
|
|
307
|
-
Configure access control for the MCP server. Optional
|
|
329
|
+
Configure access control for the MCP server. Optional - full access is the default.
|
|
308
330
|
|
|
309
331
|
```bash
|
|
310
332
|
one config
|
|
@@ -345,7 +367,7 @@ Workflows support conditions, loops, while loops, parallel execution, transforms
|
|
|
345
367
|
|
|
346
368
|
## For AI agents
|
|
347
369
|
|
|
348
|
-
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
|
|
370
|
+
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.
|
|
349
371
|
|
|
350
372
|
If you're an AI agent using the One MCP server, the tools map directly:
|
|
351
373
|
|
|
@@ -356,7 +378,7 @@ If you're an AI agent using the One MCP server, the tools map directly:
|
|
|
356
378
|
| `get_one_action_knowledge` | `one actions knowledge` |
|
|
357
379
|
| `execute_one_action` | `one actions execute` |
|
|
358
380
|
|
|
359
|
-
The workflow is the same: list → search → knowledge → execute. Never skip the knowledge step
|
|
381
|
+
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.
|
|
360
382
|
|
|
361
383
|
## MCP server installation
|
|
362
384
|
|
|
@@ -365,9 +387,9 @@ The workflow is the same: list → search → knowledge → execute. Never skip
|
|
|
365
387
|
| Agent | Global | Project |
|
|
366
388
|
|-------|--------|---------|
|
|
367
389
|
| Claude Code | `~/.claude.json` | `.mcp.json` |
|
|
368
|
-
| Claude Desktop | Platform-specific app support dir |
|
|
390
|
+
| Claude Desktop | Platform-specific app support dir | - |
|
|
369
391
|
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` |
|
|
370
|
-
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
|
|
392
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` | - |
|
|
371
393
|
| Codex | `~/.codex/config.toml` | `.codex/config.toml` |
|
|
372
394
|
| Kiro | `~/.kiro/settings/mcp.json` | `.kiro/settings/mcp.json` |
|
|
373
395
|
|
|
@@ -234,6 +234,40 @@ var OneApi = class {
|
|
|
234
234
|
responseData
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
+
// Webhook Relay methods
|
|
238
|
+
async createRelayEndpoint(body) {
|
|
239
|
+
return this.requestFull({ path: "/webhooks/relay", method: "POST", body });
|
|
240
|
+
}
|
|
241
|
+
async listRelayEndpoints(query) {
|
|
242
|
+
return this.requestFull({ path: "/webhooks/relay", queryParams: query });
|
|
243
|
+
}
|
|
244
|
+
async getRelayEndpoint(id) {
|
|
245
|
+
return this.requestFull({ path: `/webhooks/relay/${id}` });
|
|
246
|
+
}
|
|
247
|
+
async updateRelayEndpoint(id, body) {
|
|
248
|
+
return this.requestFull({ path: `/webhooks/relay/${id}`, method: "PATCH", body });
|
|
249
|
+
}
|
|
250
|
+
async deleteRelayEndpoint(id) {
|
|
251
|
+
return this.requestFull({ path: `/webhooks/relay/${id}`, method: "DELETE" });
|
|
252
|
+
}
|
|
253
|
+
async activateRelayEndpoint(id, body) {
|
|
254
|
+
return this.requestFull({ path: `/webhooks/relay/${id}/activate`, method: "POST", body });
|
|
255
|
+
}
|
|
256
|
+
async listRelayEvents(query) {
|
|
257
|
+
return this.requestFull({ path: "/webhooks/relay/events", queryParams: query });
|
|
258
|
+
}
|
|
259
|
+
async getRelayEvent(id) {
|
|
260
|
+
return this.requestFull({ path: `/webhooks/relay/events/${id}` });
|
|
261
|
+
}
|
|
262
|
+
async listRelayEndpointDeliveries(endpointId) {
|
|
263
|
+
return this.requestFull({ path: `/webhooks/relay/${endpointId}/deliveries` });
|
|
264
|
+
}
|
|
265
|
+
async listRelayEventDeliveries(eventId) {
|
|
266
|
+
return this.requestFull({ path: `/webhooks/relay/events/${eventId}/deliveries` });
|
|
267
|
+
}
|
|
268
|
+
async listRelayEventTypes(platform) {
|
|
269
|
+
return this.requestFull({ path: "/webhooks/relay/event-types", queryParams: { platform } });
|
|
270
|
+
}
|
|
237
271
|
async waitForConnection(platform, timeoutMs = 5 * 60 * 1e3, pollIntervalMs = 5e3, onPoll) {
|
|
238
272
|
const startTime = Date.now();
|
|
239
273
|
const existingConnections = await this.listConnections();
|
|
@@ -667,7 +701,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
|
|
|
667
701
|
if (flowStack.includes(resolvedKey)) {
|
|
668
702
|
throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
|
|
669
703
|
}
|
|
670
|
-
const { loadFlow: loadFlow2 } = await import("./flow-runner-
|
|
704
|
+
const { loadFlow: loadFlow2 } = await import("./flow-runner-7RUK2WMF.js");
|
|
671
705
|
const subFlow = loadFlow2(resolvedKey);
|
|
672
706
|
const subContext = await executeFlow(
|
|
673
707
|
subFlow,
|