@xano/cli 0.0.36 → 0.0.39

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 (115) hide show
  1. package/README.md +325 -102
  2. package/dist/commands/auth/index.d.ts +0 -2
  3. package/dist/commands/auth/index.js +2 -55
  4. package/dist/commands/profile/create/index.d.ts +0 -2
  5. package/dist/commands/profile/create/index.js +0 -15
  6. package/dist/commands/profile/edit/index.d.ts +0 -4
  7. package/dist/commands/profile/edit/index.js +7 -38
  8. package/dist/commands/profile/wizard/index.d.ts +0 -2
  9. package/dist/commands/profile/wizard/index.js +0 -106
  10. package/dist/commands/profile/{project → workspace}/index.d.ts +1 -1
  11. package/dist/commands/profile/{project → workspace}/index.js +10 -10
  12. package/dist/commands/release/delete/index.d.ts +2 -4
  13. package/dist/commands/release/delete/index.js +39 -12
  14. package/dist/commands/release/edit/index.d.ts +2 -4
  15. package/dist/commands/release/edit/index.js +31 -5
  16. package/dist/commands/release/export/index.d.ts +2 -4
  17. package/dist/commands/release/export/index.js +39 -11
  18. package/dist/commands/release/get/index.d.ts +2 -4
  19. package/dist/commands/release/get/index.js +31 -5
  20. package/dist/commands/release/pull/index.d.ts +31 -0
  21. package/dist/commands/release/pull/index.js +345 -0
  22. package/dist/commands/release/push/index.d.ts +26 -0
  23. package/dist/commands/release/push/index.js +230 -0
  24. package/dist/commands/tenant/backup/delete/index.d.ts +1 -1
  25. package/dist/commands/tenant/backup/delete/index.js +8 -9
  26. package/dist/commands/tenant/backup/export/index.d.ts +1 -1
  27. package/dist/commands/tenant/backup/export/index.js +9 -10
  28. package/dist/commands/tenant/backup/restore/index.d.ts +1 -1
  29. package/dist/commands/tenant/backup/restore/index.js +8 -9
  30. package/dist/commands/tenant/cluster/create/index.d.ts +18 -0
  31. package/dist/commands/tenant/cluster/create/index.js +149 -0
  32. package/dist/commands/{run/sessions/start → tenant/cluster/delete}/index.d.ts +9 -3
  33. package/dist/commands/tenant/cluster/delete/index.js +125 -0
  34. package/dist/commands/tenant/cluster/edit/index.d.ts +22 -0
  35. package/dist/commands/tenant/cluster/edit/index.js +128 -0
  36. package/dist/commands/{run/sessions → tenant/cluster}/get/index.d.ts +7 -3
  37. package/dist/commands/tenant/cluster/get/index.js +114 -0
  38. package/dist/commands/{run/info → tenant/cluster/license/get}/index.d.ts +10 -7
  39. package/dist/commands/tenant/cluster/license/get/index.js +118 -0
  40. package/dist/commands/tenant/cluster/license/set/index.d.ts +21 -0
  41. package/dist/commands/tenant/cluster/license/set/index.js +132 -0
  42. package/dist/commands/{run/env → tenant/cluster}/list/index.d.ts +3 -3
  43. package/dist/commands/tenant/cluster/list/index.js +109 -0
  44. package/dist/commands/tenant/create/index.d.ts +6 -3
  45. package/dist/commands/tenant/create/index.js +28 -20
  46. package/dist/commands/tenant/deploy_platform/index.d.ts +1 -1
  47. package/dist/commands/tenant/deploy_platform/index.js +8 -9
  48. package/dist/commands/tenant/deploy_release/index.d.ts +1 -1
  49. package/dist/commands/tenant/deploy_release/index.js +8 -9
  50. package/dist/commands/tenant/env/delete/index.d.ts +19 -0
  51. package/dist/commands/tenant/env/delete/index.js +139 -0
  52. package/dist/commands/{run/projects/create → tenant/env/get}/index.d.ts +7 -4
  53. package/dist/commands/tenant/env/get/index.js +113 -0
  54. package/dist/commands/{run/projects/update → tenant/env/get_all}/index.d.ts +7 -5
  55. package/dist/commands/tenant/env/get_all/index.js +123 -0
  56. package/dist/commands/{run/secrets/get → tenant/env/list}/index.d.ts +5 -3
  57. package/dist/commands/tenant/env/list/index.js +116 -0
  58. package/dist/commands/tenant/env/set/index.d.ts +18 -0
  59. package/dist/commands/tenant/env/set/index.js +122 -0
  60. package/dist/commands/tenant/env/set_all/index.d.ts +18 -0
  61. package/dist/commands/tenant/env/set_all/index.js +131 -0
  62. package/dist/commands/tenant/get/index.js +6 -5
  63. package/dist/commands/tenant/impersonate/index.d.ts +19 -0
  64. package/dist/commands/tenant/impersonate/index.js +146 -0
  65. package/dist/commands/tenant/license/get/index.d.ts +18 -0
  66. package/dist/commands/tenant/license/get/index.js +127 -0
  67. package/dist/commands/tenant/license/set/index.d.ts +19 -0
  68. package/dist/commands/tenant/license/set/index.js +141 -0
  69. package/dist/commands/tenant/list/index.js +6 -6
  70. package/dist/commands/tenant/pull/index.d.ts +31 -0
  71. package/dist/commands/tenant/pull/index.js +327 -0
  72. package/dist/commands/tenant/push/index.d.ts +24 -0
  73. package/dist/commands/tenant/push/index.js +245 -0
  74. package/dist/commands/workspace/push/index.js +21 -6
  75. package/oclif.manifest.json +2323 -1918
  76. package/package.json +1 -19
  77. package/dist/commands/run/env/delete/index.d.ts +0 -14
  78. package/dist/commands/run/env/delete/index.js +0 -65
  79. package/dist/commands/run/env/get/index.d.ts +0 -14
  80. package/dist/commands/run/env/get/index.js +0 -52
  81. package/dist/commands/run/env/list/index.js +0 -56
  82. package/dist/commands/run/env/set/index.d.ts +0 -14
  83. package/dist/commands/run/env/set/index.js +0 -51
  84. package/dist/commands/run/exec/index.d.ts +0 -31
  85. package/dist/commands/run/exec/index.js +0 -431
  86. package/dist/commands/run/info/index.js +0 -160
  87. package/dist/commands/run/projects/create/index.js +0 -75
  88. package/dist/commands/run/projects/delete/index.d.ts +0 -14
  89. package/dist/commands/run/projects/delete/index.js +0 -65
  90. package/dist/commands/run/projects/list/index.d.ts +0 -13
  91. package/dist/commands/run/projects/list/index.js +0 -66
  92. package/dist/commands/run/projects/update/index.js +0 -86
  93. package/dist/commands/run/secrets/delete/index.d.ts +0 -14
  94. package/dist/commands/run/secrets/delete/index.js +0 -65
  95. package/dist/commands/run/secrets/get/index.js +0 -52
  96. package/dist/commands/run/secrets/list/index.d.ts +0 -12
  97. package/dist/commands/run/secrets/list/index.js +0 -60
  98. package/dist/commands/run/secrets/set/index.d.ts +0 -16
  99. package/dist/commands/run/secrets/set/index.js +0 -74
  100. package/dist/commands/run/sessions/delete/index.d.ts +0 -14
  101. package/dist/commands/run/sessions/delete/index.js +0 -65
  102. package/dist/commands/run/sessions/get/index.js +0 -72
  103. package/dist/commands/run/sessions/list/index.d.ts +0 -13
  104. package/dist/commands/run/sessions/list/index.js +0 -64
  105. package/dist/commands/run/sessions/start/index.js +0 -56
  106. package/dist/commands/run/sessions/stop/index.d.ts +0 -14
  107. package/dist/commands/run/sessions/stop/index.js +0 -56
  108. package/dist/commands/run/sink/get/index.d.ts +0 -14
  109. package/dist/commands/run/sink/get/index.js +0 -63
  110. package/dist/lib/base-run-command.d.ts +0 -41
  111. package/dist/lib/base-run-command.js +0 -75
  112. package/dist/lib/run-http-client.d.ts +0 -64
  113. package/dist/lib/run-http-client.js +0 -171
  114. package/dist/lib/run-types.d.ts +0 -226
  115. package/dist/lib/run-types.js +0 -5
package/README.md CHANGED
@@ -13,195 +13,409 @@ npm install -g @xano/cli
13
13
 
14
14
  ## Quick Start
15
15
 
16
- 1. Create a profile with the wizard:
16
+ 1. Authenticate with Xano:
17
17
  ```bash
18
- xano profile:wizard
18
+ xano auth
19
19
  ```
20
20
 
21
21
  2. List your workspaces:
22
22
  ```bash
23
- xano workspace:list
23
+ xano workspace list
24
24
  ```
25
25
 
26
- 3. Execute XanoScript code:
26
+ 3. Pull a workspace to local files:
27
27
  ```bash
28
- xano run exec script.xs
28
+ xano workspace pull ./my-workspace
29
29
  ```
30
30
 
31
31
  ## Commands
32
32
 
33
- ### Profile Management
33
+ ### Authentication
34
34
 
35
- Profiles store your Xano credentials and default workspace/project settings.
35
+ ```bash
36
+ # Interactive browser-based authentication
37
+ xano auth
38
+ xano auth --origin https://custom.xano.com
39
+ ```
40
+
41
+ ### Profiles
42
+
43
+ Profiles store your Xano credentials and default workspace settings.
36
44
 
37
45
  ```bash
38
- # Create a profile interactively (auto-fetches run projects)
39
- xano profile:wizard
46
+ # Create a profile interactively
47
+ xano profile wizard
40
48
 
41
49
  # Create a profile manually
42
- xano profile:create myprofile -i https://instance.xano.com -t <access_token>
43
-
44
- # Create a profile with workspace and project
45
- xano profile:create myprofile -i https://instance.xano.com -t <access_token> -w my-workspace -j my-project
50
+ xano profile create myprofile -i https://instance.xano.com -t <access_token>
46
51
 
47
52
  # List profiles
48
- xano profile:list
49
- xano profile:list --details
53
+ xano profile list
54
+ xano profile list --details # Show masked tokens and settings
50
55
 
51
- # Set default profile
52
- xano profile:set-default myprofile
56
+ # Get/set default profile
57
+ xano profile get_default
58
+ xano profile set_default myprofile
53
59
 
54
60
  # Edit a profile
55
- xano profile:edit myprofile -w 123 # Set default workspace
56
- xano profile:edit myprofile -j my-project # Set default project
61
+ xano profile edit myprofile -w 123
62
+ xano profile edit myprofile --remove-branch # Remove branch from profile
63
+
64
+ # Get current user info
65
+ xano profile me
66
+
67
+ # Print access token (useful for piping)
68
+ xano profile token
69
+
70
+ # Print workspace ID (useful for piping)
71
+ xano profile workspace
57
72
 
58
73
  # Delete a profile
59
- xano profile:delete myprofile
74
+ xano profile delete myprofile
60
75
  ```
61
76
 
62
- The `profile:wizard` command automatically fetches your run projects and sets the first one as the default for `xano run` commands.
63
-
64
77
  ### Workspaces
65
78
 
66
79
  ```bash
67
80
  # List all workspaces
68
- xano workspace:list
69
- xano workspace:list -o json
81
+ xano workspace list
82
+
83
+ # Get workspace details
84
+ xano workspace get <workspace_id>
85
+
86
+ # Create a workspace
87
+ xano workspace create my-workspace
88
+ xano workspace create my-workspace -d "My application workspace"
89
+
90
+ # Edit a workspace
91
+ xano workspace edit <workspace_id> --name "new-name" -d "Updated description"
92
+ xano workspace edit <workspace_id> --swagger # Enable swagger docs
93
+ xano workspace edit <workspace_id> --no-swagger # Disable swagger docs
94
+ xano workspace edit <workspace_id> --require-token # Require token for docs
95
+
96
+ # Delete a workspace (confirmation required)
97
+ xano workspace delete <workspace_id>
98
+ xano workspace delete <workspace_id> --force
99
+
100
+ # Pull workspace to local files
101
+ xano workspace pull ./my-workspace
102
+ xano workspace pull ./my-workspace -b dev # Specific branch
103
+ xano workspace pull ./my-workspace --env --records # Include env vars and table records
104
+ xano workspace pull ./my-workspace --draft # Include draft changes
105
+
106
+ # Push local files to workspace
107
+ xano workspace push ./my-workspace
108
+ xano workspace push ./my-workspace -b dev
109
+ xano workspace push ./my-workspace --no-records # Schema only
110
+ xano workspace push ./my-workspace --no-env # Skip env vars
111
+ xano workspace push ./my-workspace --truncate # Truncate tables before import
112
+ ```
113
+
114
+ ### Branches
115
+
116
+ All branch commands use **branch labels** (e.g., `v1`, `dev`), not IDs.
117
+
118
+ ```bash
119
+ # List branches
120
+ xano branch list
121
+
122
+ # Get branch details
123
+ xano branch get <branch_label>
124
+
125
+ # Create a branch
126
+ xano branch create --label dev
127
+ xano branch create -l feature-auth -s dev -d "Auth feature"
128
+ xano branch create -l staging --color "#ebc346"
129
+
130
+ # Edit a branch
131
+ xano branch edit <branch_label> --label "new-label"
132
+ xano branch edit <branch_label> --color "#ff0000"
133
+
134
+ # Set live branch
135
+ xano branch set_live <branch_label>
136
+ xano branch set_live <branch_label> --force
137
+
138
+ # Delete a branch
139
+ xano branch delete <branch_label>
140
+ xano branch delete <branch_label> --force
70
141
  ```
71
142
 
72
143
  ### Functions
73
144
 
74
145
  ```bash
75
- # List functions in a workspace
76
- xano function:list -w 40
77
- xano function:list -o json
146
+ # List functions
147
+ xano function list
148
+ xano function list --include_draft --include_xanoscript
149
+ xano function list --sort created_at --order desc --page 1 --per_page 50
78
150
 
79
- # Get a specific function
80
- xano function:get 145
81
- xano function:get 145 -o xs # Output as XanoScript
151
+ # Get a function
152
+ xano function get <function_id>
153
+ xano function get <function_id> -o xs # Output as XanoScript
154
+ xano function get <function_id> -o json
82
155
 
83
156
  # Create a function from XanoScript
84
- xano function:create -f function.xs
85
- cat function.xs | xano function:create --stdin
157
+ xano function create -f function.xs
158
+ cat function.xs | xano function create --stdin
86
159
 
87
160
  # Edit a function
88
- xano function:edit 145 # Opens in $EDITOR
89
- xano function:edit 145 -f new.xs # Update from file
90
- xano function:edit 145 --publish # Publish after editing
161
+ xano function edit <function_id> # Opens in $EDITOR
162
+ xano function edit <function_id> -f new.xs # Update from file
163
+ xano function edit <function_id> --no-publish # Edit without publishing
164
+ ```
165
+
166
+ ### Releases
167
+
168
+ All release commands use **release names** (e.g., `v1.0`), not IDs.
169
+
170
+ ```bash
171
+ # List releases
172
+ xano release list
173
+
174
+ # Get release details
175
+ xano release get <release_name>
176
+
177
+ # Create a release
178
+ xano release create --name "v1.0" --branch main
179
+ xano release create --name "v1.1-hotfix" --branch main --hotfix
180
+ xano release create --name "v1.0" --branch main --table-ids 1,2,3
181
+
182
+ # Edit a release
183
+ xano release edit <release_name> --name "v1.0-final" -d "Updated description"
184
+
185
+ # Export (download) a release
186
+ xano release export <release_name>
187
+ xano release export <release_name> --output ./backups/my-release.tar.gz
188
+
189
+ # Import a release file
190
+ xano release import --file ./my-release.tar.gz
191
+
192
+ # Delete a release (confirmation required)
193
+ xano release delete <release_name>
194
+ xano release delete <release_name> --force
195
+
196
+ # Pull release to local files
197
+ xano release pull ./my-release -r v1.0
198
+ xano release pull ./my-release -r v1.0 --env --records
199
+
200
+ # Push local files as a new release
201
+ xano release push ./my-release -n "v2.0"
202
+ xano release push ./my-release -n "v2.0" --hotfix -d "Critical fix"
203
+ xano release push ./my-release -n "v2.0" --no-records --no-env
204
+ ```
205
+
206
+ ### Platforms
207
+
208
+ ```bash
209
+ # List platforms
210
+ xano platform list
211
+
212
+ # Get platform details
213
+ xano platform get <platform_id>
214
+ ```
215
+
216
+ ### Testing
217
+
218
+ #### Unit Tests
219
+
220
+ ```bash
221
+ # List unit tests
222
+ xano unit_test list
223
+ xano unit_test list --branch dev --obj-type function
224
+
225
+ # Run a single unit test
226
+ xano unit_test run <unit_test_id>
227
+
228
+ # Run all unit tests
229
+ xano unit_test run_all
230
+ xano unit_test run_all --branch dev --obj-type function
231
+ ```
232
+
233
+ #### Workflow Tests
234
+
235
+ ```bash
236
+ # List workflow tests
237
+ xano workflow_test list
238
+ xano workflow_test list --branch dev
239
+
240
+ # Get workflow test details
241
+ xano workflow_test get <workflow_test_id>
242
+ xano workflow_test get <workflow_test_id> -o xs # Output as XanoScript
243
+ xano workflow_test get <workflow_test_id> --include-draft
244
+
245
+ # Run a single workflow test
246
+ xano workflow_test run <workflow_test_id>
247
+
248
+ # Run all workflow tests
249
+ xano workflow_test run_all
250
+ xano workflow_test run_all --branch dev
251
+
252
+ # Delete a workflow test
253
+ xano workflow_test delete <workflow_test_id>
91
254
  ```
92
255
 
93
- ### Xano Run
256
+ ### Tenants
94
257
 
95
- Execute XanoScript code and manage projects, sessions, environment variables, and secrets.
258
+ Manage tenants, their environment variables, backups, deployments, and clusters.
96
259
 
97
- #### Executing Code
260
+ #### CRUD
98
261
 
99
262
  ```bash
100
- # Execute XanoScript (job or service)
101
- xano run exec script.xs # Single file
102
- xano run exec ./my-workspace # Directory (multidoc from .xs files)
103
- xano run exec https://example.com/script.xs # From URL
104
- xano run exec script.xs -a args.json # With input arguments (file)
105
- xano run exec script.xs -a https://ex.com/args.json # With input arguments (URL)
106
- xano run exec script.xs --edit # Edit in $EDITOR first
107
- xano run exec script.xs --env API_KEY=secret # With env overrides
108
- cat script.xs | xano run exec --stdin # From stdin
263
+ # List tenants
264
+ xano tenant list
265
+
266
+ # Get tenant details
267
+ xano tenant get <tenant_name>
268
+
269
+ # Create a tenant
270
+ xano tenant create "My Tenant"
271
+ xano tenant create "My Tenant" -d "Description" --cluster_id 1 --platform_id 5
109
272
 
110
- # Get document info (type, inputs, env vars)
111
- xano run info -f script.xs
273
+ # Edit a tenant
274
+ xano tenant edit <tenant_name> --display "New Name" -d "New description"
275
+
276
+ # Delete a tenant (confirmation required)
277
+ xano tenant delete <tenant_name>
278
+ xano tenant delete <tenant_name> --force
112
279
  ```
113
280
 
114
- When a directory is provided, all `.xs` files are collected recursively and combined into a multidoc (joined with `---` separators), similar to `xano workspace push`.
281
+ #### Impersonate
282
+
283
+ ```bash
284
+ # Open a tenant in the browser
285
+ xano tenant impersonate <tenant_name>
115
286
 
116
- #### Projects
287
+ # Print the URL without opening the browser
288
+ xano tenant impersonate <tenant_name> --url-only
289
+
290
+ # Output credentials as JSON
291
+ xano tenant impersonate <tenant_name> -o json
292
+ ```
293
+
294
+ #### Pull / Push
295
+
296
+ ```bash
297
+ # Pull tenant to local files
298
+ xano tenant pull ./my-tenant -t <tenant_name>
299
+ xano tenant pull ./my-tenant -t <tenant_name> --env --records
300
+ xano tenant pull ./my-tenant -t <tenant_name> --draft
301
+
302
+ # Push local files to tenant
303
+ xano tenant push ./my-tenant -t <tenant_name>
304
+ xano tenant push ./my-tenant -t <tenant_name> --no-records
305
+ xano tenant push ./my-tenant -t <tenant_name> --no-env
306
+ xano tenant push ./my-tenant -t <tenant_name> --truncate
307
+ ```
308
+
309
+ #### Deployments
117
310
 
118
311
  ```bash
119
- # List projects
120
- xano run projects list
312
+ # Deploy a platform version
313
+ xano tenant deploy_platform <tenant_name> --platform_id 5
121
314
 
122
- # Create a project
123
- xano run projects create -n "My Project"
124
- xano run projects create -n "My Project" -d "Description"
315
+ # Deploy a release
316
+ xano tenant deploy_release <tenant_name> --release_id 10
317
+ ```
318
+
319
+ #### Tenant License
125
320
 
126
- # Update a project
127
- xano run projects update <project-id> -n "New Name"
128
- xano run projects update <project-id> -d "New description"
321
+ ```bash
322
+ # Get tenant license
323
+ xano tenant license get <tenant_name>
129
324
 
130
- # Delete a project
131
- xano run projects delete <project-id>
132
- xano run projects delete <project-id> --force # Skip confirmation
325
+ # Set tenant license
326
+ xano tenant license set <tenant_name> --license tier2
133
327
  ```
134
328
 
135
- #### Sessions
329
+ #### Tenant Environment Variables
136
330
 
137
331
  ```bash
138
- # List sessions
139
- xano run sessions list
332
+ # List env var keys
333
+ xano tenant env list <tenant_name>
140
334
 
141
- # Get session details
142
- xano run sessions get <session-id>
335
+ # Get a single env var
336
+ xano tenant env get <tenant_name> --name DATABASE_URL
143
337
 
144
- # Start/stop a session
145
- xano run sessions start <session-id>
146
- xano run sessions stop <session-id>
338
+ # Set an env var
339
+ xano tenant env set <tenant_name> --name DATABASE_URL --value postgres://...
147
340
 
148
- # Delete a session
149
- xano run sessions delete <session-id>
150
- xano run sessions delete <session-id> --force # Skip confirmation
341
+ # Delete an env var
342
+ xano tenant env delete <tenant_name> --name DATABASE_URL
151
343
 
152
- # Get sink data for a completed session
153
- xano run sink get <session-id>
344
+ # Export all env vars to YAML
345
+ xano tenant env get_all <tenant_name>
346
+ xano tenant env get_all <tenant_name> --file ./env.yaml
347
+
348
+ # Import all env vars from YAML (replaces existing)
349
+ xano tenant env set_all <tenant_name>
350
+ xano tenant env set_all <tenant_name> --file ./env.yaml --clean
154
351
  ```
155
352
 
156
- #### Environment Variables
353
+ #### Backups
157
354
 
158
355
  ```bash
159
- # List environment variable keys
160
- xano run env list
356
+ # List backups
357
+ xano tenant backup list <tenant_name>
358
+
359
+ # Create a backup
360
+ xano tenant backup create <tenant_name>
161
361
 
162
- # Set an environment variable
163
- xano run env set API_KEY my-secret-key
362
+ # Export (download) a backup
363
+ xano tenant backup export <tenant_name> --backup_id 10
364
+ xano tenant backup export <tenant_name> --backup_id 10 --output ./backup.tar.gz
164
365
 
165
- # Get an environment variable value
166
- xano run env get API_KEY
366
+ # Import a backup file
367
+ xano tenant backup import <tenant_name> --file ./backup.tar.gz
167
368
 
168
- # Delete an environment variable
169
- xano run env delete API_KEY
170
- xano run env delete API_KEY --force # Skip confirmation
369
+ # Restore from a backup
370
+ xano tenant backup restore <tenant_name> --backup_id 10
371
+
372
+ # Delete a backup (confirmation required)
373
+ xano tenant backup delete <tenant_name> --backup_id 10
374
+ xano tenant backup delete <tenant_name> --backup_id 10 --force
171
375
  ```
172
376
 
173
- #### Secrets
377
+ #### Clusters
174
378
 
175
379
  ```bash
176
- # List secrets
177
- xano run secrets list
380
+ # List clusters
381
+ xano tenant cluster list
382
+
383
+ # Get cluster details
384
+ xano tenant cluster get <cluster_id>
385
+
386
+ # Create a cluster
387
+ xano tenant cluster create --name "us-east-1" --credentials_file ./kubeconfig.yaml
388
+ xano tenant cluster create --name "eu-west-1" --type run -d "EU run cluster"
178
389
 
179
- # Set a secret
180
- xano run secrets set docker-registry -t dockerconfigjson -v '{"auths":{...}}' -r ghcr.io
181
- xano run secrets set service-key -t service-account-token -v 'token-value'
390
+ # Edit a cluster
391
+ xano tenant cluster edit <cluster_id> --name "us-east-1" -d "Updated" --domain "us-east.xano.io"
182
392
 
183
- # Get a secret value
184
- xano run secrets get docker-registry
393
+ # Delete a cluster (confirmation required)
394
+ xano tenant cluster delete <cluster_id>
395
+ xano tenant cluster delete <cluster_id> --force
185
396
 
186
- # Delete a secret
187
- xano run secrets delete docker-registry
188
- xano run secrets delete docker-registry --force # Skip confirmation
397
+ # Get cluster kubeconfig
398
+ xano tenant cluster license get <cluster_id>
399
+
400
+ # Set cluster kubeconfig
401
+ xano tenant cluster license set <cluster_id>
402
+ xano tenant cluster license set <cluster_id> --file ./kubeconfig.yaml
189
403
  ```
190
404
 
191
405
  ### Static Hosts
192
406
 
193
407
  ```bash
194
408
  # List static hosts
195
- xano static_host:list
409
+ xano static_host list
196
410
 
197
411
  # Create a build
198
- xano static_host:build:create default -f ./build.zip -n "v1.0.0"
412
+ xano static_host build create default -f ./build.zip -n "v1.0.0"
199
413
 
200
414
  # List builds
201
- xano static_host:build:list default
415
+ xano static_host build list default
202
416
 
203
417
  # Get build details
204
- xano static_host:build:get default 52
418
+ xano static_host build get default 52
205
419
  ```
206
420
 
207
421
  ## Global Options
@@ -220,7 +434,7 @@ All commands support these options:
220
434
  Use `-v` or `--verbose` to see detailed HTTP request and response information, useful for debugging:
221
435
 
222
436
  ```bash
223
- xano run exec script.xs -v
437
+ xano workspace list -v
224
438
  ```
225
439
 
226
440
  This will show:
@@ -240,10 +454,19 @@ profiles:
240
454
  access_token: <token>
241
455
  workspace: <workspace_id>
242
456
  branch: <branch_id>
243
- project: <project_id>
244
457
  default: default
245
458
  ```
246
459
 
460
+ ## Scripts
461
+
462
+ ### Bump Version
463
+
464
+ ```bash
465
+ ./scripts/bump-version.sh # patch: 0.0.38 -> 0.0.39
466
+ ./scripts/bump-version.sh minor # minor: 0.0.38 -> 0.1.0
467
+ ./scripts/bump-version.sh major # major: 0.0.38 -> 1.0.0
468
+ ```
469
+
247
470
  ## Help
248
471
 
249
472
  ```bash
@@ -8,13 +8,11 @@ export default class Auth extends Command {
8
8
  run(): Promise<void>;
9
9
  private fetchBranches;
10
10
  private fetchInstances;
11
- private fetchProjects;
12
11
  private fetchWorkspaces;
13
12
  private promptProfileName;
14
13
  private saveProfile;
15
14
  private selectBranch;
16
15
  private selectInstance;
17
- private selectProject;
18
16
  private selectWorkspace;
19
17
  private startAuthServer;
20
18
  private validateToken;
@@ -49,7 +49,6 @@ Opening browser for Xano login at https://custom.xano.com...`,
49
49
  // Step 4: Workspace selection
50
50
  let workspace;
51
51
  let branch;
52
- let project;
53
52
  this.log('');
54
53
  this.log('Fetching available workspaces...');
55
54
  const workspaces = await this.fetchWorkspaces(token, instance.origin);
@@ -63,26 +62,18 @@ Opening browser for Xano login at https://custom.xano.com...`,
63
62
  if (branches.length > 0) {
64
63
  branch = await this.selectBranch(branches);
65
64
  }
66
- // Step 6: Project selection
67
- this.log('');
68
- this.log('Fetching available projects...');
69
- const projects = await this.fetchProjects(token, instance.origin, workspace.id, branch);
70
- if (projects.length > 0) {
71
- project = await this.selectProject(projects);
72
- }
73
65
  }
74
66
  }
75
- // Step 7: Profile name
67
+ // Step 6: Profile name
76
68
  this.log('');
77
69
  const profileName = await this.promptProfileName();
78
- // Step 8: Save profile
70
+ // Step 7: Save profile
79
71
  await this.saveProfile({
80
72
  access_token: token,
81
73
  account_origin: flags.origin,
82
74
  branch,
83
75
  instance_origin: instance.origin,
84
76
  name: profileName,
85
- project,
86
77
  workspace: workspace?.id,
87
78
  });
88
79
  this.log('');
@@ -148,32 +139,6 @@ Opening browser for Xano login at https://custom.xano.com...`,
148
139
  }
149
140
  return [];
150
141
  }
151
- async fetchProjects(accessToken, origin, workspaceId, branchId) {
152
- try {
153
- const branchParam = branchId ? `?branch=${branchId}` : '';
154
- const response = await fetch(`${origin}/api:meta/workspace/${workspaceId}/project${branchParam}`, {
155
- headers: {
156
- accept: 'application/json',
157
- Authorization: `Bearer ${accessToken}`,
158
- },
159
- method: 'GET',
160
- });
161
- if (!response.ok) {
162
- throw new Error(`API request failed with status ${response.status}`);
163
- }
164
- const data = (await response.json());
165
- if (Array.isArray(data)) {
166
- return data.map((proj) => ({
167
- id: proj.id || proj.name,
168
- name: proj.name,
169
- }));
170
- }
171
- return [];
172
- }
173
- catch {
174
- return [];
175
- }
176
- }
177
142
  async fetchWorkspaces(accessToken, origin) {
178
143
  try {
179
144
  const response = await fetch(`${origin}/api:meta/workspace`, {
@@ -245,7 +210,6 @@ Opening browser for Xano login at https://custom.xano.com...`,
245
210
  instance_origin: profile.instance_origin,
246
211
  ...(profile.workspace && { workspace: profile.workspace }),
247
212
  ...(profile.branch && { branch: profile.branch }),
248
- ...(profile.project && { project: profile.project }),
249
213
  };
250
214
  // Set as default profile
251
215
  credentials.default = profile.name;
@@ -288,23 +252,6 @@ Opening browser for Xano login at https://custom.xano.com...`,
288
252
  ]);
289
253
  return instances.find((inst) => inst.id === instanceId);
290
254
  }
291
- async selectProject(projects) {
292
- const { selectedProject } = await inquirer.prompt([
293
- {
294
- choices: [
295
- { name: '(Skip project)', value: '' },
296
- ...projects.map((proj) => ({
297
- name: proj.name,
298
- value: proj.id,
299
- })),
300
- ],
301
- message: 'Select a project',
302
- name: 'selectedProject',
303
- type: 'list',
304
- },
305
- ]);
306
- return selectedProject || undefined;
307
- }
308
255
  async selectWorkspace(workspaces) {
309
256
  const { selectedWorkspace } = await inquirer.prompt([
310
257
  {
@@ -11,8 +11,6 @@ export default class ProfileCreate extends Command {
11
11
  branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  default: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  instance_origin: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
- project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
- run_base_url: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
14
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
15
  };
18
16
  run(): Promise<void>;