pi-chroma
v1.0.0
Published
A Pi extension that indexes your local TypeScript/TSX codebase into Chroma Cloud, enabling semantic and symbol-based code retrieval directly within Pi's agent loop.
Readme
pi-chroma
A Pi extension that indexes your local TypeScript/TSX codebase into Chroma Cloud, enabling semantic and symbol-based code retrieval directly within Pi's agent loop.
Installation
This project is a Pi package. Load it by adding its path to your Pi workspace, or use it if installed globally. It automatically registers its commands and tools via package.json:
{
"pi": {
"extensions": ["./extensions/index.ts"]
}
}Quick Start
- Initialize configuration: Run
/chroma_initinside Pi to generate a starter config file. - Set credentials: Provide the required Chroma environment variables (
CHROMA_API_KEY,CHROMA_TENANT,CHROMA_DATABASE) and your embedding provider key (e.g.,OPENAI_API_KEY) as specified in your configuration. - Index repository: Run
/chroma_indexto index your codebase. - Search: Run
/chroma_search --semantic "state management"to test retrieval.
Commands
/chroma_init: Create.pi/chroma.json(project) or~/.pi/chroma.json(global)./chroma_index: Explicitly index or update the current Git repository./chroma_status: View the current index status, HEAD commit, and configuration./chroma_search: Search the indexed code.- Semantic search:
/chroma_search --semantic "query" - Symbol search:
/chroma_search --symbol MyComponent
- Semantic search:
Configuration & Internals
By default, the extension uses OpenAI for embeddings and tiktoken for chunking. You can customize providers (OpenAI, Custom, Chroma Default) and chunking limits in the .pi/chroma.json config file.
For detailed documentation on configuration, embedding providers, agent tools, and internal architecture, see docs/internals.md.
