A command-line tool for managing document collections in ChromaDB to provide relevant context for LLMs.
This tool is used to inject context into LLMs and agents like Aider. It could also be used with
- Create, list, and delete ChromaDB collections
- Upload documents from directories
- Query collections for relevant text chunks
- Inject context directly into LLM prompts
uv
Note
One can also install with:
uv tool install --force git+https://github.com/ryangreenup/chroma_query-
git clone
-
just serve -
Make a collection 3.
uv run -- python main.py mk my-docs -
Upload Docs 3.
uv run -- python main.py upload my-docs /path/to/docs -
Query Docs 3.
uv run -- python main.py query my-docs 'Some Search Term' -
Use from Aider. The default chunk size is 1000 tokens (ideal for embedding), so 2 results is 2000 tokens off the context window 3.
/run uv run -- python main.py query my-docs 'Some Search Term' --n-results 2 --inject -
Make aliases whilst running a project
alias cs-ark="chroma-search --host localhost --port 8000 query 'web.components.ark' --n-results 2 --inject"
alias cs="chroma-search --host localhost --port 8000"
# Create a collection
python main.py mk "collection_name"
# List all collections
python main.py ls
# Delete a collection
python main.py rm "collection_name"- Documents are split into chunks of size
upload --chunk-size - Chunks are stored in ChromaDB with metadata
- Chroma's default semantic search finds relevant chunks for queries
- Results can be injected into Aider
See the justfile for example commands:
just example-create-collection
just example-upload-docs
just example-query-docs# Format code
just fmt
# Type check
just check-
- Big dependency that changes too often. Large context window solves the problem anyway.
-
Automatically pull LLMs.txt
- This would be convenient, e.g. the SolidJS/llms.txt or DaisyUI/llms.txt
-
MCP Server
-
Example MCP Servers
-
Chroma MCP
-
MCP SDK (roll your own)
-
Zed MCP integration
Write a simple plugin in Rust that runs the MCP server for Zed.
-
See Also