Skip to content

margin

Margin is an open-source, local-first AI writing studio for Markdown users.

Think of it as SillyTavern for story writing: a customizable environment where writers can collaborate with context-aware AI agents, swap models, manage prompts, and build their own creative workflows -- all while keeping their work on their own machine.

Instead of treating AI as a chat window, Margin integrates it directly into the writing process. Draft scenes, brainstorm plots, maintain world lore, rewrite passages, and iterate on ideas inside a distraction-free editor designed for long-form writing.

Why margin?

  • Markdown-Native Writing Environment -- A distraction-free editor designed for long-form writing projects and documentation.
  • Runs Locally -- Your manuscripts, notes, and context stay on your machine. No required cloud services or telemetry.
  • Optimized for Local Models -- Works well with lightweight language models and supports Ollama, LM Studio, and OpenAI-compatible providers.
  • Automatic Context Management -- Organize characters, lore, outlines, and style guides into folders. Margin automatically includes the relevant context for each task.
  • Customizable AI Workflows -- Configure prompts, agents, and writing pipelines to match your process instead of adapting to rigid presets.
  • Interactive Diff Review -- Review AI-generated edits with clear inline diffs before accepting or rejecting changes.

Sections

  • Getting Started -- System requirements, installation, and first launch.
  • Configuration -- All settings explained: workspace, appearance, context, endpoints.
  • Writing Guide -- How AI assist works, character profiles, style guides, manifests, and custom prompts.