xanots release
reconciles to main.
This is one flow, not three. Solo is the base; a team adds review, and CI adds a machine
that runs the same commands. The commands themselves never change.
New here? Read Development workflows first — it covers the
choice between this and letting the workspace be authoritative, and what a Xano branch does
and does not isolate.
Git is the ideal path, not the only one. The Xano builder stays fully usable — open it any
time to look at what is live, debug an endpoint, or read request history. What changes is
writing: an edit made in the builder is invisible to your code, so your next release does
not know about it. That is recoverable, and in an emergency it is exactly what you should do —
see When you have to work outside git below, and read it
before you need it.
Day one
Two different starting points, and only one of them is irreversible.- A new project
- A workspace that already exists
Nothing exists yet, so nothing can be lost.A project from
xanots init is locked from its first export, so xano.lock is created
and maintained for you. See Git, locks & merges for what else
belongs in that first commit.The loop
1
Branch, and deploy to your own ephemeral
deploy goes to their own ephemeral, so two people can be mid-change
at once without touching each other or production. It is disposable and expires on its
own, so a bad deploy costs you nothing. Deploy as often as you like.2
Prove it
3
Open a pull request
Push the branch, then open the PR on GitHub/GitLab from the URL the push prints:Paste the ephemeral’s URL into the PR description. A reviewer gets a running backend and
frontend to click through, not just a diff.Review the TypeScript like any other code — plus the four things a normal code review
misses, which are covered in the review checklist.
Working solo? Skip this step and commit straight to
main — everything else on the
page is unchanged. New to git or pull requests? Git, locks &
merges opens with the eight commands these flows use and how a
PR actually works.4
Merge, then release from main
One person — or the pipeline below — releases:
Automating it
The same commands, run by a machine. Any runner works — the requirement is three environment variables, the credential shape that never expires or rotates:On every pull request
Build it, prove it, leave a live URL behind:--strictturns build warnings into failures.--frozen-lockfails if the export would changexano.lock, which catches someone who forgot to commit it.--testruns the deployed tests; a failing suite exits 5.
On merge to main
"upToDate": true and no updated_at moves.
--yes skips the confirmation prompt but never skips the printed preview, so the log still
shows what changed.
--prune (delete objects the project no longer defines) is deliberately absent here.
Deletions are worth a human reading the plan: xanots release ./xano/index.ts --prune --dry-run.A staged pipeline
Once it lands, you will be able to put the merge on a branch and make promotion a separate, human button:--dry-run on merge, have someone read the plan, then run the release.
Nightly, or before a release
Check the code against a real engine without touching anything you own.preflight creates
its own throwaway environment, imports into it, diffs the round trip, and deletes it again:
Ready-to-paste pipelines
Same four commands either way — only the YAML around them differs.GitHub Actions
GitHub Actions
baseUrl — and feed it to
actions/github-script. The raw workspace blob is never printed, so nothing sensitive
reaches the log.GitLab CI
GitLab CI
Any other runner
Any other runner
There is nothing runner-specific in the flow — three environment variables and four
commands. On a PR:On merge to the default branch:Exit codes are the contract:
--test exits 5 on a failing suite, and a static failure
after a committed backend deploy exits 3 with a resumable message.When a release goes wrong
Your code is the record of what production should be, so rolling back is releasing an earlier version of it. There is no separate undo command — and that is a feature, because it means the rollback goes through the same reviewed, repeatable path as everything else.1
Get main back to the last good state
revert makes a new commit undoing the old one, so the history stays honest and the
rollback is itself reviewable.2
Read the plan before you send it
3
Release
What a rollback does and does not restore
If you are not sure whether the release even landed
Run it again and read the plan. A release compares before it sends, so when the workspace already matches your code, nothing is sent at all — the plan printsno changes, the
summary reports "upToDate": true, and no updated_at moves. Re-running is safe and is the
fastest way to find out where you stand.
When you have to work outside git
Production is down at 2am, or someone fixed a typo in the builder because it was thirty seconds’ work. This happens on real teams, and doing it breaks nothing permanently — as long as you bring the change back into git before your next release.What is safe, and what is not
Bringing the change back
Reconcile the same day — the risk grows the longer the two copies disagree.1
Pull the live workspace over your checkout
2
Read the diff — this is the whole point
3
PR it like any other change
Now the fix exists in code, in review, and in history — and your next release knows about
it.
If this keeps happening
One emergency hotfix a quarter is normal. If the diff regularly shows work you did not expect, that is data rather than a discipline problem: people are choosing the builder because it suits how they work. At that point the repo is not really your source of truth. The arrangement that fits is Workspace is the truth — builder edits as the expected path, with Xano branches as the merge — but the branch releases it needs are still in development, so it is not adoptable yet. Until it lands, the practical answer is to make reconciling routine rather than exceptional: pull the workspace back on a schedule (a weeklyxanots init . --from workspace on a branch,
reviewed and merged like any PR) so drift is caught in days rather than discovered by a
--prune.
Other arrangements
A preview environment per pull request
A preview environment per pull request
Nothing extra to configure: the PR job above already deploys to an ephemeral and prints
the URL. Post it as a PR comment and let it expire on its own, or tear it down on merge:
An AI builder (Bolt, Lovable) driving the backend
An AI builder (Bolt, Lovable) driving the backend
Several backends in one repo
Several backends in one repo
Each entry file is its own workspace and gets its own credential, its own
xano.lock
beside it, and its own release. Point every command at the entry explicitly:lock rename and friends look for xano.lock in the current directory unless you pass
--entry=<path>, so always pass it in a multi-backend repo.