v1.0 — Now available

Your private treasury
of thought.

Local-first second brain. Capture anything. Search semantically.
Your data never leaves your machine.

curl -fsSL https://raw.githubusercontent.com/rawnaqs/khayal/main/install.sh | sh
100% Open Source
Zero Telemetry
No Accounts
No Cloud
Plain Markdown

A second brain that
actually stays yours.

Khayal captures your thoughts, articles, and images — then processes them with your own local LLM. Everything is stored as plain markdown in a folder on your machine. No cloud. No accounts. No lock-in.

Capture text, URLs, and images from CLI or PWA
Auto-tag, summarize, and extract entities with Ollama
Search with hybrid keyword + semantic search
Find connections between your past thoughts
~ khayal
$ kl "useEffect cleanup runs after every render"
✓ saved · #react #performance · 3ms
$ kl search "react hooks"
2 results · hybrid · 28ms
useEffect Patterns 0.91
March 5 · [text] · #react #hooks

Capture anything,
zero friction.

Quick thoughts, screenshots, articles, URLs. From the terminal with kl or the embedded PWA. No forms, no overhead — just capture.

kl capture
$ kl "useEffect cleanup runs after every render"
✓ saved · #react #performance · 3ms
$ kl --url https://example.com/article
⏳ queued · article · id: abc123

Your own AI,
on your machine.

Ollama processes every capture locally — auto-tagging, summarization, entity extraction. Your data never leaves your hardware. No API keys, no rate limits, no privacy concerns.

khayal start
$ khayal start
✓ ollama http://localhost:11434
✓ vault ~/Documents/brain
✓ server 127.0.0.1:1133
● khayal is running.

Find by words
or by meaning.

Hybrid search combines FTS5 keyword matching with vector semantic search, merged with RRF. Find exact terms or discover related thoughts you forgot you had.

kl search
$ kl search "distributed systems"
3 results · hybrid · 42ms
CAP Theorem Notes 0.94
March 3 · [text] · #distributed #systems
...consistency and availability cannot both be guaranteed...

Plain markdown.
No lock-in.

Your vault is just a folder of .md files. Works with Obsidian, git, or any editor. Khayal is a capture and retrieval layer — the files remain plain text that any tool can read.

~/Documents/brain
~/Documents/brain/
├── 2026-04-07/
│ └── my-first-thought.md
├── 2026-04-06/
│ ├── react-patterns.md
│ └── system-design.md
└── .khayal/
kl capture
$ kl "useEffect cleanup runs after every render"
✓ saved · #react #performance · 3ms
$ kl --url https://example.com/article
⏳ queued · article · id: abc123
kl search
$ kl search "distributed systems"
3 results · hybrid · 42ms
CAP Theorem Notes 0.94
March 3 · [text] · #distributed #systems
...consistency and availability cannot both be guaranteed...
Consistency Models 0.81
March 5 · [text] · #distributed #databases
khayal status
khayal · admin v1.0.0
┌─ server ───────────────────┐
host http://127.0.0.1:1133
uptime 3h 24m
└────────────────────────────┘
┌─ vault ────────────────────┐
notes 2,847
indexed 2,203 (77%) ██████
└────────────────────────────┘

Your data never
leaves your machine.

Not "privacy-friendly." Not "privacy-focused." Actually private. No servers, no accounts, no telemetry. Your vault is a folder on your disk — plain markdown files that you own completely.

No cloud Everything runs locally. No external network calls.
No tracking Zero analytics. Zero telemetry. We don't know you exist.
Open source AGPLv3. Every line of code is visible. Audit it yourself.

Craftsmanship
over convenience.

Your thoughts deserve better than a cloud service.
Build a second brain that's truly yours.