Skip to main content
A quick-scan map of the commands you reach for most. Everything is grouped by task, and each group links to the full reference when you need every flag. New to the CLI? Start with Get Started.
Looking for every command, subcommand, and flag? See the complete Command Reference.

Quickstart

1

Install the CLI

npm install -g @xano/cli
Requires Node ≥ 20.12.
2

Authenticate

xano auth
Opens your browser and saves a profile.
3

Get a sandbox

xano sandbox get
Auto-provisions a personal, free-tier dev environment.
4

Pull your code

xano sandbox pull -d ./code
Splits the multidoc into folders of .xs files.

Commands at a glance

Auth and profiles

Login, contexts, and tokens.

Sandbox

Your personal dev environment.

Workspace

Git-friendly pull and push.

Branch

Labels, promotion, and live.

Function

Edit a single function fast.

Release

Snapshots and deploys.

Tenant

Isolated multi-tenant deploys.

Testing

Unit and workflow tests in CI.

Hosting and platform

Frontends, platform, and updates.

Auth and profiles

Profiles store credentials and the active workspace + branch. Keep one per environment (prod / staging / dev) and switch with -p.
CommandWhat it does
xano authBrowser OAuth login. Auto-creates a profile.
xano profile wizardInteractive token-based setup (CI / headless friendly).
xano profile create production -i https://x8.xano.io -t <token>Non-interactive, scriptable profile creation.
xano profile list --detailsSee every configured profile and which is default.
xano profile set stagingChange the default profile.
xano profile meShow authenticated user, instance, and workspace.
xano profile token | pbcopyPipe the token (use $(xano profile token) in scripts).
xano profile workspace setInteractive picker for the active workspace.
Full reference: Profiles →

Sandbox

A singleton dev environment per user, auto-provisioned on first call — the fastest path from auth to shipping XanoScript.
CommandWhat it does
xano sandbox getReturns your sandbox; creates it on first run.
xano sandbox pull -d ./codeDownload the multidoc into snake_case folders of .xs.
xano sandbox push --reviewPush changes and open the browser to verify or promote.
xano sandbox push --dry-runPreview only — no changes applied.
xano sandbox push --sync --deleteFull sync; remove remote objects missing locally.
xano sandbox reviewOpen the sandbox in the browser to review and promote changes (--url-only just prints the URL).
xano sandbox resetWipe data and drafts; the sandbox itself stays.
xano sandbox env set -n API_KEY --value sk-...Manage sandbox env vars (also get, list, delete, get_all, set_all).
xano sandbox unit_test run_allRun sandbox-scoped tests (also workflow_test).
Full reference: Sandbox →

Workspace

Canonical pull/push for shared and production workspaces. Splits the multidoc into a folder tree your version control will love.
CommandWhat it does
xano workspace listShow every workspace your account can reach.
xano workspace pull -d ./xano-codePull the entire workspace into snake_case folders.
xano workspace pull -d ./bk --env --records --draftInclude env vars, table records, and drafts.
xano workspace push --dry-runPreview the diff before any write.
xano workspace push --sync --delete --forceFull mirror push (deletes remotes not present locally).
xano workspace push -i "api/**" -i "function/**"Include globs, repeatable. Mirror with -e to exclude.
xano workspace push --no-transaction --no-guidsDisable transactional import / GUID write-back.
xano workspace git pull -r https://github.com/owner/repoPull XanoScript straight from a git repo (token via -t).
Full reference: Push & pull →

Branch

v1 always exists and can’t be renamed or deleted. The live branch serves production traffic — set_live swaps it instantly.
CommandWhat it does
xano branch listAll branches in the workspace.
xano branch create devClone from v1 (use -s to clone from elsewhere).
xano branch create feature-auth -s dev -d "Auth feature"Branch from another branch with a description.
xano branch edit dev --label development --color "#ff5733"Rename or recolor a branch.
xano branch set_live stagingPromote to production — affects traffic immediately.
xano branch delete feature-old --forceDelete a branch (never v1 or the live branch).
xano workspace pull -b devTarget a specific branch on pull/push with -b.
Full reference: Workspaces & branches →

Function

Skip the full pull when you only need to tweak one function. edit with no flags fetches and opens it directly in $EDITOR.
CommandWhat it does
xano function list --include_draftList functions; sort with --sort, --order, --per_page.
xano function get 145 -o xs > my_function.xsDump raw XanoScript to a file.
xano function edit 145Most ergonomic flow — opens current code in $EDITOR.
xano function edit 145 -f ./fn.xs --no-publishSave as a draft instead of publishing.
xano function create -f ./scaffold.xs --editCreate from a file; --edit opens it first.
cat fn.xs | xano function create --stdinPipe XanoScript in from another tool.
Full reference: Function commands →

Release

Releases are named, versioned snapshots of a branch. Deploy them to tenants, export them to a file, or move them between workspaces.
CommandWhat it does
xano release create v1.0.0 -b devCut a release from a branch (name is positional).
xano release create hotfix-auth -b v1 --hotfixBypass the normal flow for urgent prod fixes.
xano release deploy v1.0 -w 40 --set_live --forceDeploy to a workspace as a new branch and go live.
xano release export v1.0.0 --output ./v1.tar.gzExport a portable file (note --output, not -o).
xano release import -f ./v1.tar.gz -w 123Import into another workspace.
xano release pull -r v1.0.0 -d ./release-v1Inspect a release’s contents locally.
xano release push -d ./release -n v1.1 -b devPush a directory as a brand-new release.
Full reference: Releases →

Tenant

Each tenant has its own database, env vars, license, and backups. Direct push is blocked — deploy through a release or iterate in a sandbox.
CommandWhat it does
xano tenant listAll tenants in the workspace.
xano tenant create "My Tenant" --type tier2 --cluster_id 1Create a new tenant on a cluster.
xano tenant deploy_release my-tenant -r v1.0.0Promote a release to a tenant.
xano tenant deploy_platform my-tenant --platform_id 5Update the runtime platform version.
xano tenant pull -t my-tenant -d ./outRead-only export of tenant code/data.
xano tenant impersonate my-tenantOpen the tenant dashboard in a browser.
xano tenant env set_all my-tenant -f ./env.yaml --cleanBulk import env vars (--clean replaces).
xano tenant backup create my-tenant -d "pre-deploy"Snapshot before risky changes.
xano tenant backup restore my-tenant --backup_id 123 --forceDisaster recovery — restore in place.
xano tenant cluster listManage clusters (create, edit, license get/set).
Full reference: Tenants →

Testing

Tests are authored in the dashboard; the CLI runs them. Use -o json for machine-readable results in pipelines.
CommandWhat it does
xano unit_test list --branch dev --obj-type functionFilter by branch or object type.
xano unit_test run_all -o jsonCI gate — run every unit test, machine-readable output.
xano unit_test run 123Run a single test by ID.
xano workflow_test run_all --branch dev -o jsonRun end-to-end, multi-step request flows.
xano workflow_test get 456 -o xsInspect a workflow test as XanoScript.
xano workflow_test delete 456 --forceRemove a workflow test (rarely needed).
Full reference: Workflow tests →

Static hosting, platform, and maintenance

Ship the SPA next to the API, pin the runtime version, and keep the CLI itself current.
CommandWhat it does
xano static_host listEvery static host in the workspace.
xano static_host build create my-app -f ./build.zip -n 'v1.0.0'Upload a frontend build as a new version.
xano static_host build list my-appBrowse historical builds (also get).
xano platform listAvailable platform versions (helm + image tags).
xano platform get 23629 -o jsonInspect details before tenant deploy_platform.
xano updatePull the latest CLI release.
Full reference: Static hosting →

Power-user tips

Global flags

Available on any command:
  • -p <name> — swap profile
  • -c <path> — alternate credentials file
  • -v — verbose HTTP
  • -o <fmt> — output format (summary / json / xs)

Override with env vars

XANO_PROFILE=staging
XANO_CONFIG=/opt/.xano/creds.yaml
XANO_VERBOSE=1

Sandbox vs. workspace

Sandbox for personal experiments and AI-generated code. Workspace for shared/production code and CI. Same multidoc layout — workflows translate 1:1.

Always dry-run first

xano workspace push --dry-run
Add --sync --delete only when you want a true mirror. The default mode is partial (changed-only).

Glob filters

xano workspace push \
  -i "api/users/**" \
  -e "table/**"
-i includes and -e excludes — both repeatable, both glob.

Atomic by default

Pushes wrap in a DB transaction and write server-assigned GUIDs back to local files. Disable only when needed with --no-transaction or --no-guids.

Edit a function in $EDITOR

export EDITOR=cursor
xano function edit 145
No file, no flags — the CLI fetches the current code, opens it, and publishes on save.

Reuse the token

TOKEN=$(xano profile token)
curl -H "Authorization: Bearer $TOKEN" \
  https://x8.xano.io/api:meta/workspace

CI/CD recipe

xano profile create ci -i $URL -t $TOKEN
xano unit_test run_all -o json
xano release create v$SHA -b dev
xano tenant deploy_release prod -r v$SHA

Branches as environments

xano workspace pull -b dev   -d ./code
xano workspace push -b stage -d ./code
Branches are labels (strings), not IDs. v1 is reserved.

Include data on pull/push

Add data alongside code:
  • --records — include table rows
  • --env — include env vars
  • --draft — include drafts
Combine for full backups: pull --env --records --draft.

Tenant push is blocked

xano release create v1 -b dev
xano tenant deploy_release my-tenant -r v1
Or iterate in a sandbox first, then promote.

Go deeper

Command Reference

Every command, subcommand, and flag.

Get Started

Install, authenticate, and pull your first code.

Team workflows

Branching, releases, and promotion across a team.

Push & pull

How the multidoc maps to a local folder tree.