A small Flask app for indexing GitHub repos and asking questions about them. It walks a repo with Kit, extracts symbols (functions, classes, methods, types), embeds them with jinaai/jina-embeddings-v2-base-code, stores everything in SQLite with sqlite-vec, and answers questions over the indexed code via OpenRouter.
GitHub URL → Kit → SQLite (symbols) → sqlite-vec (embeddings) → similarity search → LLM answer
- Python 3.11+
- An OpenRouter API key (for chat)
- Optional: a GitHub token for higher rate limits when indexing
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # then fill in keys, or set them via the Settings pagerequirements.txt covers the Flask app; the pipeline also uses sqlite-vec and sentence-transformers, which come in via cased-kit's deps.
Acron uses SQLite (file-based, no server). The app auto-creates data/pipeline.db with the full schema on first run, so for normal use no manual DB step is required.
For grading / cold-start setup, the schema and seed data can be applied by hand:
mkdir -p data
sqlite3 data/pipeline.db < sql/create_schema.sql # creates all tables + indexes
sqlite3 data/pipeline.db < sql/initialize_data.sql # populates 15 rows per tableNotes:
sql/create_schema.sqlis the canonical schema;src/pipeline.pyembeds the same DDL for auto-init.- The
symbol_vectorsvirtual table needs thesqlite-vecextension. The Python app loads it automatically; the baresqlite3CLI will print ano such module: vec0warning for that one statement, which is safe to ignore for grading purposes — all other tables are created. - DB files live in
data/and are gitignored.
python src/app.py
# open http://localhost:5001From the homepage:
- Paste a
https://github.com/...URL to index a repo. - Click into the repo to browse files/symbols and run vector search.
- Use the chat box to ask questions — answers cite
file:lineand are saved as reports.
src/app.py— Flask routes (home, repo detail, chat, reports, settings).src/pipeline.py— indexing + embedding + search; also runnable standalone as a demo.sql/create_schema.sql— full relational schema (tables, indexes, vector table).sql/initialize_data.sql— sample data, 15 rows per table.templates/— Jinja templates.prototypes/— earlier scratch versions kept for reference.docs/— design notes (e.g.acron_db.md).data/— SQLite files (pipeline.db,acron.db) written by the app.
- All paths in the code are resolved relative to the repo root via
Path(__file__); you do not need to hard-code an absolute path. Run commands from the repo root (the directory containingREADME.md). - The app needs read/write access to
data/(SQLite writes its.dband-journalfiles there) and read access totemplates/,sql/, andsrc/. A standardgit clonegives correct permissions; if you copy the project around, ensuredata/is writable by the user runningpython src/app.py.
data/pipeline.dbanddata/acron.dbare SQLite files written by the app. They're gitignored.- API keys can live in
.envor be set via the in-app Settings page (stored in thesettingstable).