@xano/cli 0.0.7 → 0.0.8

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 (2) hide show
  1. package/oclif.manifest.json +391 -391
  2. package/package.json +1 -1
@@ -1,17 +1,33 @@
1
1
  {
2
2
  "commands": {
3
- "profile:get-default": {
3
+ "profile:delete": {
4
4
  "aliases": [],
5
- "args": {},
6
- "description": "Get the current default profile name",
5
+ "args": {
6
+ "name": {
7
+ "description": "Profile name to delete",
8
+ "name": "name",
9
+ "required": true
10
+ }
11
+ },
12
+ "description": "Delete a profile configuration",
7
13
  "examples": [
8
- "$ xano profile:get-default\nproduction\n",
9
- "$ xano profile:get-default\nNo default profile set\n"
14
+ "$ xano profile:delete old-profile\nAre you sure you want to delete profile 'old-profile'? (y/n): y\nProfile 'old-profile' deleted successfully from ~/.xano/credentials.yaml\n",
15
+ "$ xano profile:delete old-profile --force\nProfile 'old-profile' deleted successfully from ~/.xano/credentials.yaml\n",
16
+ "$ xano profile:delete old-profile -f\nProfile 'old-profile' deleted successfully from ~/.xano/credentials.yaml\n"
10
17
  ],
11
- "flags": {},
18
+ "flags": {
19
+ "force": {
20
+ "char": "f",
21
+ "description": "Skip confirmation prompt",
22
+ "name": "force",
23
+ "required": false,
24
+ "allowNo": false,
25
+ "type": "boolean"
26
+ }
27
+ },
12
28
  "hasDynamicHelp": false,
13
29
  "hiddenAliases": [],
14
- "id": "profile:get-default",
30
+ "id": "profile:delete",
15
31
  "pluginAlias": "@xano/cli",
16
32
  "pluginName": "@xano/cli",
17
33
  "pluginType": "core",
@@ -22,30 +38,30 @@
22
38
  "dist",
23
39
  "commands",
24
40
  "profile",
25
- "get-default",
41
+ "delete",
26
42
  "index.js"
27
43
  ]
28
44
  },
29
- "profile:create": {
45
+ "profile:edit": {
30
46
  "aliases": [],
31
47
  "args": {
32
48
  "name": {
33
- "description": "Profile name",
49
+ "description": "Profile name to edit",
34
50
  "name": "name",
35
51
  "required": true
36
52
  }
37
53
  },
38
- "description": "Create a new profile configuration",
54
+ "description": "Edit an existing profile configuration",
39
55
  "examples": [
40
- "$ xano profile:create production --account_origin https://account.xano.com --instance_origin https://instance.xano.com --access_token token123\nProfile 'production' created successfully at ~/.xano/credentials.yaml\n",
41
- "$ xano profile:create staging -a https://staging-account.xano.com -i https://staging-instance.xano.com -t token456\nProfile 'staging' created successfully at ~/.xano/credentials.yaml\n",
42
- "$ xano profile:create dev -i https://dev-instance.xano.com -t token789 -w my-workspace -b feature-branch\nProfile 'dev' created successfully at ~/.xano/credentials.yaml\n",
43
- "$ xano profile:create production --account_origin https://account.xano.com --instance_origin https://instance.xano.com --access_token token123 --default\nProfile 'production' created successfully at ~/.xano/credentials.yaml\nDefault profile set to 'production'\n"
56
+ "$ xano profile:edit production --access_token new_token123\nProfile 'production' updated successfully at ~/.xano/credentials.yaml\n",
57
+ "$ xano profile:edit staging -i https://new-staging-instance.xano.com -t new_token456\nProfile 'staging' updated successfully at ~/.xano/credentials.yaml\n",
58
+ "$ xano profile:edit dev -w new-workspace -b new-branch\nProfile 'dev' updated successfully at ~/.xano/credentials.yaml\n",
59
+ "$ xano profile:edit dev --remove-workspace\nProfile 'dev' updated successfully at ~/.xano/credentials.yaml\n"
44
60
  ],
45
61
  "flags": {
46
62
  "account_origin": {
47
63
  "char": "a",
48
- "description": "Account origin URL. Optional for self hosted installs.",
64
+ "description": "Update account origin URL",
49
65
  "name": "account_origin",
50
66
  "required": false,
51
67
  "hasDynamicHelp": false,
@@ -54,25 +70,25 @@
54
70
  },
55
71
  "instance_origin": {
56
72
  "char": "i",
57
- "description": "Instance origin URL",
73
+ "description": "Update instance origin URL",
58
74
  "name": "instance_origin",
59
- "required": true,
75
+ "required": false,
60
76
  "hasDynamicHelp": false,
61
77
  "multiple": false,
62
78
  "type": "option"
63
79
  },
64
80
  "access_token": {
65
81
  "char": "t",
66
- "description": "Access token for the Xano Metadata API",
82
+ "description": "Update access token for the Xano Metadata API",
67
83
  "name": "access_token",
68
- "required": true,
84
+ "required": false,
69
85
  "hasDynamicHelp": false,
70
86
  "multiple": false,
71
87
  "type": "option"
72
88
  },
73
89
  "workspace": {
74
90
  "char": "w",
75
- "description": "Workspace name",
91
+ "description": "Update workspace name",
76
92
  "name": "workspace",
77
93
  "required": false,
78
94
  "hasDynamicHelp": false,
@@ -81,16 +97,23 @@
81
97
  },
82
98
  "branch": {
83
99
  "char": "b",
84
- "description": "Branch name",
100
+ "description": "Update branch name",
85
101
  "name": "branch",
86
102
  "required": false,
87
103
  "hasDynamicHelp": false,
88
104
  "multiple": false,
89
105
  "type": "option"
90
106
  },
91
- "default": {
92
- "description": "Set this profile as the default",
93
- "name": "default",
107
+ "remove-workspace": {
108
+ "description": "Remove workspace from profile",
109
+ "name": "remove-workspace",
110
+ "required": false,
111
+ "allowNo": false,
112
+ "type": "boolean"
113
+ },
114
+ "remove-branch": {
115
+ "description": "Remove branch from profile",
116
+ "name": "remove-branch",
94
117
  "required": false,
95
118
  "allowNo": false,
96
119
  "type": "boolean"
@@ -98,7 +121,7 @@
98
121
  },
99
122
  "hasDynamicHelp": false,
100
123
  "hiddenAliases": [],
101
- "id": "profile:create",
124
+ "id": "profile:edit",
102
125
  "pluginAlias": "@xano/cli",
103
126
  "pluginName": "@xano/cli",
104
127
  "pluginType": "core",
@@ -109,30 +132,30 @@
109
132
  "dist",
110
133
  "commands",
111
134
  "profile",
112
- "create",
135
+ "edit",
113
136
  "index.js"
114
137
  ]
115
138
  },
116
- "profile:edit": {
139
+ "profile:create": {
117
140
  "aliases": [],
118
141
  "args": {
119
142
  "name": {
120
- "description": "Profile name to edit",
143
+ "description": "Profile name",
121
144
  "name": "name",
122
145
  "required": true
123
146
  }
124
147
  },
125
- "description": "Edit an existing profile configuration",
148
+ "description": "Create a new profile configuration",
126
149
  "examples": [
127
- "$ xano profile:edit production --access_token new_token123\nProfile 'production' updated successfully at ~/.xano/credentials.yaml\n",
128
- "$ xano profile:edit staging -i https://new-staging-instance.xano.com -t new_token456\nProfile 'staging' updated successfully at ~/.xano/credentials.yaml\n",
129
- "$ xano profile:edit dev -w new-workspace -b new-branch\nProfile 'dev' updated successfully at ~/.xano/credentials.yaml\n",
130
- "$ xano profile:edit dev --remove-workspace\nProfile 'dev' updated successfully at ~/.xano/credentials.yaml\n"
150
+ "$ xano profile:create production --account_origin https://account.xano.com --instance_origin https://instance.xano.com --access_token token123\nProfile 'production' created successfully at ~/.xano/credentials.yaml\n",
151
+ "$ xano profile:create staging -a https://staging-account.xano.com -i https://staging-instance.xano.com -t token456\nProfile 'staging' created successfully at ~/.xano/credentials.yaml\n",
152
+ "$ xano profile:create dev -i https://dev-instance.xano.com -t token789 -w my-workspace -b feature-branch\nProfile 'dev' created successfully at ~/.xano/credentials.yaml\n",
153
+ "$ xano profile:create production --account_origin https://account.xano.com --instance_origin https://instance.xano.com --access_token token123 --default\nProfile 'production' created successfully at ~/.xano/credentials.yaml\nDefault profile set to 'production'\n"
131
154
  ],
132
155
  "flags": {
133
156
  "account_origin": {
134
157
  "char": "a",
135
- "description": "Update account origin URL",
158
+ "description": "Account origin URL. Optional for self hosted installs.",
136
159
  "name": "account_origin",
137
160
  "required": false,
138
161
  "hasDynamicHelp": false,
@@ -141,25 +164,25 @@
141
164
  },
142
165
  "instance_origin": {
143
166
  "char": "i",
144
- "description": "Update instance origin URL",
167
+ "description": "Instance origin URL",
145
168
  "name": "instance_origin",
146
- "required": false,
169
+ "required": true,
147
170
  "hasDynamicHelp": false,
148
171
  "multiple": false,
149
172
  "type": "option"
150
173
  },
151
174
  "access_token": {
152
175
  "char": "t",
153
- "description": "Update access token for the Xano Metadata API",
176
+ "description": "Access token for the Xano Metadata API",
154
177
  "name": "access_token",
155
- "required": false,
178
+ "required": true,
156
179
  "hasDynamicHelp": false,
157
180
  "multiple": false,
158
181
  "type": "option"
159
182
  },
160
183
  "workspace": {
161
184
  "char": "w",
162
- "description": "Update workspace name",
185
+ "description": "Workspace name",
163
186
  "name": "workspace",
164
187
  "required": false,
165
188
  "hasDynamicHelp": false,
@@ -168,23 +191,16 @@
168
191
  },
169
192
  "branch": {
170
193
  "char": "b",
171
- "description": "Update branch name",
194
+ "description": "Branch name",
172
195
  "name": "branch",
173
196
  "required": false,
174
197
  "hasDynamicHelp": false,
175
198
  "multiple": false,
176
199
  "type": "option"
177
200
  },
178
- "remove-workspace": {
179
- "description": "Remove workspace from profile",
180
- "name": "remove-workspace",
181
- "required": false,
182
- "allowNo": false,
183
- "type": "boolean"
184
- },
185
- "remove-branch": {
186
- "description": "Remove branch from profile",
187
- "name": "remove-branch",
201
+ "default": {
202
+ "description": "Set this profile as the default",
203
+ "name": "default",
188
204
  "required": false,
189
205
  "allowNo": false,
190
206
  "type": "boolean"
@@ -192,7 +208,7 @@
192
208
  },
193
209
  "hasDynamicHelp": false,
194
210
  "hiddenAliases": [],
195
- "id": "profile:edit",
211
+ "id": "profile:create",
196
212
  "pluginAlias": "@xano/cli",
197
213
  "pluginName": "@xano/cli",
198
214
  "pluginType": "core",
@@ -203,38 +219,22 @@
203
219
  "dist",
204
220
  "commands",
205
221
  "profile",
206
- "edit",
222
+ "create",
207
223
  "index.js"
208
224
  ]
209
225
  },
210
- "profile:delete": {
226
+ "profile:get-default": {
211
227
  "aliases": [],
212
- "args": {
213
- "name": {
214
- "description": "Profile name to delete",
215
- "name": "name",
216
- "required": true
217
- }
218
- },
219
- "description": "Delete a profile configuration",
228
+ "args": {},
229
+ "description": "Get the current default profile name",
220
230
  "examples": [
221
- "$ xano profile:delete old-profile\nAre you sure you want to delete profile 'old-profile'? (y/n): y\nProfile 'old-profile' deleted successfully from ~/.xano/credentials.yaml\n",
222
- "$ xano profile:delete old-profile --force\nProfile 'old-profile' deleted successfully from ~/.xano/credentials.yaml\n",
223
- "$ xano profile:delete old-profile -f\nProfile 'old-profile' deleted successfully from ~/.xano/credentials.yaml\n"
231
+ "$ xano profile:get-default\nproduction\n",
232
+ "$ xano profile:get-default\nNo default profile set\n"
224
233
  ],
225
- "flags": {
226
- "force": {
227
- "char": "f",
228
- "description": "Skip confirmation prompt",
229
- "name": "force",
230
- "required": false,
231
- "allowNo": false,
232
- "type": "boolean"
233
- }
234
- },
234
+ "flags": {},
235
235
  "hasDynamicHelp": false,
236
236
  "hiddenAliases": [],
237
- "id": "profile:delete",
237
+ "id": "profile:get-default",
238
238
  "pluginAlias": "@xano/cli",
239
239
  "pluginName": "@xano/cli",
240
240
  "pluginType": "core",
@@ -245,7 +245,7 @@
245
245
  "dist",
246
246
  "commands",
247
247
  "profile",
248
- "delete",
248
+ "get-default",
249
249
  "index.js"
250
250
  ]
251
251
  },
@@ -285,38 +285,6 @@
285
285
  "index.js"
286
286
  ]
287
287
  },
288
- "profile:set-default": {
289
- "aliases": [],
290
- "args": {
291
- "name": {
292
- "description": "Profile name to set as default",
293
- "name": "name",
294
- "required": true
295
- }
296
- },
297
- "description": "Set the default profile",
298
- "examples": [
299
- "$ xano profile:set-default production\nDefault profile set to 'production'\n",
300
- "$ xano profile:set-default staging\nDefault profile set to 'staging'\n"
301
- ],
302
- "flags": {},
303
- "hasDynamicHelp": false,
304
- "hiddenAliases": [],
305
- "id": "profile:set-default",
306
- "pluginAlias": "@xano/cli",
307
- "pluginName": "@xano/cli",
308
- "pluginType": "core",
309
- "strict": true,
310
- "enableJsonFlag": false,
311
- "isESM": true,
312
- "relativePath": [
313
- "dist",
314
- "commands",
315
- "profile",
316
- "set-default",
317
- "index.js"
318
- ]
319
- },
320
288
  "profile:wizard": {
321
289
  "aliases": [],
322
290
  "args": {},
@@ -362,23 +330,49 @@
362
330
  "index.js"
363
331
  ]
364
332
  },
365
- "function:get": {
333
+ "profile:set-default": {
366
334
  "aliases": [],
367
335
  "args": {
368
- "function_id": {
369
- "description": "Function ID",
370
- "name": "function_id",
371
- "required": false
336
+ "name": {
337
+ "description": "Profile name to set as default",
338
+ "name": "name",
339
+ "required": true
372
340
  }
373
341
  },
374
- "description": "Get a specific function from a workspace",
342
+ "description": "Set the default profile",
375
343
  "examples": [
376
- "$ xano function:get 145 -w 40\nFunction: yo (ID: 145)\nCreated: 2025-10-10 10:30:00\nDescription: Sample function\n",
377
- "$ xano function:get 145 --profile production\nFunction: yo (ID: 145)\nCreated: 2025-10-10 10:30:00\n",
378
- "$ xano function:get\nSelect a function:\n ❯ yo (ID: 145) - Sample function\n another-func (ID: 146)\n",
379
- "$ xano function:get 145 -w 40 --output json\n{\n \"id\": 145,\n \"name\": \"yo\",\n \"description\": \"Sample function\"\n}\n",
380
- "$ xano function:get 145 -p staging -o json --include_draft\n{\n \"id\": 145,\n \"name\": \"yo\"\n}\n",
381
- "$ xano function:get 145 -p staging -o xs\nfunction yo {\n input {\n }\n stack {\n }\n response = null\n}\n"
344
+ "$ xano profile:set-default production\nDefault profile set to 'production'\n",
345
+ "$ xano profile:set-default staging\nDefault profile set to 'staging'\n"
346
+ ],
347
+ "flags": {},
348
+ "hasDynamicHelp": false,
349
+ "hiddenAliases": [],
350
+ "id": "profile:set-default",
351
+ "pluginAlias": "@xano/cli",
352
+ "pluginName": "@xano/cli",
353
+ "pluginType": "core",
354
+ "strict": true,
355
+ "enableJsonFlag": false,
356
+ "isESM": true,
357
+ "relativePath": [
358
+ "dist",
359
+ "commands",
360
+ "profile",
361
+ "set-default",
362
+ "index.js"
363
+ ]
364
+ },
365
+ "ephemeral:run:job": {
366
+ "aliases": [],
367
+ "args": {},
368
+ "description": "Run an ephemeral job in a workspace",
369
+ "examples": [
370
+ "$ xano ephemeral:run:job -w 1 -f script.xs\nJob executed successfully!\n...\n",
371
+ "$ xano ephemeral:run:job -f script.xs\nJob executed successfully!\n...\n",
372
+ "$ xano ephemeral:run:job -w 1 -f script.xs --edit\n# Opens script.xs in $EDITOR, then runs job with edited content\nJob executed successfully!\n...\n",
373
+ "$ cat script.xs | xano ephemeral:run:job -w 1 --stdin\nJob executed successfully!\n...\n",
374
+ "$ xano ephemeral:run:job -w 1 -f script.xs -o json\n{\n \"job\": { \"id\": 1, \"run\": { \"id\": 1 } },\n \"result\": { ... }\n}\n",
375
+ "$ xano ephemeral:run:job -w 1 -f script.xs -a args.json\n# Runs job with input arguments from args.json\nJob executed successfully!\n...\n"
382
376
  ],
383
377
  "flags": {
384
378
  "profile": {
@@ -400,39 +394,67 @@
400
394
  "multiple": false,
401
395
  "type": "option"
402
396
  },
403
- "output": {
404
- "char": "o",
405
- "description": "Output format",
406
- "name": "output",
397
+ "file": {
398
+ "char": "f",
399
+ "description": "Path to file containing XanoScript code",
400
+ "exclusive": [
401
+ "stdin"
402
+ ],
403
+ "name": "file",
407
404
  "required": false,
408
- "default": "summary",
409
405
  "hasDynamicHelp": false,
410
406
  "multiple": false,
411
- "options": [
412
- "summary",
413
- "json",
414
- "xs"
415
- ],
416
407
  "type": "option"
417
408
  },
418
- "include_draft": {
419
- "description": "Include draft version",
420
- "name": "include_draft",
409
+ "stdin": {
410
+ "char": "s",
411
+ "description": "Read XanoScript code from stdin",
412
+ "exclusive": [
413
+ "file"
414
+ ],
415
+ "name": "stdin",
421
416
  "required": false,
422
417
  "allowNo": false,
423
418
  "type": "boolean"
424
419
  },
425
- "include_xanoscript": {
426
- "description": "Include XanoScript in response",
427
- "name": "include_xanoscript",
420
+ "edit": {
421
+ "char": "e",
422
+ "dependsOn": [
423
+ "file"
424
+ ],
425
+ "description": "Open file in editor before running job (requires --file)",
426
+ "name": "edit",
428
427
  "required": false,
429
428
  "allowNo": false,
430
429
  "type": "boolean"
430
+ },
431
+ "output": {
432
+ "char": "o",
433
+ "description": "Output format",
434
+ "name": "output",
435
+ "required": false,
436
+ "default": "summary",
437
+ "hasDynamicHelp": false,
438
+ "multiple": false,
439
+ "options": [
440
+ "summary",
441
+ "json"
442
+ ],
443
+ "type": "option"
444
+ },
445
+ "args": {
446
+ "char": "a",
447
+ "description": "Path to JSON file containing input arguments",
448
+ "name": "args",
449
+ "required": false,
450
+ "hasDynamicHelp": false,
451
+ "multiple": false,
452
+ "type": "option"
431
453
  }
432
454
  },
433
455
  "hasDynamicHelp": false,
434
456
  "hiddenAliases": [],
435
- "id": "function:get",
457
+ "id": "ephemeral:run:job",
436
458
  "pluginAlias": "@xano/cli",
437
459
  "pluginName": "@xano/cli",
438
460
  "pluginType": "core",
@@ -442,30 +464,22 @@
442
464
  "relativePath": [
443
465
  "dist",
444
466
  "commands",
445
- "function",
446
- "get",
467
+ "ephemeral",
468
+ "run",
469
+ "job",
447
470
  "index.js"
448
471
  ]
449
472
  },
450
- "function:edit": {
473
+ "ephemeral:run:service": {
451
474
  "aliases": [],
452
- "args": {
453
- "function_id": {
454
- "description": "Function ID to edit",
455
- "name": "function_id",
456
- "required": false
457
- }
458
- },
459
- "description": "Edit a function in a workspace",
475
+ "args": {},
476
+ "description": "Run an ephemeral service in a workspace",
460
477
  "examples": [
461
- "$ xano function:edit 163\n# Fetches the function code and opens it in $EDITOR for editing\nFunction updated successfully!\nID: 163\nName: my_function\n",
462
- "$ xano function:edit\n# Prompts for function, fetches the code and opens it in $EDITOR for editing\nSelect a function to edit:\n ❯ my_function (ID: 163) - Sample function\n another-func (ID: 164)\n",
463
- "$ xano function:edit 163 -f function.xs\nFunction updated successfully!\nID: 163\nName: my_function\n",
464
- "$ xano function:edit 163 -w 40 -f function.xs\nFunction updated successfully!\nID: 163\nName: my_function\n",
465
- "$ xano function:edit -f function.xs\nSelect a function to edit:\n my_function (ID: 163) - Sample function\n another-func (ID: 164)\n",
466
- "$ xano function:edit 163 -f function.xs --edit\n# Opens function.xs in $EDITOR, then updates function with edited content\nFunction updated successfully!\nID: 163\nName: my_function\n",
467
- "$ cat function.xs | xano function:edit 163 --stdin\nFunction updated successfully!\nID: 163\nName: my_function\n",
468
- "$ xano function:edit 163 -f function.xs -o json\n{\n \"id\": 163,\n \"name\": \"my_function\",\n ...\n}\n"
478
+ "$ xano ephemeral:run:service -w 1 -f service.xs\nService created successfully!\n...\n",
479
+ "$ xano ephemeral:run:service -f service.xs\nService created successfully!\n...\n",
480
+ "$ xano ephemeral:run:service -w 1 -f service.xs --edit\n# Opens service.xs in $EDITOR, then creates service with edited content\nService created successfully!\n...\n",
481
+ "$ cat service.xs | xano ephemeral:run:service -w 1 --stdin\nService created successfully!\n...\n",
482
+ "$ xano ephemeral:run:service -w 1 -f service.xs -o json\n{\n \"service\": { \"id\": 1 },\n ...\n}\n"
469
483
  ],
470
484
  "flags": {
471
485
  "profile": {
@@ -512,19 +526,15 @@
512
526
  },
513
527
  "edit": {
514
528
  "char": "e",
515
- "description": "Open file in editor before updating function (requires --file)",
529
+ "dependsOn": [
530
+ "file"
531
+ ],
532
+ "description": "Open file in editor before running service (requires --file)",
516
533
  "name": "edit",
517
534
  "required": false,
518
535
  "allowNo": false,
519
536
  "type": "boolean"
520
537
  },
521
- "publish": {
522
- "description": "Publish the function after editing",
523
- "name": "publish",
524
- "required": false,
525
- "allowNo": false,
526
- "type": "boolean"
527
- },
528
538
  "output": {
529
539
  "char": "o",
530
540
  "description": "Output format",
@@ -542,7 +552,7 @@
542
552
  },
543
553
  "hasDynamicHelp": false,
544
554
  "hiddenAliases": [],
545
- "id": "function:edit",
555
+ "id": "ephemeral:run:service",
546
556
  "pluginAlias": "@xano/cli",
547
557
  "pluginName": "@xano/cli",
548
558
  "pluginType": "core",
@@ -552,20 +562,22 @@
552
562
  "relativePath": [
553
563
  "dist",
554
564
  "commands",
555
- "function",
556
- "edit",
565
+ "ephemeral",
566
+ "run",
567
+ "service",
557
568
  "index.js"
558
569
  ]
559
570
  },
560
- "function:list": {
571
+ "function:create": {
561
572
  "aliases": [],
562
573
  "args": {},
563
- "description": "List all functions in a workspace from the Xano Metadata API",
574
+ "description": "Create a new function in a workspace",
564
575
  "examples": [
565
- "$ xano function:list -w 40\nAvailable functions:\n - function-1 (ID: 1)\n - function-2 (ID: 2)\n - function-3 (ID: 3)\n",
566
- "$ xano function:list --profile production\nAvailable functions:\n - my-function (ID: 1)\n - another-function (ID: 2)\n",
567
- "$ xano function:list -w 40 --output json\n[\n {\n \"id\": 1,\n \"name\": \"function-1\"\n }\n]\n",
568
- "$ xano function:list -p staging -o json --include_draft\n[\n {\n \"id\": 1,\n \"name\": \"function-1\"\n }\n]\n"
576
+ "$ xano function:create -w 40 -f function.xs\nFunction created successfully!\nID: 123\nName: my_function\n",
577
+ "$ xano function:create -f function.xs\nFunction created successfully!\nID: 123\nName: my_function\n",
578
+ "$ xano function:create -w 40 -f function.xs --edit\n# Opens function.xs in $EDITOR, then creates function with edited content\nFunction created successfully!\nID: 123\nName: my_function\n",
579
+ "$ cat function.xs | xano function:create -w 40 --stdin\nFunction created successfully!\nID: 123\nName: my_function\n",
580
+ "$ xano function:create -w 40 -f function.xs -o json\n{\n \"id\": 123,\n \"name\": \"my_function\",\n ...\n}\n"
569
581
  ],
570
582
  "flags": {
571
583
  "profile": {
@@ -587,78 +599,58 @@
587
599
  "multiple": false,
588
600
  "type": "option"
589
601
  },
590
- "output": {
591
- "char": "o",
592
- "description": "Output format",
593
- "name": "output",
602
+ "file": {
603
+ "char": "f",
604
+ "description": "Path to file containing XanoScript code",
605
+ "exclusive": [
606
+ "stdin"
607
+ ],
608
+ "name": "file",
594
609
  "required": false,
595
- "default": "summary",
596
610
  "hasDynamicHelp": false,
597
611
  "multiple": false,
598
- "options": [
599
- "summary",
600
- "json"
601
- ],
602
612
  "type": "option"
603
613
  },
604
- "include_draft": {
605
- "description": "Include draft functions",
606
- "name": "include_draft",
614
+ "stdin": {
615
+ "char": "s",
616
+ "description": "Read XanoScript code from stdin",
617
+ "exclusive": [
618
+ "file"
619
+ ],
620
+ "name": "stdin",
607
621
  "required": false,
608
622
  "allowNo": false,
609
623
  "type": "boolean"
610
624
  },
611
- "include_xanoscript": {
612
- "description": "Include XanoScript in response",
613
- "name": "include_xanoscript",
625
+ "edit": {
626
+ "char": "e",
627
+ "dependsOn": [
628
+ "file"
629
+ ],
630
+ "description": "Open file in editor before creating function (requires --file)",
631
+ "name": "edit",
614
632
  "required": false,
615
633
  "allowNo": false,
616
634
  "type": "boolean"
617
635
  },
618
- "page": {
619
- "description": "Page number for pagination",
620
- "name": "page",
621
- "required": false,
622
- "default": 1,
623
- "hasDynamicHelp": false,
624
- "multiple": false,
625
- "type": "option"
626
- },
627
- "per_page": {
628
- "description": "Number of results per page",
629
- "name": "per_page",
630
- "required": false,
631
- "default": 50,
632
- "hasDynamicHelp": false,
633
- "multiple": false,
634
- "type": "option"
635
- },
636
- "sort": {
637
- "description": "Sort field",
638
- "name": "sort",
639
- "required": false,
640
- "default": "created_at",
641
- "hasDynamicHelp": false,
642
- "multiple": false,
643
- "type": "option"
644
- },
645
- "order": {
646
- "description": "Sort order",
647
- "name": "order",
636
+ "output": {
637
+ "char": "o",
638
+ "description": "Output format",
639
+ "name": "output",
648
640
  "required": false,
649
- "default": "desc",
641
+ "default": "summary",
650
642
  "hasDynamicHelp": false,
651
643
  "multiple": false,
652
644
  "options": [
653
- "asc",
654
- "desc"
645
+ "summary",
646
+ "json"
655
647
  ],
656
648
  "type": "option"
657
649
  }
658
650
  },
659
651
  "hasDynamicHelp": false,
660
652
  "hiddenAliases": [],
661
- "id": "function:list",
653
+ "id": "function:create",
662
654
  "pluginAlias": "@xano/cli",
663
655
  "pluginName": "@xano/cli",
664
656
  "pluginType": "core",
@@ -669,19 +661,29 @@
669
661
  "dist",
670
662
  "commands",
671
663
  "function",
672
- "list",
664
+ "create",
673
665
  "index.js"
674
666
  ]
675
667
  },
676
- "static_host:list": {
668
+ "function:edit": {
677
669
  "aliases": [],
678
- "args": {},
679
- "description": "List all static hosts in a workspace from the Xano Metadata API",
670
+ "args": {
671
+ "function_id": {
672
+ "description": "Function ID to edit",
673
+ "name": "function_id",
674
+ "required": false
675
+ }
676
+ },
677
+ "description": "Edit a function in a workspace",
680
678
  "examples": [
681
- "$ xano static_host:list -w 40\nAvailable static hosts:\n - my-static-host (ID: 1)\n - another-host (ID: 2)\n",
682
- "$ xano static_host:list --profile production\nAvailable static hosts:\n - my-static-host (ID: 1)\n - another-host (ID: 2)\n",
683
- "$ xano static_host:list -w 40 --output json\n[\n {\n \"id\": 1,\n \"name\": \"my-static-host\",\n \"domain\": \"example.com\"\n }\n]\n",
684
- "$ xano static_host:list -p staging -o json --page 2\n[\n {\n \"id\": 3,\n \"name\": \"static-host-3\"\n }\n]\n"
679
+ "$ xano function:edit 163\n# Fetches the function code and opens it in $EDITOR for editing\nFunction updated successfully!\nID: 163\nName: my_function\n",
680
+ "$ xano function:edit\n# Prompts for function, fetches the code and opens it in $EDITOR for editing\nSelect a function to edit:\n my_function (ID: 163) - Sample function\n another-func (ID: 164)\n",
681
+ "$ xano function:edit 163 -f function.xs\nFunction updated successfully!\nID: 163\nName: my_function\n",
682
+ "$ xano function:edit 163 -w 40 -f function.xs\nFunction updated successfully!\nID: 163\nName: my_function\n",
683
+ "$ xano function:edit -f function.xs\nSelect a function to edit:\n ❯ my_function (ID: 163) - Sample function\n another-func (ID: 164)\n",
684
+ "$ xano function:edit 163 -f function.xs --edit\n# Opens function.xs in $EDITOR, then updates function with edited content\nFunction updated successfully!\nID: 163\nName: my_function\n",
685
+ "$ cat function.xs | xano function:edit 163 --stdin\nFunction updated successfully!\nID: 163\nName: my_function\n",
686
+ "$ xano function:edit 163 -f function.xs -o json\n{\n \"id\": 163,\n \"name\": \"my_function\",\n ...\n}\n"
685
687
  ],
686
688
  "flags": {
687
689
  "profile": {
@@ -703,6 +705,44 @@
703
705
  "multiple": false,
704
706
  "type": "option"
705
707
  },
708
+ "file": {
709
+ "char": "f",
710
+ "description": "Path to file containing XanoScript code",
711
+ "exclusive": [
712
+ "stdin"
713
+ ],
714
+ "name": "file",
715
+ "required": false,
716
+ "hasDynamicHelp": false,
717
+ "multiple": false,
718
+ "type": "option"
719
+ },
720
+ "stdin": {
721
+ "char": "s",
722
+ "description": "Read XanoScript code from stdin",
723
+ "exclusive": [
724
+ "file"
725
+ ],
726
+ "name": "stdin",
727
+ "required": false,
728
+ "allowNo": false,
729
+ "type": "boolean"
730
+ },
731
+ "edit": {
732
+ "char": "e",
733
+ "description": "Open file in editor before updating function (requires --file)",
734
+ "name": "edit",
735
+ "required": false,
736
+ "allowNo": false,
737
+ "type": "boolean"
738
+ },
739
+ "publish": {
740
+ "description": "Publish the function after editing",
741
+ "name": "publish",
742
+ "required": false,
743
+ "allowNo": false,
744
+ "type": "boolean"
745
+ },
706
746
  "output": {
707
747
  "char": "o",
708
748
  "description": "Output format",
@@ -716,29 +756,11 @@
716
756
  "json"
717
757
  ],
718
758
  "type": "option"
719
- },
720
- "page": {
721
- "description": "Page number for pagination",
722
- "name": "page",
723
- "required": false,
724
- "default": 1,
725
- "hasDynamicHelp": false,
726
- "multiple": false,
727
- "type": "option"
728
- },
729
- "per_page": {
730
- "description": "Number of results per page",
731
- "name": "per_page",
732
- "required": false,
733
- "default": 50,
734
- "hasDynamicHelp": false,
735
- "multiple": false,
736
- "type": "option"
737
759
  }
738
760
  },
739
761
  "hasDynamicHelp": false,
740
762
  "hiddenAliases": [],
741
- "id": "static_host:list",
763
+ "id": "function:edit",
742
764
  "pluginAlias": "@xano/cli",
743
765
  "pluginName": "@xano/cli",
744
766
  "pluginType": "core",
@@ -748,22 +770,28 @@
748
770
  "relativePath": [
749
771
  "dist",
750
772
  "commands",
751
- "static_host",
752
- "list",
773
+ "function",
774
+ "edit",
753
775
  "index.js"
754
776
  ]
755
777
  },
756
- "ephemeral:run:job": {
778
+ "function:get": {
757
779
  "aliases": [],
758
- "args": {},
759
- "description": "Run an ephemeral job in a workspace",
780
+ "args": {
781
+ "function_id": {
782
+ "description": "Function ID",
783
+ "name": "function_id",
784
+ "required": false
785
+ }
786
+ },
787
+ "description": "Get a specific function from a workspace",
760
788
  "examples": [
761
- "$ xano ephemeral:run:job -w 1 -f script.xs\nJob executed successfully!\n...\n",
762
- "$ xano ephemeral:run:job -f script.xs\nJob executed successfully!\n...\n",
763
- "$ xano ephemeral:run:job -w 1 -f script.xs --edit\n# Opens script.xs in $EDITOR, then runs job with edited content\nJob executed successfully!\n...\n",
764
- "$ cat script.xs | xano ephemeral:run:job -w 1 --stdin\nJob executed successfully!\n...\n",
765
- "$ xano ephemeral:run:job -w 1 -f script.xs -o json\n{\n \"job\": { \"id\": 1, \"run\": { \"id\": 1 } },\n \"result\": { ... }\n}\n",
766
- "$ xano ephemeral:run:job -w 1 -f script.xs -a args.json\n# Runs job with input arguments from args.json\nJob executed successfully!\n...\n"
789
+ "$ xano function:get 145 -w 40\nFunction: yo (ID: 145)\nCreated: 2025-10-10 10:30:00\nDescription: Sample function\n",
790
+ "$ xano function:get 145 --profile production\nFunction: yo (ID: 145)\nCreated: 2025-10-10 10:30:00\n",
791
+ "$ xano function:get\nSelect a function:\n yo (ID: 145) - Sample function\n another-func (ID: 146)\n",
792
+ "$ xano function:get 145 -w 40 --output json\n{\n \"id\": 145,\n \"name\": \"yo\",\n \"description\": \"Sample function\"\n}\n",
793
+ "$ xano function:get 145 -p staging -o json --include_draft\n{\n \"id\": 145,\n \"name\": \"yo\"\n}\n",
794
+ "$ xano function:get 145 -p staging -o xs\nfunction yo {\n input {\n }\n stack {\n }\n response = null\n}\n"
767
795
  ],
768
796
  "flags": {
769
797
  "profile": {
@@ -785,40 +813,6 @@
785
813
  "multiple": false,
786
814
  "type": "option"
787
815
  },
788
- "file": {
789
- "char": "f",
790
- "description": "Path to file containing XanoScript code",
791
- "exclusive": [
792
- "stdin"
793
- ],
794
- "name": "file",
795
- "required": false,
796
- "hasDynamicHelp": false,
797
- "multiple": false,
798
- "type": "option"
799
- },
800
- "stdin": {
801
- "char": "s",
802
- "description": "Read XanoScript code from stdin",
803
- "exclusive": [
804
- "file"
805
- ],
806
- "name": "stdin",
807
- "required": false,
808
- "allowNo": false,
809
- "type": "boolean"
810
- },
811
- "edit": {
812
- "char": "e",
813
- "dependsOn": [
814
- "file"
815
- ],
816
- "description": "Open file in editor before running job (requires --file)",
817
- "name": "edit",
818
- "required": false,
819
- "allowNo": false,
820
- "type": "boolean"
821
- },
822
816
  "output": {
823
817
  "char": "o",
824
818
  "description": "Output format",
@@ -829,23 +823,29 @@
829
823
  "multiple": false,
830
824
  "options": [
831
825
  "summary",
832
- "json"
826
+ "json",
827
+ "xs"
833
828
  ],
834
829
  "type": "option"
835
830
  },
836
- "args": {
837
- "char": "a",
838
- "description": "Path to JSON file containing input arguments",
839
- "name": "args",
831
+ "include_draft": {
832
+ "description": "Include draft version",
833
+ "name": "include_draft",
840
834
  "required": false,
841
- "hasDynamicHelp": false,
842
- "multiple": false,
843
- "type": "option"
835
+ "allowNo": false,
836
+ "type": "boolean"
837
+ },
838
+ "include_xanoscript": {
839
+ "description": "Include XanoScript in response",
840
+ "name": "include_xanoscript",
841
+ "required": false,
842
+ "allowNo": false,
843
+ "type": "boolean"
844
844
  }
845
845
  },
846
846
  "hasDynamicHelp": false,
847
847
  "hiddenAliases": [],
848
- "id": "ephemeral:run:job",
848
+ "id": "function:get",
849
849
  "pluginAlias": "@xano/cli",
850
850
  "pluginName": "@xano/cli",
851
851
  "pluginType": "core",
@@ -855,22 +855,20 @@
855
855
  "relativePath": [
856
856
  "dist",
857
857
  "commands",
858
- "ephemeral",
859
- "run",
860
- "job",
858
+ "function",
859
+ "get",
861
860
  "index.js"
862
861
  ]
863
862
  },
864
- "ephemeral:run:service": {
863
+ "function:list": {
865
864
  "aliases": [],
866
865
  "args": {},
867
- "description": "Run an ephemeral service in a workspace",
866
+ "description": "List all functions in a workspace from the Xano Metadata API",
868
867
  "examples": [
869
- "$ xano ephemeral:run:service -w 1 -f service.xs\nService created successfully!\n...\n",
870
- "$ xano ephemeral:run:service -f service.xs\nService created successfully!\n...\n",
871
- "$ xano ephemeral:run:service -w 1 -f service.xs --edit\n# Opens service.xs in $EDITOR, then creates service with edited content\nService created successfully!\n...\n",
872
- "$ cat service.xs | xano ephemeral:run:service -w 1 --stdin\nService created successfully!\n...\n",
873
- "$ xano ephemeral:run:service -w 1 -f service.xs -o json\n{\n \"service\": { \"id\": 1 },\n ...\n}\n"
868
+ "$ xano function:list -w 40\nAvailable functions:\n - function-1 (ID: 1)\n - function-2 (ID: 2)\n - function-3 (ID: 3)\n",
869
+ "$ xano function:list --profile production\nAvailable functions:\n - my-function (ID: 1)\n - another-function (ID: 2)\n",
870
+ "$ xano function:list -w 40 --output json\n[\n {\n \"id\": 1,\n \"name\": \"function-1\"\n }\n]\n",
871
+ "$ xano function:list -p staging -o json --include_draft\n[\n {\n \"id\": 1,\n \"name\": \"function-1\"\n }\n]\n"
874
872
  ],
875
873
  "flags": {
876
874
  "profile": {
@@ -892,58 +890,78 @@
892
890
  "multiple": false,
893
891
  "type": "option"
894
892
  },
895
- "file": {
896
- "char": "f",
897
- "description": "Path to file containing XanoScript code",
898
- "exclusive": [
899
- "stdin"
900
- ],
901
- "name": "file",
893
+ "output": {
894
+ "char": "o",
895
+ "description": "Output format",
896
+ "name": "output",
902
897
  "required": false,
898
+ "default": "summary",
903
899
  "hasDynamicHelp": false,
904
900
  "multiple": false,
901
+ "options": [
902
+ "summary",
903
+ "json"
904
+ ],
905
905
  "type": "option"
906
906
  },
907
- "stdin": {
908
- "char": "s",
909
- "description": "Read XanoScript code from stdin",
910
- "exclusive": [
911
- "file"
912
- ],
913
- "name": "stdin",
907
+ "include_draft": {
908
+ "description": "Include draft functions",
909
+ "name": "include_draft",
914
910
  "required": false,
915
911
  "allowNo": false,
916
912
  "type": "boolean"
917
913
  },
918
- "edit": {
919
- "char": "e",
920
- "dependsOn": [
921
- "file"
922
- ],
923
- "description": "Open file in editor before running service (requires --file)",
924
- "name": "edit",
914
+ "include_xanoscript": {
915
+ "description": "Include XanoScript in response",
916
+ "name": "include_xanoscript",
925
917
  "required": false,
926
918
  "allowNo": false,
927
919
  "type": "boolean"
928
920
  },
929
- "output": {
930
- "char": "o",
931
- "description": "Output format",
932
- "name": "output",
921
+ "page": {
922
+ "description": "Page number for pagination",
923
+ "name": "page",
933
924
  "required": false,
934
- "default": "summary",
925
+ "default": 1,
926
+ "hasDynamicHelp": false,
927
+ "multiple": false,
928
+ "type": "option"
929
+ },
930
+ "per_page": {
931
+ "description": "Number of results per page",
932
+ "name": "per_page",
933
+ "required": false,
934
+ "default": 50,
935
+ "hasDynamicHelp": false,
936
+ "multiple": false,
937
+ "type": "option"
938
+ },
939
+ "sort": {
940
+ "description": "Sort field",
941
+ "name": "sort",
942
+ "required": false,
943
+ "default": "created_at",
944
+ "hasDynamicHelp": false,
945
+ "multiple": false,
946
+ "type": "option"
947
+ },
948
+ "order": {
949
+ "description": "Sort order",
950
+ "name": "order",
951
+ "required": false,
952
+ "default": "desc",
935
953
  "hasDynamicHelp": false,
936
954
  "multiple": false,
937
955
  "options": [
938
- "summary",
939
- "json"
956
+ "asc",
957
+ "desc"
940
958
  ],
941
959
  "type": "option"
942
960
  }
943
961
  },
944
962
  "hasDynamicHelp": false,
945
963
  "hiddenAliases": [],
946
- "id": "ephemeral:run:service",
964
+ "id": "function:list",
947
965
  "pluginAlias": "@xano/cli",
948
966
  "pluginName": "@xano/cli",
949
967
  "pluginType": "core",
@@ -953,9 +971,8 @@
953
971
  "relativePath": [
954
972
  "dist",
955
973
  "commands",
956
- "ephemeral",
957
- "run",
958
- "service",
974
+ "function",
975
+ "list",
959
976
  "index.js"
960
977
  ]
961
978
  },
@@ -1012,16 +1029,15 @@
1012
1029
  "index.js"
1013
1030
  ]
1014
1031
  },
1015
- "function:create": {
1032
+ "static_host:list": {
1016
1033
  "aliases": [],
1017
1034
  "args": {},
1018
- "description": "Create a new function in a workspace",
1035
+ "description": "List all static hosts in a workspace from the Xano Metadata API",
1019
1036
  "examples": [
1020
- "$ xano function:create -w 40 -f function.xs\nFunction created successfully!\nID: 123\nName: my_function\n",
1021
- "$ xano function:create -f function.xs\nFunction created successfully!\nID: 123\nName: my_function\n",
1022
- "$ xano function:create -w 40 -f function.xs --edit\n# Opens function.xs in $EDITOR, then creates function with edited content\nFunction created successfully!\nID: 123\nName: my_function\n",
1023
- "$ cat function.xs | xano function:create -w 40 --stdin\nFunction created successfully!\nID: 123\nName: my_function\n",
1024
- "$ xano function:create -w 40 -f function.xs -o json\n{\n \"id\": 123,\n \"name\": \"my_function\",\n ...\n}\n"
1037
+ "$ xano static_host:list -w 40\nAvailable static hosts:\n - my-static-host (ID: 1)\n - another-host (ID: 2)\n",
1038
+ "$ xano static_host:list --profile production\nAvailable static hosts:\n - my-static-host (ID: 1)\n - another-host (ID: 2)\n",
1039
+ "$ xano static_host:list -w 40 --output json\n[\n {\n \"id\": 1,\n \"name\": \"my-static-host\",\n \"domain\": \"example.com\"\n }\n]\n",
1040
+ "$ xano static_host:list -p staging -o json --page 2\n[\n {\n \"id\": 3,\n \"name\": \"static-host-3\"\n }\n]\n"
1025
1041
  ],
1026
1042
  "flags": {
1027
1043
  "profile": {
@@ -1043,40 +1059,6 @@
1043
1059
  "multiple": false,
1044
1060
  "type": "option"
1045
1061
  },
1046
- "file": {
1047
- "char": "f",
1048
- "description": "Path to file containing XanoScript code",
1049
- "exclusive": [
1050
- "stdin"
1051
- ],
1052
- "name": "file",
1053
- "required": false,
1054
- "hasDynamicHelp": false,
1055
- "multiple": false,
1056
- "type": "option"
1057
- },
1058
- "stdin": {
1059
- "char": "s",
1060
- "description": "Read XanoScript code from stdin",
1061
- "exclusive": [
1062
- "file"
1063
- ],
1064
- "name": "stdin",
1065
- "required": false,
1066
- "allowNo": false,
1067
- "type": "boolean"
1068
- },
1069
- "edit": {
1070
- "char": "e",
1071
- "dependsOn": [
1072
- "file"
1073
- ],
1074
- "description": "Open file in editor before creating function (requires --file)",
1075
- "name": "edit",
1076
- "required": false,
1077
- "allowNo": false,
1078
- "type": "boolean"
1079
- },
1080
1062
  "output": {
1081
1063
  "char": "o",
1082
1064
  "description": "Output format",
@@ -1090,11 +1072,29 @@
1090
1072
  "json"
1091
1073
  ],
1092
1074
  "type": "option"
1075
+ },
1076
+ "page": {
1077
+ "description": "Page number for pagination",
1078
+ "name": "page",
1079
+ "required": false,
1080
+ "default": 1,
1081
+ "hasDynamicHelp": false,
1082
+ "multiple": false,
1083
+ "type": "option"
1084
+ },
1085
+ "per_page": {
1086
+ "description": "Number of results per page",
1087
+ "name": "per_page",
1088
+ "required": false,
1089
+ "default": 50,
1090
+ "hasDynamicHelp": false,
1091
+ "multiple": false,
1092
+ "type": "option"
1093
1093
  }
1094
1094
  },
1095
1095
  "hasDynamicHelp": false,
1096
1096
  "hiddenAliases": [],
1097
- "id": "function:create",
1097
+ "id": "static_host:list",
1098
1098
  "pluginAlias": "@xano/cli",
1099
1099
  "pluginName": "@xano/cli",
1100
1100
  "pluginType": "core",
@@ -1104,8 +1104,8 @@
1104
1104
  "relativePath": [
1105
1105
  "dist",
1106
1106
  "commands",
1107
- "function",
1108
- "create",
1107
+ "static_host",
1108
+ "list",
1109
1109
  "index.js"
1110
1110
  ]
1111
1111
  },
@@ -1366,5 +1366,5 @@
1366
1366
  ]
1367
1367
  }
1368
1368
  },
1369
- "version": "0.0.7"
1369
+ "version": "0.0.8"
1370
1370
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xano/cli",
3
3
  "description": "CLI for Xano's Metadata API",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "author": "Sean Montgomery",
6
6
  "bin": {
7
7
  "xano": "./bin/run.js"