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

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

Global Options

chroma --help     # Show help information
chroma --version  # Show CLI version (current: 1.4.1)

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.
chroma run [config_path] [options]

Arguments

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

Options

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

Examples

# Run with default settings (localhost:8000)
chroma run

# Run on custom port
chroma run --port 9000

# Run with custom data path
chroma run --path ./my-chroma-data

# Run with config file
chroma run /path/to/config.yaml

# Run on all interfaces
chroma run --host 0.0.0.0 --port 8000

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.
chroma db <subcommand> [options]

Subcommands

db create

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

db list

List all available databases.
chroma db list [options]
Options:
  • --dev - Flag to use during development (hidden)
Examples:
chroma db list

db connect

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

# Get JavaScript snippet
chroma db connect my-database --language javascript

# Create .env file
chroma db connect my-database --env-file

# Output environment variables
chroma db connect my-database --env-vars

db delete

Delete a database.
chroma db delete [name] [options]
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:
chroma db delete my-database
chroma db delete my-database --force  # Skip confirmation
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).
chroma browse <collection_name> [options]

Arguments

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

Options

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

Examples

# Browse a cloud collection
chroma browse my_collection --db my-database

# Browse a local collection
chroma browse my_collection --local

# Browse with custom theme
chroma browse my_collection --theme Light

# Browse from custom host
chroma browse my_collection --host http://localhost:9000

# Browse from custom path
chroma browse my_collection --path ./my-chroma-data

copy

Copy collections between local and Chroma Cloud environments.
chroma copy [options]

Options

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

Examples

# Copy all collections from local to cloud
chroma copy --from-local --to-cloud --all --db my-database

# Copy specific collections
chroma copy --collections my_collection --collections another_collection --to-cloud --db my-database

# Copy from cloud to local with custom batch size
chroma copy --from-cloud --to-local --all --db my-database --batch 200

# Copy with custom concurrency
chroma copy --from-local --to-cloud --all --concurrent 8 --db my-database
The copy command performs a one-time copy operation. Collections must not already exist in the target environment.

login

Log in to Chroma Cloud.
chroma login [options]

Options

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

Examples

# Interactive browser login
chroma login

# Login with custom profile name
chroma login --profile my-team

# Headless login (requires both --api-key and --profile)
chroma login --api-key YOUR_API_KEY --profile my-profile

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.
chroma profile <subcommand> [options]

Subcommands

profile list

List all available profiles.
chroma profile list

profile show

Show the current active profile.
chroma profile show

profile use

Set the active profile.
chroma profile use <name>
Arguments:
  • name - The name of the profile to use (required)
Examples:
chroma profile use my-team

profile delete

Delete a profile.
chroma profile delete <name> [options]
Arguments:
  • name - The name of the profile to delete (required)
Options:
  • --force - Skip delete confirmation for the active profile
Examples:
chroma profile delete old-profile
chroma profile delete current-profile --force

profile rename

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

vacuum

Vacuum a local Chroma persistent directory to reclaim disk space.
chroma vacuum [options]

Options

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

Examples

# Vacuum default location
chroma vacuum

# Vacuum custom path
chroma vacuum --path ./my-chroma-data

# Force vacuum without confirmation
chroma vacuum --force

# Vacuum with timeout
chroma vacuum --timeout 300
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.
chroma install [name] [options]

Arguments

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

Options

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

Examples

# List available sample apps
chroma install --list

# Install a sample app
chroma install my-sample-app

# Install for local development
chroma install my-sample-app --local

# Install for cloud with database
chroma install my-sample-app --db my-database

update

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

docs

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

support

Open the Chroma Discord community.
chroma support
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.

Build docs developers (and LLMs) love