Skip to main content
The Chroma CLI provides a comprehensive set of commands for managing local Chroma servers, Chroma Cloud databases, collections, and more.

Installation

The CLI is bundled with the ChromaDB Python package and available as the chroma command.

Global Options

Commands Overview

run

Start a local Chroma server

db

Manage Chroma Cloud databases

browse

Browse collections interactively

copy

Copy collections between environments

login

Log in to Chroma Cloud

profile

Manage Chroma Cloud profiles

vacuum

Vacuum a local database

install

Install sample applications

run

Start a local Chroma server.

Arguments

  • config_path - Path to a Chroma config file (optional)

Options

string
The persistence path to your Chroma DB. Cannot be used with config_path.
string
default:"localhost"
The host to listen to. Cannot be used with config_path.
number
The port to run the server on. Cannot be used with config_path.

Examples

Output

When the server starts successfully, you’ll see:
  • Chroma logo
  • Data storage path
  • Server URL
  • Getting started guide link
  • Chroma Cloud signup information

db (Database Management)

Manage Chroma Cloud databases.

Subcommands

db create

Create a new database in Chroma Cloud.
Arguments:
  • name - The name of the DB to create (optional, will prompt if not provided)
Options:
  • --dev - Flag to use during development (hidden)
Examples:

db list

List all available databases.
Options:
  • --dev - Flag to use during development (hidden)
Examples:

db connect

Generate a connection snippet for a database.
Arguments:
  • name - The name of the DB to connect to (optional, will prompt if not provided)
Options:
enum
Programming language for the connection snippet. Options: python, javascript, typescript
boolean
Add Chroma environment variables to a .env file in the current directory. Cannot be used with --language or --env-vars.
boolean
Output Chroma environment variables. Cannot be used with --language or --env-file.
Examples:

db delete

Delete a database.
Arguments:
  • name - The name of the DB to delete (optional, will prompt if not provided)
Options:
  • --force - Delete without confirmation (hidden)
  • --dev - Flag to use during development (hidden)
Examples:
Deleting a database is permanent and cannot be undone. All data in the database will be lost.

browse

Browse Chroma collections with an interactive TUI (Terminal User Interface).

Arguments

  • collection_name - The name of the collection to browse (required)

Options

string
The Chroma Cloud DB name with your collection
boolean
Find this collection on a local Chroma server
enum
Theme for the collection browser. Options: Dark, Light
string
The hostname for your local Chroma server. Cannot be used with --path.
string
The data path for your local Chroma server. Cannot be used with --host.

Examples


copy

Copy collections between local and Chroma Cloud environments.

Options

boolean
Copy all collections. Cannot be used with --collections.
string[]
The names of collections to copy. Can be specified multiple times.
boolean
Copy from a local Chroma server. Cannot be used with --from-cloud or --to-local.
boolean
Copy from Chroma Cloud. Cannot be used with --to-cloud or --from-local.
boolean
Copy to a local Chroma server. Cannot be used with --to-cloud.
boolean
Copy to Chroma Cloud.
string
Chroma Cloud DB with the collections to copy
string
Local Chroma server host. Cannot be used with --path.
string
Data path for your local Chroma server. Cannot be used with --host.
number
default:"100"
Batch size for records when copying. Min: 1, Max: 300.
number
default:"5"
Number of concurrent processes when copying. Min: 1, Max: 8.

Examples

The copy command performs a one-time copy operation. Collections must not already exist in the target environment.

login

Log in to Chroma Cloud.

Options

string
Profile name to associate with auth credentials
string
API key for headless authentication. When used with --profile, enables headless login.
boolean
Flag to use during development (hidden)

Examples

Interactive Login Flow

  1. Opens your browser to Chroma Cloud
  2. Authenticate with your account
  3. Select team (if you belong to multiple)
  4. Credentials are saved to ~/.chroma/credentials
  5. Profile is set as active

profile

Manage Chroma Cloud profiles.

Subcommands

profile list

List all available profiles.

profile show

Show the current active profile.

profile use

Set the active profile.
Arguments:
  • name - The name of the profile to use (required)
Examples:

profile delete

Delete a profile.
Arguments:
  • name - The name of the profile to delete (required)
Options:
  • --force - Skip delete confirmation for the active profile
Examples:

profile rename

Rename a profile.
Arguments:
  • name - The name of the profile to rename (required)
  • new_name - The new name for the profile (required)
Examples:

vacuum

Vacuum a local Chroma persistent directory to reclaim disk space.

Options

string
The path of your Chroma DB
boolean
default:"false"
Skip vacuum confirmation
number
Maximum time (in seconds) to wait for vacuum

Examples

Vacuum blocks both reads and writes to the database while running. We recommend shutting down the server before running this command.
If you upgraded from Chroma version below 0.5.6 to 0.5.6 or above, run vacuum once to greatly reduce database size and enable continuous database pruning.

install

Install sample applications from the Chroma repository.

Arguments

  • name - The name of the sample app to install (optional, will prompt if not provided)

Options

boolean
List all available sample apps. Cannot be used with name or --local.
boolean
Configure the app for local Chroma server
string
Database name to use (required for cloud mode)

Examples


update

Check for Chroma CLI updates.
Checks if a newer version of the Chroma CLI is available and provides update instructions.

docs

Open the Chroma online documentation.
Opens https://docs.trychroma.com in your default browser.

support

Open the Chroma Discord community.
Opens the Chroma Discord server in your default browser.

Environment Variables

The CLI respects several environment variables:
  • CHROMA_API_KEY - API key for Chroma Cloud
  • CHROMA_TENANT - Tenant ID
  • CHROMA_DATABASE - Database name
  • POSTGRES_HOST - PostgreSQL host (for Go backend development)
  • POSTGRES_PORT - PostgreSQL port (for Go backend development)

Configuration Files

CLI configuration is stored in ~/.chroma/:
  • credentials - Stored profile credentials
  • config.json - CLI configuration and preferences
See Configuration for details.