RAG-driven documentation search, fully offline, right in your terminal.
Inspiration
Developers spend too much time searching for documentation, switching between browser tabs, and struggling with unfamiliar libraries. Alexandria eliminates this friction by scanning projects, indexing dependencies, and providing instant, AI-powered answers—all locally. Inspired by the Library of Alexandria, we built a tool that makes understanding niche libraries effortless.
What it does
Alexandria is a CLI tool that scans your project, detects dependencies, and provides AI-powered documentation search—all offline.
✅ Automatically detects dependencies from Python, Node.js, Java, Rust, Go, and more.
✅ Indexes relevant documentation by creating vector embeddings using FAISS.
✅ Answers questions locally using a self-hosted AI model via Ollama—no API calls, no external data sharing.
✅ Persistent embeddings ensure fast lookup, even after the first scan.
✅ Supports different AI models to accommodate various system constraints.
Example Usage:
alexandria scan
alexandria chat
How do I use FastAPI middleware?
Instantly returns relevant documentation snippets and AI-generated explanations.
How we built it
Alexandria combines efficient dependency detection, fast local vector search, and offline AI reasoning to provide instant documentation lookup.
Tech Stack
🔧 Python – Core CLI development
🔧 FAISS – High-speed local semantic search
🔧 Ollama – Self-hosted AI model for answering queries
🔧 Rich CLI – Clean, intuitive terminal interface
How It Works
- Scans the project for dependencies by parsing package.json, requirements.txt, Cargo.toml, go.mod, and more. Ignores irrelevent libraries from venv, etc to reduce noise.
- Indexes relevant documentation using FAISS, generating persistent embeddings for fast retrieval.
- Processes queries locally—retrieving relevant docs and summarizing them using Ollama.
Offline-First Approach
- Alexandria stores everything locally, ensuring no API calls, no network dependency, and no privacy concerns with proprietary software.
- Supports smaller AI models for users with lower system resources.
Challenges we ran into
🚧 Multi-language dependency detection → Built a modular scanning system supporting multiple package managers. 🚧 Avoiding unnecessary indexing → Excluded paths like venv/ and node_modules/ for optimal performance. 🚧 Balancing accuracy and speed → Optimized FAISS embeddings for fast and relevant retrieval.
Accomplishments that we're proud of
🚀 Rapid and Accurate Responses: The embedding retreival provides fast, accurate, succinct responses from the documentation. 🚀 Better developer experience than using available Gen AI tool unless prompt engineered and relevant documentations were provided. 🚀 Instant documentation lookup – No more unnecessary Googling. Developer-Centric Design inspired by man pages command line utility.
What we learned
💡Developers need fast, reliable documentation retrieval, not just generic AI answers. 💡Web scraping and caching are essential for efficiently gathering and storing documentation while minimizing redundant requests. 💡Balancing time-space tradeoffs was crucial—storing too many embeddings bloated the index, while storing too few reduced accuracy. 💡Speaking with sponsor developers at the hackathon helped clarify our vision—we initially considered a web app but realized that a CLI interface was the best fit for developers, minimizing overhead and maximizing usability. 💡Focusing on ease of use made a significant difference—reducing friction in setup and interaction ensures developers can start using Alexandria with minimal effort.
What's next for Alexandria
- Expand Library Coverage: Broaden support to cover even more libraries and frameworks, ensuring comprehensive assistance.
- Community Contributions: Open up Alexandria to community plugins and extensions, empowering developers worldwide to contribute and enhance the tool.
Built With
- faiss
- ollama
- python
- rich-cli
Log in or sign up for Devpost to join the conversation.