Avante
A local-first macOS writing app that uses Apple's on-device foundation models to analyze the document you're editing in real time.

How it works
Avante runs entirely on-device — no network calls, no third-party APIs. Apple's FoundationModels framework supplies the LLM; everything else is Swift / SwiftUI.
- Chunked analysis — the document is split into overlapping passages sized to the model's context window. Each chunk is summarized independently, with the surrounding summaries threaded in as conditioning so a chunk's interpretation is informed by what surrounds it.
- Recursive roll-up — chunk summaries are themselves summarized, recursively, so a single global summary covers a document longer than any single context. The hierarchy is cached per document and updated lazily as edits invalidate sub-trees.
- Per-passage metrics — the model emits novelty, clarity, and flow scores for each passage. Those scores drive the inline highlighting in the editor view (
AIAnalysisTextView,HighlightingLayoutManager) and the rolling charts in the sidebar (MetricsSidebar). - Debounced edit pipeline —
AnalysisJobProcessorandView+Debouncecoalesce typing into batched jobs so analysis runs only after edits pause, keeping the editor latency-free.

Stack
- Swift / SwiftUI — document-based app, MVVM
- FoundationModels — Apple's on-device LLM framework
- NaturalLanguage — tokenization for chunk boundaries
- Combine — debounced job pipeline and reactive view bindings
Building
Open avante.xcodeproj in Xcode and run. Requires macOS 26 (Tahoe) and Apple Silicon for the on-device models.

License
MIT — see LICENSE.