Get started with Xata

The Xata starter guides walk you through building a blog application and help you learn core Xata fundamental concepts. The guides explore framework-specific features and demonstrate how they work with Xata.

The guides demonstrate the following features:

  • Using the Xata CLI to create a database
  • Defining a database schema and seeding the database by importing a CSV
  • Generating TypeScript code with database branching
  • Querying and filtering
  • Using full-text fuzzy search

Each getting started guide requires you to install the Xata CLI, authenticate it, and store the CLI API key locally.

The Xata command line interface (CLI) allows you to work with your Xata serverless database directly from your command line and is important for integrating Xata's capabilities into your project. Using the CLI, you can manage your database, schemas, and import data.

To install the Xata CLI, use the following command:

npm install -g @xata.io/cli

To learn more about the Xata CLI, refer to the documentation

Authentication links the CLI to your Xata account, enabling you to perform database operations securely. If you are not yet a Xata user, the authentication process also guides you through creating a new account.

You can use the command xata auth login to initiate authentication. Following authentication, an API key specific to your account is generated. The generated API key ensures communication between your CLI and the Xata databases you'll manage.

The key is stored locally on your computer. The exact storage location can vary depending on your operating system. Typically, the API key is stored in the configuration file .config/xata/credentials, with the following format:

[default]
apiKey=YOUR_API_KEY_HERE

The CLI makes it easier to manage your database activities directly from the terminal. By authenticating the CLI and securely storing your API key locally, you ensure that your database operations are protected and that only authorized users can access your data.

To learn more about authentication, refer to the documentation.

Select either the Astro, Next.js, Nuxt, Remix, SolidStart, or SvelteKit starter guide to begin building a blog application with Xata.