Skip to content

notecast

A local note engine that uses a small LLM to organise your notes into a knowledge graph. Point it at a folder of Markdown or text files: it summarises each note, tags it with keywords, sorts it into themes, splits themes that grow too big into subthemes, and links themes that keep appearing together. Ollama-first, CLI-only, one SQLite file, no cloud.

Docs: https://muratcanozdemir.github.io/notecast-py/

1
2
3
uv tool install notecast        # or: pipx install notecast
ollama pull llama3.2:3b
ollama pull nomic-embed-text

Python 3.12 or newer. Needs Ollama running locally, and Graphviz for notecast graph (apt install graphviz / brew install graphviz).

What it does

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
export NOTECAST_DB=~/.notecast.db         # one database for all your notes

notecast theme add Tech --base            # anchors for classification
notecast theme add Personal --base
notecast add-batch ~/notes -x README.md   # re-running skips unchanged files

notecast scan                             # run the stages that are due
notecast scan --stage classify -v         # or one stage at a time

notecast status
notecast search "kubernetes" --similar    # full text + similar notes by embedding
notecast theme list
notecast graph                            # → notecast-graph.svg
1
2
add ─► pending ─[process]─► processed ─[classify]─► scanned ─[organize]─► organized
                                                                 [consolidate]: themes only
Stage
process one LLM call per note: summary + keywords; plus an embedding
classify each note into the theme that fits it best (up to 3)
organize themes over split_threshold notes get 2–4 subthemes, reusing existing ones
consolidate themes sharing most of their notes get linked; empty ones pruned; no LLM

If Ollama goes away mid-scan, the scan stops and leaves notes queued; bad model output fails only the note it was for. See The pipeline.

Examples

examples/ has a quickstart, a folder import, a nightly cron job and a Python script, with sample notes. The test suite runs all of them against a stand-in Ollama.

Differences from the original

A Python port of AlexWasHeree/NoteCast (TypeScript/Bun):

  • No Bun/TypeScript: pure Python, standard library where possible.
  • No YAKE: keywords come from the LLM during summarisation (one call instead of two).
  • No LanceDB: vectors stored as JSON in SQLite, cosine similarity in pure Python. Fine for <10k notes.
  • No server: CLI only, talks directly to SQLite.
  • No .env / API keys: Ollama at localhost:11434 by default; settings in SQLite via notecast config set.
  • FTS5: full-text search via notecast search.
  • notecast scan: auto-chains process → classify → organize → consolidate based on thresholds.
  • Graphviz: notecast graph renders the theme DAG.

Development

1
2
uv sync --group dev
uv run pytest

See Development for checks, tests and releases.

Call graph

Symbol-level coupling across the repository, coloured by Leiden community (generated by codegraph-lsp):

Call graph of notecast-py

License

MIT