Ever joined a new software project with an unfamiliar tech stack? You’re faced with internal libraries, legacy code, scattered documentation, and dependency-breaking changes. Typically, you’d rely on docs, Stack Overflow, code exploration, and now LLMs like ChatGPT. But these tools don’t fully understand your project’s context—frustrating, right?
That’s why we built Grimoire. It’s a powerful client tool that leverages RAG (Retrieval-Augmented Generation) to deeply understand your code, documentation, dependencies, and project structure. Grimoire acts as your personal AI assistant, helping you onboard faster, develop smarter, and navigate your project with ease.
- 🔍 Deep Code Understanding – Grimoire analyzes your entire codebase for better insights.
- 📚 Seamless Documentation Access – No more searching; get the right info instantly.
- 🧩 Smart Dependency Mapping – Know how everything connects in your project.
First create a new Gemini API key in the Google AI Studio and save it as LLM_API_KEY
in your environment.
export LLM_API_KEY=<your-api-key>
Start the local pgvector database:
docker compose up -d
Then you can use the grim
client to interact with grimoire.
# with the uv project context
uv run grim --help
# or if you have installed the package
grim --help
Usage: grim [OPTIONS] COMMAND [ARGS]...
A cli which enables RAG for your project 🔮
Prequsites:
- Get an LLM API token (e.g. from https://aistudio.google.com/app/apikey)
- Set the LLM_API_TOKEN environment variable to the token
╭─ Options ───────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│ version Print the version of the grim cli │
│ ask Ask a question with project context │
│ flush Flush the whole vectorstore │
│ init Initialize a new grimoire project │
│ sync Sync the grimoire project with existing configuration │
│ verify Verify the configuration of the project │
╰─────────────────────────────────────────────────────────────────────────────╯
The project is using uv as the python project manager. In addition Poe the Poet is used to run tasks.
Some important uv commands:
# install pyproject dependencies
uv sync
# install a package
uv add <package>
uv add <package> --dev
# run a script
uv run python sandbox/text_ingestion.py
# run poe tasks
uv run poe all # run all tasks
uv run poe format # format code
uv run poe lint # lint code
uv run poe types # type check code
uv run poe test # run tests
Distributed under the MIT License. See LICENSE.md for more information.
See the contributing guidelines for more information.
Project Authors:
- Felix Céline (felixcel)
- Kiritharan Kirishana (kiritkir)
- Truninger John (trunijoh)