Metadata-Version: 2.5
Name: notecast
Version: 0.1.0
Summary: Local note engine — LLM-driven knowledge graph. Ollama-first.
Project-URL: Homepage, https://github.com/muratcanozdemir/notecast-py
Project-URL: Issues, https://github.com/muratcanozdemir/notecast-py/issues
Project-URL: Changelog, https://github.com/muratcanozdemir/notecast-py/blob/main/CHANGELOG.md
Author: Murat Can Ozdemir
License-Expression: MIT
License-File: LICENSE
Keywords: cli,knowledge-graph,llm,notes,ollama,sqlite
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business
Classifier: Topic :: Text Processing :: Indexing
Requires-Python: >=3.12
Requires-Dist: click>=8.1
Requires-Dist: graphviz>=0.20
Description-Content-Type: text/markdown

# 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/>**

<!-- docs-test: skip -->
```bash
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](https://ollama.com) running locally,
and [Graphviz](https://graphviz.org) for `notecast graph`
(`apt install graphviz` / `brew install graphviz`).

## What it does

```bash
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
```

```text
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](https://muratcanozdemir.github.io/notecast-py/guides/pipeline/).

## Examples

[`examples/`](https://github.com/muratcanozdemir/notecast-py/tree/main/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](https://github.com/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

<!-- docs-test: skip -->
```bash
uv sync --group dev
uv run pytest
```

See [Development](https://muratcanozdemir.github.io/notecast-py/development/)
for checks, tests and releases.

## Call graph

Symbol-level coupling across the repository, coloured by Leiden community (generated by [codegraph-lsp](https://github.com/muratcanozdemir/codegraph-lsp)):

![Call graph of notecast-py](https://raw.githubusercontent.com/muratcanozdemir/notecast-py/main/codegraph.svg)

## License

MIT
