Skip to main content
If you already have a frontend (a Vite app, Next.js, anything with a package.json), init adds a Xano backend beside it and leaves your app alone.
On Windows or an Intel Mac? There is no Xano Engine build for your machine yet. Wherever this page says npm run xano:deploy, run npm run xano:deploy:ephemeral instead: it deploys the same code to an ephemeral in Xano’s cloud. That needs a Xano account, so sign in first (Connect to Xano). See where the Engine differs today.

Add the backend

From your app’s root:
In a directory that already has files, init asks nothing and writes no frontend. It adds:
  • xano/, the same empty starter a new project gets. If your package.json is not "type": "module", it also writes xano/package.json with only {"type": "module"}, so xano/ loads as ES modules without changing your project.
  • The xano:* scripts and the backend’s dependencies, merged into your package.json. Your entries win: a dependency you already have keeps its range, and a script you already have keeps its command.
  • A marked block in .gitignore and in AGENTS.md. The rest of each file is left as it was.
It writes no README, CI workflow or root tsconfig.json. If init would overwrite anything (an existing xano/, or a xano:* script with a different command), it lists every clash and writes nothing. --force lists what it would overwrite and asks first.

The scripts it adds

There is no xano:deploy:frontend and no --static: your app keeps its own build and hosting.

Run the backend

It deploys to the Xano Engine and prints the backend URL, for example http://127.0.0.1:53358. npx xanosdk status prints it again later.

Point your frontend at it

In a project init scaffolded, the deploy writes the URL into .env.local for you. In an existing app it does not, so set it yourself. For a Vite app, in .env.local:
Then read it where you call the backend. If you later serve a build from Xano with xanosdk deploy --static, the deploy injects the backend URL as window.XANO_HOST, so read that first and fall back to the build-time value:
Other frameworks use their own public variable prefix (for example NEXT_PUBLIC_ in Next.js). Typed frontend shows how to take request paths and types from xano/routes.gen.ts instead of typing URLs by hand.
If your root tsconfig.json includes every .ts file (Next.js’s does), add "xano/lambdas" to its exclude before you write your first lambda. Lambda code type-checks only under xano/lambdas/tsconfig.json.

Next