SillyTavern for storytellers.
A local-first writing studio where your manuscript, characters, and style guides are the context. Bring any endpoint — Ollama, LM Studio, OpenAI-compatible — or drive your own agent subscription, and every change lands as a diff you accept or reject.
Chapter 1 — The Damp Hollow
The fog settled thick over the rotting floor of the wood. Kaelen walked slowly, his eyes shifting behind the branches. The weather was bad, and he was quite cold. The trail had vanished an hour ago under a thick shroud of pine needles and damp leaf mulch.
He paused, pressing a calloused palm against the cold bark of a dying elm. In the silence, the distant babble of the creek sounded like muted whispering.
Watch it in action
Drafting, context, and diff review — inside margin.
Markdown-Native
A distraction-free editor for long-form writing. Plain .md files — no lock-in, no database, no proprietary format.
Runs Locally
Manuscripts, notes, and context stay on your machine. No cloud servers, no telemetry, no internet required.
Works With Your Models
Ollama, LM Studio, any OpenAI-compatible endpoint — or your OpenCode, Claude, Codex, Antigravity subscription.
Automatic Context
Characters, lore, outlines, and style guides in folders. Margin includes what's relevant for each request.
Diff Review
AI edits land as clear inline diffs you accept or reject. Suggestions, never silent insertions.
Customizable Workflows
Prompts, agents, and pipelines that match your process — not rigid presets you adapt to.
Imagine Images
Describe maps, mood boards, or scenes in words. Generate with OpenAI, Stability, FAL, Gemini, or ComfyUI.
Slash Commands
Type / at a line start to upload or imagine images. Prefix search finds the action — no menu scrolling.
Workspace Profiles
Link or scaffold project folders and switch from the sidebar. Select text to Cue, Rewrite, or Imagine it.
Quick Installation
Clone, launch, write. One script wires the backend and the editor together.
$ git clone https://github.com/prxshetty/margin && cd margin
$ ./start.sh # venv, deps, API :8000 + UI :5173
> git clone https://github.com/prxshetty/margin && cd margin
> start.bat REM or: powershell -ExecutionPolicy Bypass -File start.ps1
Clone the repo
One command fetches the workspace, editor, and docs. No account, no signup.
Launch everything
The script builds the venv, installs deps, and starts the API and UI in parallel.
Open and write
Point Settings at Ollama or your agent subscription and draft your first scene.
Frequently Asked Questions
No. It's open source. You only pay for the LLM you choose — local models are free, APIs cost per token.
Your files stay local. Text only leaves your machine when you send it to your chosen LLM endpoint (DeepSeek, Claude, local model, etc.). margin doesn't log or store anything on the cloud.
Lightweight instruction-tuned models through Ollama, LM Studio, or any OpenAI-compatible endpoint work well, and larger models work too. Prefer your own subscription instead? Bring OpenCode, Claude Code, Codex, or Antigravity — margin will drive the agent directly.
Yes — point the workspace directory in Settings at your vault or folder and it loads as-is. Obsidian vaults, exported Notion docs, personal folders: if it's markdown files in a folder, it works. No export needed.
Code editors treat prose like code. margin is Markdown-native out of the box, open source, and private by default — run a local LLM, plug in any endpoint, or drive your own agent subscription, with every change landing as a diff you accept or reject.