~/.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
The name of the currently active profile. Used for all Chroma Cloud commands.
UI theme for the collection browser. Options:
Dark, LightWhether to show update notifications when a new CLI version is available
Tracks installed sample applications and their versions
Environment Variables
The CLI and Chroma clients support several environment variables:Chroma Cloud Connection
.env
.env file:
Local Development
Backend Development (Go)
For developing Chroma’s Go backend:Server Configuration
When running a local Chroma server withchroma 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:- CLI generates a temporary token
- Opens browser to Chroma Cloud
- You authenticate with your account
- Select team (if applicable)
- Credentials saved to
~/.chroma/credentials - Profile set as active
Headless Login
For CI/CD or automated workflows:Connection Priority
When connecting to Chroma, credentials are resolved in this order:- Command-line flags (
--db,--host, etc.) - Environment variables (
CHROMA_API_KEY,CHROMA_DATABASE) - Active profile from
~/.chroma/credentials - Interactive prompts (if needed)
Sample App Configuration
Installed sample apps include aconfig.json file:
sample_app/config.json
.env file with:
sample_app/.env
Security Best Practices
Protect Credentials File
Protect Credentials File
The
~/.chroma/credentials file contains sensitive API keys. Ensure it has restricted permissions:Use Separate Profiles
Use Separate Profiles
Create separate profiles for development, staging, and production:
Environment Variables in CI/CD
Environment Variables in CI/CD
For automated deployments, use environment variables instead of profiles:
Rotate API Keys
Rotate API Keys
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
Related Commands
Login
Authenticate with Chroma Cloud
Profile Management
Manage multiple profiles
Database Commands
Create and manage databases
CLI Commands
Full command reference