Skip to main content
Every command and flag has its own generated page in this group. This page covers what they share.

Running the CLI

A command the CLI prints for you to run next (a fix, a rerun) is spelled the same way for where you ran it.

Global flags

Every command takes these.

Credential flags

Every command that signs in (deploy, release, promote, tenant, workspace, ephemeral, env, pull, tables, login and the rest) takes the same set beside --profile: In CI, set XANO_INSTANCE_URL, XANO_WORKSPACE_ID and XANO_META_TOKEN together instead. That credential outranks every file and profile. See Environment & identity and CI/CD. A write to your workspace or a tenant asks for confirmation first. Off a terminal it needs --yes (-y), or it exits 1 with the command to rerun. A write to an ephemeral or a Xano Engine never asks.

Build flags

deploy, export, preflight, workspace diff and workspace reset-tables compile your project, and each takes this whole set: release create takes --strict and the env and documentation-token flags, but none of the lock flags. compile and routes take --strict and --lock. Each command’s page lists exactly what it takes.

Naming a backend

Every command that reads, writes or opens a running backend names it with one grammar, the backend selector: The flag follows what the command does with the backend: reads take --from, writes take --to, test takes --on, and a command whose subject is the backend takes it as an argument. A command that cannot serve a backend refuses it with the reason and the spellings it does take, whether you typed it or it came from the tracked backend.

The tracked backend

Leave the backend off and a command follows the one this project last deployed to, recorded in .xano/deployed.json. Only a deploy to an ephemeral or a Xano Engine records it. A deploy to your workspace or a tenant never does, so a bare command cannot reach something real unasked. With no record, a command falls back to the ephemeral recorded under your current credential, then to the Engine recorded for this directory, and otherwise refuses, naming the flag to pass. deploy is the exception: bare, it deploys to the Xano Engine (or an ephemeral with --ephemeral, or the workspace or a tenant with --to) and writes the record rather than reading it. generate and init --from always need a backend named. npx xanosdk status shows the tracked backend.

Output

When stdout is a terminal, commands print text. When it is not (a pipe, a file, a CI step), stdout carries one JSON document, a failure’s included, and progress goes to stderr. --json forces JSON on a terminal too.
Text stays text for --help, xanosdk version, and a command whose stdout is its data (export to stdout, --path -). Exit codes and outcomes covers every exit code, the failure document { ok: false, error: { code, message, exitCode, details } }, and the completed outcome of a release write.

Commands by group

Next