Skip to main content

Workspaces

A workspace is an isolated backend environment in Xano containing your database tables, APIs, functions, tasks, and more. The CLI provides full workspace management.
Most workspace commands use the workspace ID stored in your profile. You can override it per-command with -w WORKSPACE_ID.

List Workspaces

Terminal
xano workspace list
Use -o json for the full JSON response.

Get Workspace Details

Terminal
xano workspace get
This returns details for the workspace in your current profile. To get a specific workspace:
Terminal
xano workspace get WORKSPACE_ID

Create a Workspace

Terminal
xano workspace create "My New Workspace"
Argument / FlagDescription
nameWorkspace name (required, positional)
-dDescription
-oOutput format: summary or json

Edit a Workspace

Terminal
xano workspace edit WORKSPACE_ID -n "Updated Name" -d "New description"
You can also toggle settings:
Terminal
xano workspace edit WORKSPACE_ID --swagger --require-token
Use --no-swagger or --no-require-token to disable those options.

Delete a Workspace

Terminal
xano workspace delete WORKSPACE_ID
Add -f to skip the confirmation prompt.
Workspaces with active tenants cannot be deleted.

Branches

Branches are versions of a workspace’s business logic. They let you develop and test changes without affecting the live environment. Every workspace starts with a v1 branch.

List Branches

Terminal
xano branch list
The output indicates which branch is (live) and which are (backup):
Branches for workspace 12345:
  v1 (live)
  v2-feature
  v3-backup (backup)
You can specify a workspace ID directly:
Terminal
xano branch list WORKSPACE_ID

Get Branch Details

Terminal
xano branch get v2-feature

Create a Branch

Terminal
xano branch create -l v2-feature
By default, new branches are cloned from v1. To clone from a different source:
Terminal
xano branch create -l v3-hotfix -s v2-feature
FlagDescription
-lBranch label (required)
-sSource branch to clone from (default: v1)
-dDescription
-cColor hex code (e.g., #FF5733)
-wWorkspace ID

Edit a Branch

Terminal
xano branch edit v2-feature -l v2-ready -d "Ready for review" -c "#00FF00"
The v1 branch cannot be renamed.

Set a Branch Live

Promote a branch so that it serves all live API traffic:
Terminal
xano branch set_live v2-feature
You’ll be asked to confirm before the switch takes effect. Use -f to skip confirmation.
Setting a branch live immediately affects all API consumers. Make sure you’ve tested the branch thoroughly before promoting it.

Delete a Branch

Terminal
xano branch delete v2-feature
Add -f to skip confirmation.
The v1 branch and the currently live branch cannot be deleted. To delete a branch that is currently live, first set a different branch live with xano branch set_live <other-branch>, then delete the original branch.

Working with Profiles and Branches

Your profile can store a default branch, so you don’t need to specify it on every command. To update which branch your profile targets:
Terminal
xano profile edit -b BRANCH_LABEL
To clear the branch (use the live branch by default):
Terminal
xano profile edit --remove-branch
This is especially useful when you want push and pull operations to target a specific branch.