PandaAI comes with a command-line interface (CLI) that helps you manage your datasets and authentication.

Authentication

Before using PandaAI’s remote features, you need to authenticate with your API key. Use the login command:

pai login PAI-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

This will:

  1. Validate your API key format
  2. Store it in your .env file
  3. Preserve any other environment variables you might have

Dataset Management

Creating a Dataset

Create a new dataset through a guided process:

pai dataset create

You’ll be prompted for:

  • Dataset path (organization/dataset)
  • Dataset name (optional)
  • Description (optional)
  • Source configuration (type, connection details, etc.)

Pushing a Dataset

Push your local dataset to the remote server:

pai push organization/dataset

After pushing, you can access your dataset at: https://app.pandabi.ai/datasets/organization/dataset

Pulling a Dataset

Pull a dataset from the remote server:

pai pull organization/dataset

Command Reference

CommandDescription
login <api-key>Authenticate with your PandaBI API key
dataset createCreate a new dataset through a guided process
push <path>Push a dataset to the remote server
pull <path>Pull a dataset from the remote server

Path Format

Dataset paths should follow the format: organization/dataset

Examples:

  • my-org/sales-data
  • acme-corp/customer-metrics

Requirements:

  • Organization and dataset names must be lowercase
  • Only hyphens are allowed as separators
  • Both organization and dataset names are required