To install the Xata CLI globally, run the following command:
npm install -g @xata.io/cli@latest
If you are installing the Xata CLI on Windows using Powershell you may need to wrap this part of the install command in quotes:
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.
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.
pnpm dlx, or
npx @xata.io/cli@latest <command>
- as a project dependency
npm run xata <command>