Skip to content
/ grimoire Public

Grimoire (gʀiˈmwaːʀ), a book (tool) of magical knowledge about your code and its dependencies.

License

Notifications You must be signed in to change notification settings

BDP25/grimoire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

41f0a11 · May 5, 2025

History

94 Commits
Mar 31, 2025
May 5, 2025
May 5, 2025
Feb 27, 2025
May 1, 2025
May 5, 2025
May 5, 2025
Feb 27, 2025
May 5, 2025
May 5, 2025
Feb 28, 2025
Feb 27, 2025
May 5, 2025
Mar 6, 2025
May 5, 2025
May 5, 2025
Apr 26, 2025

Repository files navigation

Logo

grimoire

Grimoire (gʀiˈmwaːʀ), a book (tool) of magical knowledge about your code and its dependencies.

Contributors Issues License

Table of Contents

About the Project

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.

Usage

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                           │
╰─────────────────────────────────────────────────────────────────────────────╯

Development

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

License

Distributed under the MIT License. See LICENSE.md for more information.

Contributors

See the contributing guidelines for more information.

Project Authors:

  • Felix Céline (felixcel)
  • Kiritharan Kirishana (kiritkir)
  • Truninger John (trunijoh)