@11x.agency/n8n-cli 1.0.0 → 1.0.1
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 +22 -4
- package/dist/index.js +8 -8
- package/dist/lib/api.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
# n8n-
|
|
1
|
+
# @11x.agency/n8n-cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@11x.agency/n8n-cli)
|
|
4
|
+
[](LICENSE)
|
|
2
5
|
|
|
3
6
|
Lightweight CLI wrapper around the n8n REST API — built for AI agents.
|
|
4
7
|
|
|
@@ -7,7 +10,13 @@ Fast, direct REST API calls for workflow management without MCP protocol overhea
|
|
|
7
10
|
## Install
|
|
8
11
|
|
|
9
12
|
```bash
|
|
10
|
-
npm install -g n8n-
|
|
13
|
+
npm install -g @11x.agency/n8n-cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or run directly without installing:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @11x.agency/n8n-cli <command>
|
|
11
20
|
```
|
|
12
21
|
|
|
13
22
|
## Setup
|
|
@@ -36,6 +45,13 @@ n8n-cli doctor # Check API connectivity
|
|
|
36
45
|
|
|
37
46
|
Use `--json` or `--quiet` for machine-readable output.
|
|
38
47
|
|
|
48
|
+
With `npx`:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx @11x.agency/n8n-cli workflow list --json
|
|
52
|
+
npx @11x.agency/n8n-cli doctor
|
|
53
|
+
```
|
|
54
|
+
|
|
39
55
|
## Claude Code Plugin
|
|
40
56
|
|
|
41
57
|
Use this CLI with Claude Code via the [11x marketplace plugin](https://github.com/11x-agency/claude-marketplace/tree/main/plugins/n8n-agent-cli):
|
|
@@ -45,9 +61,11 @@ Use this CLI with Claude Code via the [11x marketplace plugin](https://github.co
|
|
|
45
61
|
/plugin install n8n-agent-cli@11x-marketplace
|
|
46
62
|
```
|
|
47
63
|
|
|
48
|
-
##
|
|
64
|
+
## Links
|
|
49
65
|
|
|
50
|
-
|
|
66
|
+
- **npm:** [npmjs.com/package/@11x.agency/n8n-cli](https://www.npmjs.com/package/@11x.agency/n8n-cli)
|
|
67
|
+
- **GitHub:** [github.com/robinsadeghpour/n8n-cli](https://github.com/robinsadeghpour/n8n-cli)
|
|
68
|
+
- **Issues:** [github.com/robinsadeghpour/n8n-cli/issues](https://github.com/robinsadeghpour/n8n-cli/issues)
|
|
51
69
|
|
|
52
70
|
## License
|
|
53
71
|
|
package/dist/index.js
CHANGED
|
@@ -57,8 +57,8 @@ workflow
|
|
|
57
57
|
.action(async () => {
|
|
58
58
|
try {
|
|
59
59
|
const api = new N8nApi(getConfig());
|
|
60
|
-
const
|
|
61
|
-
output(workflows, program.opts());
|
|
60
|
+
const result = await api.listWorkflows();
|
|
61
|
+
output(result.data || result.workflows || result, program.opts());
|
|
62
62
|
}
|
|
63
63
|
catch (err) {
|
|
64
64
|
errorExit(`Error: ${err.message}`);
|
|
@@ -167,8 +167,8 @@ execution
|
|
|
167
167
|
.action(async (opts) => {
|
|
168
168
|
try {
|
|
169
169
|
const api = new N8nApi(getConfig());
|
|
170
|
-
const
|
|
171
|
-
output(data, program.opts());
|
|
170
|
+
const result = await api.listExecutions(parseInt(opts.limit), opts.status);
|
|
171
|
+
output(result.data || result, program.opts());
|
|
172
172
|
}
|
|
173
173
|
catch (err) {
|
|
174
174
|
errorExit(`Error: ${err.message}`);
|
|
@@ -234,8 +234,8 @@ variable
|
|
|
234
234
|
.action(async () => {
|
|
235
235
|
try {
|
|
236
236
|
const api = new N8nApi(getConfig());
|
|
237
|
-
const
|
|
238
|
-
output(variables, program.opts());
|
|
237
|
+
const result = await api.listVariables();
|
|
238
|
+
output(result.data || result.variables || result, program.opts());
|
|
239
239
|
}
|
|
240
240
|
catch (err) {
|
|
241
241
|
errorExit(`Error: ${err.message}`);
|
|
@@ -288,8 +288,8 @@ tag
|
|
|
288
288
|
.action(async () => {
|
|
289
289
|
try {
|
|
290
290
|
const api = new N8nApi(getConfig());
|
|
291
|
-
const
|
|
292
|
-
output(tags, program.opts());
|
|
291
|
+
const result = await api.listTags();
|
|
292
|
+
output(result.data || result.tags || result, program.opts());
|
|
293
293
|
}
|
|
294
294
|
catch (err) {
|
|
295
295
|
errorExit(`Error: ${err.message}`);
|
package/dist/lib/api.js
CHANGED
|
@@ -99,7 +99,9 @@ export class N8nApi {
|
|
|
99
99
|
}
|
|
100
100
|
// Health
|
|
101
101
|
async ping() {
|
|
102
|
-
|
|
102
|
+
// n8n cloud has no root endpoint; use /workflows as health check
|
|
103
|
+
await this.request('/workflows?limit=1');
|
|
104
|
+
return { version: 'connected' };
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
export function getConfig() {
|