Pull
Pull downloads your workspace as individual.xs (XanoScript) files, organized by type.
This creates a directory structure like:
.xs file. Key details:
- API endpoints are grouped under
api/{group_name}/directories, with each group containing anapi_group.xsand endpoint files named{name}_{verb}.xs - Hierarchical functions (with
/in the name) are split into subdirectories - AI resources (agents, tools, MCP servers) are grouped under
ai/, with triggers inai/{type}/trigger/ - Realtime resources are organized under
realtime/channel/andrealtime/trigger/ - Triggers are placed in
trigger/subdirectories within their parent type (table/trigger/,ai/agent/trigger/, etc.) - All filenames are converted to
snake_case
Pull Options
| Flag | Description |
|---|---|
-b | Branch name (overrides profile; defaults to live branch) |
-w | Workspace ID (overrides profile) |
--env | Include environment variables |
--records | Include database records |
--draft | Include draft versions of resources |
Include environment variables
Include database records
Pull your table records alongside the schema. This is also a convenient way to create a local backup of your data before pushing schema changes.Both
Pull a specific branch
If-b is not provided, the pull targets the branch stored in your profile. If no branch is set in your profile, it defaults to the live branch.
Push
Push uploads all local.xs files back to your Xano workspace, syncing your local changes.
The CLI recursively collects all .xs files from the directory, sorts them alphabetically, combines them into a single payload, and sends them to Xano. After completion, the CLI displays the total execution time.
| Flag | Description |
|---|---|
-b | Branch name (overrides profile; defaults to live branch) |
-w | Workspace ID (overrides profile) |
--records | Include table records in the push — requires local files pulled with --records |
--env | Include environment variables in the push — requires local files pulled with --env |
--dry-run | Show the push preview, then exit without applying changes |
--force | Skip the automatic preview and confirmation prompt — useful for CI/CD pipelines |
--partial | Push without requiring a workspace block — useful for pushing a subset of files |
--delete | Delete objects in Xano that are not present in the push |
--no-sync-guids | Skip writing server-assigned GUIDs back to local files |
--truncate | Truncate all table records before importing |
Push Preview
Everyxano workspace push automatically runs a preview before making any changes. The CLI performs a dry-run against your Xano instance and shows you exactly what will happen — then prompts for confirmation before proceeding.
If there are no changes to apply, the CLI exits with No changes to push. If changes are detected, the preview is shown before the confirmation prompt.
Summary & Changes
The preview opens with a per-type count of what will be created, updated, or deleted — color-coded green, yellow, and red — followed by the non-destructive operations: new objects being created (CREATE), existing objects being updated (UPDATE), and fields being added or modified (ADD_FIELD, UPDATE_FIELD).

Destructive Operations
Operations that can cause data loss are listed separately and highlighted:DELETE, CASCADE_DELETE, TRUNCATE, DROP_FIELD, and ALTER_FIELD. When destructive operations are present, the confirmation prompt explicitly warns you before asking to proceed.


Remote Only
Objects that exist in your Xano workspace but are not in your local files. These are shown when--delete is not set — they will not be deleted, but the preview makes them visible so you’re aware of the discrepancy.

Verbose mode
Add-v to see a reason line under each operation explaining why the server classified it that way:
Preview only (dry run)
Use--dry-run to see the full preview — changes, destructive operations, remote-only items, and records — then exit without pushing. Nothing is applied.
This is useful when you want to inspect what a push would do before committing to it — especially helpful for AI agents that need to review the impact of changes before deciding to proceed.
Skipping preview
Use--force to bypass the preview and confirmation prompt entirely — useful in CI/CD pipelines or scripted workflows:
In non-interactive environments (e.g. piped output), the CLI detects that it cannot prompt for confirmation, warns you, and proceeds automatically — as if
--force were set.Push Options
Push with records
Records are off by default on push, matching pull behavior. To include records, you must have first pulled with--records (so the data exists locally), then explicitly pass --records on push:
Push with environment variables
Environment variables are also off by default on push. Pull with--env first, then push with --env:
Push with records and environment variables
Partial push (no workspace block required)
Use--partial to push a subset of your local files — for example, just an API group, a set of functions, or a single endpoint — without needing a workspace.xs file in the push. The workspace is identified via your profile or -w flag instead.
For example, if your workspace looks like this:
--partial enables:
- No workspace block required — a full push needs a
workspace.xsfile to identify the workspace;--partialskips that requirement - Implies
--no-delete— objects on the remote that aren’t in your partial push are left alone; only the files you’re pushing are created or updated - Scoped updates — push just functions, a single API group, middleware, or any other subset without touching the rest of the workspace
--partial, pushing a subfolder would fail because there’s no workspace block to identify the workspace.
Delete removed objects
Use--delete to remove any objects in Xano that are not present in your local files. This ensures your workspace matches your local directory exactly.
Skip GUID sync
By default, after a push the CLI writes server-assigned GUIDs back into your local.xs files. Use --no-sync-guids to skip this step — useful in CI/CD pipelines or when you don’t want local files modified.
Truncate table records before importing (staging/test workspaces only)
Use--truncate to wipe all existing rows from every table before importing records from your local files. This is useful when you want a clean slate — for example, resetting a staging or test workspace to a known dataset before running automated tests, or re-seeding a fresh environment with fixture data.
Pull from Git
You can pull XanoScript files directly from a Git repository (GitHub, GitLab, or any git URL) into a local directory — without needing to clone the repo yourself. This fetches all.xs files from the repository and organizes them into the same directory structure as a workspace pull.
Git Pull Options
| Flag | Description |
|---|---|
-r | Git repository URL (required) — supports HTTPS, SSH, GitHub, and GitLab URLs |
-b | Branch, tag, or ref to fetch (defaults to the repository’s default branch) |
-t | Personal access token for private repos (falls back to GITHUB_TOKEN env var) |
--path | Subdirectory within the repo to import from |
URL Formats
You can pass a variety of URL formats — the CLI extracts the owner, repo, branch, and path automatically:Workflow: Import from Git, Push to Xano
A common use case is pulling XanoScript from a shared Git repository and pushing it to a workspace. For example, you can pull the Hello World sample from the XanoScript examples repo and push it to your workspace:Typical Workflow
A common development cycle looks like this:Make changes locally
Edit
.xs files in VS Code with the XanoScript Language Server extension for syntax highlighting and inline validation.Review changes with Git
Before pushing, review exactly what changed using Git:Pay close attention to any table schema changes — renamed columns, removed fields, or changed field types — as these can affect existing data.
Preview the push
Run a dry run to see exactly what the push will do — without applying anything:Review the output for any unexpected changes, especially destructive operations or schema modifications.
Push changes back
Once you’re satisfied with the preview, run the actual push. The CLI shows the same preview again and prompts for confirmation before applying:

Git works like it always has
Your workspace is plain files on disk — git init, commit, branch, and open PRs exactly like any other project. Xano’s push/pull fits into your Git workflow, not the other way around.
Working with Git
Since pull outputs standard files to your filesystem, you can version control your XanoScript with Git: This gives you full commit history, diffs, branching, and collaboration through Git — on top of Xano’s own branching system.Tips
- Pull before you push to avoid overwriting changes made by teammates in the Xano dashboard.
- Use branches for development work. Create a branch with
xano branch create -l dev, then use-b devon push and pull commands to target it without affecting the live branch. - Snapshot your data by pulling with
--recordsbefore pushing schema changes. This gives you a local copy of your database records you can restore from if needed. To push those records back, pass--recordson push as well — records are off by default in both directions. - Use
--partialwhen you only need to push a few specific resources instead of the entire workspace. - Combine with AI tools like Claude Code or Cursor to generate and edit XanoScript locally, then push the results. See the Start from Scratch and Work from Existing guides for full walkthroughs.
Troubleshooting
If a push or pull isn’t working as expected, use the-v (verbose) flag to see the full request and response details:
Verbose mode shows:
- The HTTP method and full URL being called
- Request headers (with the authorization token partially masked)
- The request body (truncated to 500 characters for readability)
- The response status code and elapsed time
XANO_VERBOSE environment variable: