Skip to main content
The Chroma CLI stores configuration in your home directory under ~/.chroma/. This includes authentication credentials, profiles, and user preferences.

Configuration Directory

All CLI configuration is stored in:

Profiles

Profiles allow you to manage multiple Chroma Cloud accounts or teams from a single CLI installation.

Profile Structure

Profiles are stored in ~/.chroma/credentials as JSON:
credentials

Managing Profiles

Profile Naming Rules

  • Profile names must contain only alphanumeric characters, underscores, or hyphens
  • Names cannot be empty
  • Names are case-sensitive

CLI Configuration File

The ~/.chroma/config.json file stores CLI preferences:
config.json

Configuration Fields

string
The name of the currently active profile. Used for all Chroma Cloud commands.
enum
default:"Dark"
UI theme for the collection browser. Options: Dark, Light
boolean
default:"true"
Whether to show update notifications when a new CLI version is available
object
Tracks installed sample applications and their versions

Environment Variables

The CLI and Chroma clients support several environment variables:

Chroma Cloud Connection

.env
These variables can be generated using:
Or written to a .env file:

Local Development

Backend Development (Go)

For developing Chroma’s Go backend:

Server Configuration

When running a local Chroma server with chroma run, you can use a YAML configuration file:

Configuration File Format

chroma-config.yaml

Running with Config File

When using a config file, the --path, --host, and --port flags are not available.

Authentication Flow

Interactive Browser Login

The default login method opens your browser:
Steps:
  1. CLI generates a temporary token
  2. Opens browser to Chroma Cloud
  3. You authenticate with your account
  4. Select team (if applicable)
  5. Credentials saved to ~/.chroma/credentials
  6. Profile set as active

Headless Login

For CI/CD or automated workflows:
Never commit API keys to version control. Use environment variables or secrets management.

Connection Priority

When connecting to Chroma, credentials are resolved in this order:
  1. Command-line flags (--db, --host, etc.)
  2. Environment variables (CHROMA_API_KEY, CHROMA_DATABASE)
  3. Active profile from ~/.chroma/credentials
  4. Interactive prompts (if needed)

Sample App Configuration

Installed sample apps include a config.json file:
sample_app/config.json
The installer creates a .env file with:
sample_app/.env

Security Best Practices

The ~/.chroma/credentials file contains sensitive API keys. Ensure it has restricted permissions:
Create separate profiles for development, staging, and production:
For automated deployments, use environment variables instead of profiles:
Regularly rotate your API keys and update profiles:

Troubleshooting

Reset Configuration

To reset CLI configuration:

View Configuration

Profile Not Found

If you see “No current profile found”:

Connection Issues

Verify your credentials:

Configuration Examples

Multi-Environment Setup

Team Collaboration

Local Development

Login

Authenticate with Chroma Cloud

Profile Management

Manage multiple profiles

Database Commands

Create and manage databases

CLI Commands

Full command reference