https://github.com/saagpatel/ink
Local-first Markdown workspace where AI suggestions appear as handwritten-style margin annotations
https://github.com/saagpatel/ink
ai codemirror desktop-app local-ai markdown ollama tauri typescript
Last synced: about 20 hours ago
JSON representation
Local-first Markdown workspace where AI suggestions appear as handwritten-style margin annotations
- Host: GitHub
- URL: https://github.com/saagpatel/ink
- Owner: saagpatel
- License: mit
- Created: 2026-03-25T08:04:39.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-06-20T05:34:35.000Z (9 days ago)
- Last Synced: 2026-06-20T07:15:59.925Z (9 days ago)
- Topics: ai, codemirror, desktop-app, local-ai, markdown, ollama, tauri, typescript
- Language: TypeScript
- Size: 429 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# ink
[](#) [](#)
> What if your AI editor left margin notes instead of interrupting your flow?
ink is a local-first Markdown workspace where AI suggestions appear as SVG overlay cards positioned alongside their anchor text — the visual metaphor of a thoughtful editor leaving notes in your margins, not an autocomplete system hijacking your cursor. Runs entirely on your machine via Tauri 2 and a local Ollama instance.
## Features
- **Margin annotations** — SVG overlay cards positioned via CodeMirror 6's `coordsAtPos()` API, scroll-aware and viewport-clipped
- **Five built-in annotation types** — clarify, expand, simplify, question, alternative; plus custom annotation type creation with configurable prompts
- **Local AI via Ollama** — defaults to `llama3.2:3b`, configurable to `qwen2.5:7b` or any Ollama model
- **Workspace folder view** — sidebar file tree for navigating a folder of Markdown files
- **Accept / dismiss** — accepting an annotation inserts its text at the anchor point
- **Annotation history** — per-file log of every annotation by status (pending, accepted, dismissed)
- **Stats dashboard** — acceptance rate, type breakdown, and latency metrics across the workspace
- **Workspace search** — search annotations across the workspace by content, type, and status
- **Debounced generation** — Ollama called 2,500ms after your last keypress, never on every keystroke
- **Settings panel** — configure endpoint, model, annotation density, and debounce delay
## Quick Start
### Prerequisites
- Rust stable toolchain
- Node.js 20+ and npm
- [Ollama](https://ollama.com) running locally
### Installation
```bash
git clone https://github.com/saagpatel/ink
cd ink
npm install
# Pull a model if you haven't already
ollama pull llama3.2:3b
```
### Usage
```bash
# Development
npm run tauri dev
# Build release app
npm run tauri build
```
## Tech Stack
| Layer | Technology |
|-------|------------|
| Desktop shell | Tauri 2 (Rust) |
| Frontend | React 19 + TypeScript 5.8 (strict) |
| Editor | CodeMirror 6 (@codemirror/lang-markdown) |
| Annotations | SVG overlay, positioned via EditorView.coordsAtPos() |
| Local AI | Ollama REST API (llama3.2:3b default) |
| Persistence | SQLite via @tauri-apps/plugin-sql |
## License
MIT