Our CLI is distributed as an NPM package and can be installed using any Node package manager if you've got Node.js.

Installing the Xata CLI

To install the Xata CLI globally, run the following command:

npm install -g

This will install the Xata CLI. We recommend installing it globally because it becomes much more convenient to work with: you can invoke a xata command from anywhere.

Not Installing

If by any chance it is inconvenient or not desired to have the Xata CLI installed globally on your system, you can add it as a project dependency or execute the binary directly from your package manager.

  • npx, pnpm dlx, or yarn
npx <command>
  • as a project dependency
npm run xata <command>