Get instant context on any codebase. One command to index, ask questions in plain English, get answers grounded in actual code.
Project description
Sourcefire
You inherited a codebase. Maybe AI wrote it. Maybe a dev who left wrote it. Either way, you have no idea what's going on.
Sourcefire gives you instant context. Point it at any project, ask questions in plain English, and get answers grounded in the actual code — not hallucinations.
pip install sourcefire
cd your-project
sourcefire
One command. No config. It indexes your codebase, opens a web UI, and you start asking:
- "Where does authentication happen?"
- "What does this error mean?" (paste the stack trace)
- "How would I add a new API endpoint following the existing patterns?"
- "Explain the data flow from request to database"
Sourcefire reads the code so you don't have to.
Why
AI-generated codebases are everywhere now. Cursor, Copilot, Claude — they write thousands of lines fast, but the human on the team still needs to understand what was built, where things live, and how it all connects.
Reading every file isn't realistic. Grep only works when you know what to search for. Sourcefire fills the gap: it understands your code structurally and lets you query it conversationally.
How It Works
Sourcefire creates a .sourcefire/ directory in your project:
.sourcefire/
├── config.toml # Auto-generated project config
├── chroma/ # Local vector database
└── graph.json # Import graph
On first run, it:
- Scans your project structure and asks an LLM to figure out what to index
- Chunks your code at function/class boundaries (AST-aware, not dumb line splits)
- Embeds everything into a local ChromaDB database — no server, no PostgreSQL
- Builds an import graph so it can trace dependencies
- Starts a web UI and watches for file changes to keep the index live
Everything stays local. No data leaves your machine except the queries you send to Gemini.
Requirements
- Python 3.11+
- A Gemini API key — Sourcefire prompts for it on first run and saves it to
.env
What You Can Ask
Debug mode — paste a stack trace or error, Sourcefire traces through the actual files:
"I'm getting a 500 error on /api/users — the traceback mentions auth_middleware.py:34"
Feature mode — understand architecture and add new code in the right place:
"How is the payment system structured? Where would I add refund support?"
Explain mode — get walkthroughs of how things connect:
"Walk me through what happens when a user signs up, from the route handler to the database"
The LLM has 18 tools at its disposal — it can read files, search code, trace call chains, check git blame, find definitions, and more. It doesn't just answer from the index; it actively explores your codebase during the conversation.
Languages
Python, JavaScript/TypeScript, Go, Rust, Java, Dart, C, C++. Falls back to plain text chunking for anything else.
CLI
sourcefire [--port PORT] [--no-open] [--reinit] [--verbose]
| Flag | Description |
|---|---|
--port PORT |
Server port (default: 8000) |
--no-open |
Don't auto-open browser |
--reinit |
Re-generate include/exclude patterns via LLM |
--verbose |
Verbose logging |
Run from any subdirectory — Sourcefire walks up the tree to find .sourcefire/, just like git finds .git/.
Configuration
After first run, edit .sourcefire/config.toml if you want to tweak anything:
[project]
name = "my-project"
language = "auto"
[indexer]
include = ["src/**/*.py"]
exclude = ["__pycache__/**", ".venv/**"]
[llm]
model = "gemini-2.5-flash"
[retrieval]
top_k = 8
Most people never touch this. The defaults work.
License
MIT — Built by Athar Wani / Cravv HQ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sourcefire-0.3.7.tar.gz.
File metadata
- Download URL: sourcefire-0.3.7.tar.gz
- Upload date:
- Size: 56.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64757c0e6d1035858d34191668548d683e4080b6b0eef96c3135b51cb3b6f0f1
|
|
| MD5 |
45a360da45cda216868e59f87a932bf6
|
|
| BLAKE2b-256 |
0a3e9c6c323d63421ff18fe44e6242ea51c922b5633c247e70b3440e878782c3
|
Provenance
The following attestation bundles were made for sourcefire-0.3.7.tar.gz:
Publisher:
publish.yml on waniathar2/sourcefire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sourcefire-0.3.7.tar.gz -
Subject digest:
64757c0e6d1035858d34191668548d683e4080b6b0eef96c3135b51cb3b6f0f1 - Sigstore transparency entry: 1172002662
- Sigstore integration time:
-
Permalink:
waniathar2/sourcefire@2df509442c66b4aa7d4754bd306168971e04f57c -
Branch / Tag:
refs/tags/v0.3.8 - Owner: https://github.com/waniathar2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2df509442c66b4aa7d4754bd306168971e04f57c -
Trigger Event:
release
-
Statement type:
File details
Details for the file sourcefire-0.3.7-py3-none-any.whl.
File metadata
- Download URL: sourcefire-0.3.7-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bde29bf79e7bb61ac7e0c6905029a10776b65054c8e4d0d7f5292cff97cd392
|
|
| MD5 |
8aa03bf73a9156097d784c9f4d927231
|
|
| BLAKE2b-256 |
9290d7a0ae2bd92e1f736dc1f2ecb13afdb0a79dbc3842eccdcaba73930d5704
|
Provenance
The following attestation bundles were made for sourcefire-0.3.7-py3-none-any.whl:
Publisher:
publish.yml on waniathar2/sourcefire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sourcefire-0.3.7-py3-none-any.whl -
Subject digest:
1bde29bf79e7bb61ac7e0c6905029a10776b65054c8e4d0d7f5292cff97cd392 - Sigstore transparency entry: 1172002692
- Sigstore integration time:
-
Permalink:
waniathar2/sourcefire@2df509442c66b4aa7d4754bd306168971e04f57c -
Branch / Tag:
refs/tags/v0.3.8 - Owner: https://github.com/waniathar2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2df509442c66b4aa7d4754bd306168971e04f57c -
Trigger Event:
release
-
Statement type: