data
Chroma CLI for Headless Automation
Use the Chroma CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 5 read 2 write API key auth
Chroma CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Chroma CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Chroma CLI for Headless Automation
kosmokrator integrations:configure chroma --set api_key="$CHROMA_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call chroma.chroma_list_collections '{"limit":1,"after":"example_after"}' --json Discovery Before Execution
Agents and scripts can inspect Chroma docs and schemas before choosing a function.
kosmo integrations:docs chroma --json
kosmo integrations:docs chroma.chroma_list_collections --json
kosmo integrations:schema chroma.chroma_list_collections --json
kosmo integrations:search "Chroma" --json
kosmo integrations:list --json Useful Chroma CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
chroma.chroma_list_collections | Read | limit, after | List all vector collections in Chroma. Returns collection names and IDs that can be used for further operations. |
chroma.chroma_get_collection | Read | collection_id | Get details of a specific Chroma collection by its name or UUID, including metadata and document count. |
chroma.chroma_create_collection | Write | name, description, metadata | Create a new vector collection in Chroma. Collections are used to store and query document embeddings. |
chroma.chroma_add_documents | Write | collection_id, ids, embeddings, documents, metadatas | Add documents with embeddings to a Chroma collection. Each document requires an ID and either embeddings or text content. |
chroma.chroma_query_documents | Read | collection_id, query_embeddings, query_texts, n_results, where, where_document, include | Search for similar documents in a Chroma collection using query embeddings or text. Returns the most similar documents ranked by distance. |
chroma.chroma_get_document | Read | collection_id, ids, where, where_document, include, limit, offset | Retrieve specific documents from a Chroma collection by their IDs. Returns the full documents including text, embeddings, and metadata. |
chroma.chroma_get_health | Read | none | Check the health status of the Chroma vector database server. Returns heartbeat and version information. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.