
RatVault
A curated Obsidian vault with templates, cheat sheets, and workflows for security operations, incident response, threat hunting, and more
RatVault π
π§π§ͺπ§ͺTRIALS ARE ONGOING | SOME PARTS NOT WORKINGπ§ͺπ§ͺπ§A multi-LLM knowledge vault β drop notes in, chat with them.
Inspired by Andrej Karpathy's structured thinking on reproducible workflows. Warm gratitude for the insights.
Run Locally in 60 Seconds
Requires Python 3.10+
# 1. Clone and install
git clone https://github.com/labrat-0/RatVault.git
cd RatVault
pip install -r requirements.txt
# 2. Start the dashboard
python ingest.py --serve
Open http://localhost:8055 β that's it.
Want to chat with your notes using an LLM?
# Option A β Local (no API key needed, free):
# Install Ollama from https://ollama.ai, then:
ollama pull mistral
python ingest.py --setup # choose: ollama β mistral:7b-instruct
# Option B β OpenAI / Anthropic / OpenRouter:
python ingest.py --setup # follow the wizard
Add your first note:
# Drop any .md or .pdf file into inbox/, then:
python ingest.py # process β saves to Notes/
python ingest.py --dry-run # preview without writing
See QUICKSTART.md for a walkthrough and SETUP.md for all options.
RatVault is a flexible, open-source knowledge management system that ingests raw notes, processes them with any LLM provider, and organizes them into a beautiful Obsidian-native vault.
β¨ Features
- π€ Multi-LLM Support β Works with OpenAI, Anthropic (Claude), Ollama (local), OpenRouter, and more
- π Raw β Structured β Auto-generates summaries, tags, and cross-references from raw markdown
- πΌοΈ Media Preservation β Automatically handles images, videos, and media files
- π PWA Dashboard β Web interface that works offline (no build step required)
- π Obsidian Native β Vault structure works directly in Obsidian with Dataview support
- β‘ Zero Setup β One command to start:
python ingest.py --setup
π Configuration
Provider Setup
Choose one of these methods:
Option A: .env file
cp .env.example .env
# Edit .env with your settings
OpenAI:
RATVAULT_PROVIDER=openai
RATVAULT_MODEL=gpt-4o-mini
OPENAI_API_KEY=sk-...
Anthropic (Claude):
RATVAULT_PROVIDER=anthropic
RATVAULT_MODEL=claude-3-haiku-20240307
ANTHROPIC_API_KEY=sk-ant-...
Ollama (Local):
RATVAULT_PROVIDER=ollama
RATVAULT_MODEL=llama3.2
OLLAMA_BASE_URL=http://localhost:11434
OpenRouter:
RATVAULT_PROVIDER=openrouter
RATVAULT_MODEL=anthropic/claude-3-haiku
OPENROUTER_API_KEY=sk-or-...
Option B: config.yaml
cp config.yaml.example config.yaml
# Edit config.yaml
Option C: Interactive Wizard
python ingest.py --setup
π» Usage
Basic Ingest
# Preview changes without writing
python ingest.py --dry-run
# Process files from inbox/ folder
python ingest.py
# Force re-process even if already ingested
python ingest.py --force
# Specify custom input directory
python ingest.py /path/to/files
# Switch provider temporarily
python ingest.py --provider anthropic --model claude-3-haiku
Vault Structure
RatVault/
βββ inbox/ # Drop raw files here (.md, .txt, .pdf)
βββ Notes/ # Processed entries (Obsidian vault)
β βββ entry1.md
β βββ entry2.md
βββ assets/
β βββ images/ # Extracted images
β βββ videos/ # Extracted videos
βββ Templates/ # Obsidian templates
βββ .obsidian/ # Obsidian configuration
βββ dashboard/ # Web dashboard (PWA)
βββ pipeline/ # Ingest pipeline (config, providers, parser, writer)
βββ serve.py # FastAPI backend
βββ ingest.py # CLI entry point
Entry Format
Each processed entry is Markdown with YAML frontmatter:
---
title: "My Research Note"
slug: "my-research-note"
created: "2026-04-25"
ingested_at: "2026-04-25T14:32:11Z"
summary: "3-sentence summary auto-generated by LLM"
tags: [research, ml, notes]
category: research
difficulty: intermediate
key_concepts: [concept1, concept2]
questions_answered: [question1, question2]
source_file: "inbox/raw-note.md"
provider: claude
model: "claude-3-haiku-20240307"
cross_refs: ["[[Related Note]]"]
assets:
- {type: image, path: "assets/images/slug/diagram.png"}
status: active
type: note
---
# My Research Note
Content here...
π Web Dashboard
Run python ingest.py --serve and open http://localhost:8055
Features:
- π Search β Full-text search over entries and tags
- π Timeline β Browse entries by date (newest first)
- πΌοΈ Gallery β View all extracted images and videos
- π Analytics β Charts: entries per day, tags cloud, provider usage
- βοΈ Settings β Change provider, model, and API key
- π² Installable β Add to home screen as PWA (offline support)
ποΈ How It Works
The Ingest Pipeline
- Discover β Scan
inbox/for.md,.txt,.pdffiles - Parse β Extract title, strip existing frontmatter
- Media Extraction β Copy images/videos to
assets/, rewrite links- Local images:
β copied toassets/images/{slug}/ - YouTube/Vimeo URLs: wrapped in
> [!video]callout - Video files: copied to
assets/videos/{slug}/
- Local images:
- LLM Enrichment β Call your configured LLM to generate:
- Auto-title (if not detected)
- Summary (2-3 sentences)
- Tags (5-10 kebab-case)
- Category (security|development|research|personal|reference|workflow)
- Key concepts and questions answered
- Write β Save as Markdown with YAML frontmatter to
Notes/ - State Tracking β Remember processed files to avoid re-processing
All files are skipped if already processed (unless --force is used).
Multi-LLM Abstraction
providers.py supports 4 LLM providers with a unified interface:
response = call_llm(prompt, system_message, config)
# Returns: LLMResponse(content, model, provider, tokens, duration)
Retry logic: 3 attempts with exponential backoff (1s β 2s β 4s)
π Obsidian Integration
The vault root is a valid Obsidian vault. Just open it:
File β Open folder as vault β Select repo root
Recommended Plugins
Already configured:
- Dataview β Query entries as tables/lists
- Templater β Template system for new notes
- Obsidian Git β Auto-commit changes
- Calendar β Browse by date
- QuickAdd β Shortcuts for common actions
Dataview Examples
List all entries from Claude:
TABLE summary, tags
FROM "Notes"
WHERE provider = "anthropic"
SORT ingested_at DESC
Find draft entries:
LIST
FROM "Notes"
WHERE status = "draft"
SORT created DESC
π API Key Safety
- API keys are stored in
.envorconfig.yaml - Both files are in
.gitignoreβ they won't commit to git - The web dashboard (
serve.py) masks API key inputs - Local Ollama doesn't require an API key
β Troubleshooting
Q: Ingest hangs or is slow
A: Check that your LLM provider is running. For Ollama: ollama serve. For OpenAI/Claude: check your internet connection.
Q: "No files found in inbox"
A: Make sure .md, .txt, or .pdf files exist in the inbox/ folder. Files are case-sensitive.
Q: Images don't show in Obsidian
A: Make sure relative paths are correct. Images should be in assets/images/{slug}/. Check > [!video] callouts.
Q: Web dashboard won't start
A: Make sure fastapi and uvicorn are installed: pip install fastapi uvicorn. Port 8055 might be in use; check with lsof -i :8055.
π€ Contributing
PRs welcome! Areas for contribution:
- Support for more file formats (docx, odt, etc.)
- Additional LLM providers
- Enhanced media handling
- Dashboard improvements
- Documentation
π Credits
π Andrej Karpathy for the "recipes" concept that inspired this entire system. His insights about structured, reproducible workflows shaped RatVault's design.
π License
MIT
β FAQ
Can I use this without an API key?
Yes! Use Ollama (local LLM). Download from ollama.ai.
Can I import existing notes?
Yes. Drop them in inbox/ and run python ingest.py.
Can I switch LLM providers?
Yes, anytime. Just change .env or config.yaml and re-run ingest.py --force.
Is the vault data portable?
Yes. The vault is just Markdown files. Open in any text editor, move to another Obsidian vault, or use elsewhere.
Can I use this for production?
RatVault is designed for personal knowledge management. For production use, consider self-hosting a backend or using an external service.
π Getting Help
- Browse
Notes/for example processed entries - Review
config.yaml.examplefor all configuration options - Run
python ingest.py --helpfor all CLI flags - Open an issue on GitHub
Made with π€ by labrat
Inspired by Andrej Karpathy's recipes for training neural networks.
How to Install
- Download the ZIP or clone the repository
- Open the folder as a vault in Obsidian (File β Open Vault)
- Obsidian will prompt you to install required plugins
Stats
Stars
2
Forks
0
Last updated 1mo ago
Categories