Skip to content
Ashwani Kumar
All work
Status: Released — open sourcePersonal projectOpen source · 2026

lorag — a private knowledge assistant for your notes

A Go CLI that indexes Apple Notes and local documents and answers questions with local models. Nothing leaves the machine.

Solution architecture

Scroll sideways to see the full diagram.

Indexing and queryingSync builds a local vector index from notes and documents; a query retrieves the closest chunks and a local model answers from them. Components: Apple Notes, ~/lorag/docs, Ingest & chunk, Embeddings, Vector index, Question, Retrieve, Local chat model, Answer.lorag synclorag qsimilarity searchcontextApple Notesexported to Markdown~/lorag/docs.txt · .md · .pdfIngest & chunkparse · splitEmbeddingsnomic-embed-text · OllamaVector indexon disk · chromem-goQuestionlorag q "…"Retrievenearest chunksLocal chat modelllama3.2 · OllamaAnswerin the terminal
Sync builds a local vector index from notes and documents; a query retrieves the closest chunks and a local model answers from them.
  • Service
  • Workflow
  • Data
  • External

The business problem

Notes and documents pile up across Apple Notes and folders, and finding something written months ago means remembering where it was saved. Cloud assistants solve search but require sending private notes to a third party.

What needed to be built

A complete retrieval-augmented generation (RAG) pipeline — ingestion, embeddings, vector index, retrieval and answer generation — that runs entirely on a laptop.

Engineering approach

Make retrieval-augmented generation work entirely on a laptop: export Apple Notes, parse PDFs and Markdown, embed and index them, and keep the setup simple enough to install with one command.

  1. 01

    A single Go binary with three commands: setup starts Ollama and pulls models, sync exports notes and rebuilds the index, q answers a question.

  2. 02

    Export Apple Notes to Markdown, read .txt, .md and .pdf files from one folder, then chunk and embed them with a local embedding model.

  3. 03

    Store vectors in an embedded on-disk index (chromem-go), so there is no database server to run.

  4. 04

    Answer questions by retrieving the closest chunks and passing them as context to a local chat model; the model is switchable from the CLI.

  5. 05

    Distribute through a Homebrew tap and keep configuration in a small TOML file.

What this means for your business

This is the same architecture behind a company knowledge assistant: ingest your documents, index them, retrieve the right passages and answer with sources. For a business, the index lives in your cloud and connects to Drive, wikis or databases instead of Apple Notes.

Discuss a project like this