Command-line Interface

Complete reference for the Xata CLI

The Xata CLI is a powerful tool for managing your Xata databases, projects, and organizations from the command line. It provides commands for authentication, project management, database operations, and more.

Installation (macOS/Linux)

# Install using npm
curl -fsSL https://xata.io/install.sh | bash

Installation (Windows)

# Install using npm
powershell -c "irm https://xata.io/install.ps1 | iex"

Note: xata clone currently doesn't work with the native Windows installation. We currently recommend using WSL with the Linux binaries if you need the clone functionality on Windows. Track progress here.

Basic Usage

xata [command] [subcommand] [options]

Available Commands

Authentication

Project Management

Organization Management

Branch Management

Schema Migrations

Database Synchronization

  • clone start - Clone a PostgreSQL database with anonymization
  • clone config - Configure transforms for the clone command

Utility Commands

Global Flags

  • -h, --help - Print help information and exit
  • -v, --version - Print version information and exit
  • --json - Output in JSON format (where applicable)