AI-powered prose generation for fiction writers.
Critique-revision loop, series memory, continuity tracking, style learning, and 300+ LLM models via OpenRouter. No database — everything is markdown and JSON. Bring your own API key.
Why I Built This
I’ve been a fiction writer my whole adult life. Took some swings at self-publishing years ago, never quite landed it because the mechanics of getting stories onto the page always outpaced the hours in the day. I’ve got multiple novels in progress, a head full of characters and plot, and not enough time.
I’d been using NovelCrafter, which is genuinely great software. But I hate subscriptions when I can avoid them. This seemed like a fun project to build — a writing engine I own, that runs on my own hardware, that remembers my entire series and lets me pick any model I want.
Great stories shouldn’t be trapped by writing mechanics. GhostWriter 3000 helps storytellers who have vivid characters, compelling plots, and rich worlds — but need help getting them onto the page. It generates natural prose, critiques it, revises it, and learns your writing style over time.
The Core Loop
Scene Outline → Generate Prose → AI Critique → Revise → Accept as Canon
# You define characters, world context, and scene outlines.
# The AI generates prose, then a second AI pass critiques it.
# You review, give feedback, revise — up to 5 iterations.
# When you accept a scene, it becomes part of the series memory.
Key Features
Series Memory
Accumulates knowledge across your entire series. Automatic extraction of characters, world elements, plot events, and causal chains from accepted scenes.
Style Learning
Learns your voice from your edits — vocabulary, sentence structure, dialogue patterns. Your style guide evolves as you write.
Continuity Checking
LLM-based detection of contradictions with established canon. Tiered summaries with memory decay so recent events feel more present.
300+ Models
OpenRouter integration. Use DeepSeek ($0.14/M tokens) for iteration and Claude for final passes. One API key, no vendor lock-in.
AI Writing Assistant
Each series gets a conversational AI that knows your characters, world, and plot. Ask questions, check continuity, brainstorm.
74 MCP Tools
Full API exposed as MCP tools across 10 modules. Drive the entire writing workflow from Claude Desktop or custom agents.
No Database
Everything is markdown and JSON files. Edit characters in any text editor. Back up by copying a folder. No migrations, no setup.
Import & Export
Import existing manuscripts (.docx/.txt/.md) with full metadata extraction. Export your data anytime. You own everything.
Architecture
│ Web UI (vanilla JS) │
│ Retro-futuristic dark theme / light theme │
└─────────────────────┬────────────────────────────────┘
│ HTTP
┌─────────────────────▼────────────────────────────────┐
│ FastAPI Backend (Python) │
│ │
│ Routes ──→ Services ──→ LLM Service ──→ OpenRouter │
│ │ ┌──────┴──────────┐ │
│ │ │ Memory Service │ Style Learning │
│ │ │ Entity Service │ Continuity Checking │
│ │ │ Persona Client │ Generation Queue │
│ │ └─────────────────┘ │
│ │
│ MCP Wrapper (74 tools) ──→ FastMCP ──→ /mcp/ │
└─────────────────────┬────────────────────────────────┘
│ File I/O
┌─────────────────────▼────────────────────────────────┐
│ File-Based Storage │
│ projects/ ── characters/ ── world/ ── scenes/ │
│ series/ ── memory/ ── style/ ── generations/ │
│ (Markdown + JSON, no database) │
└──────────────────────────────────────────────────────┘
Tech Stack
Frontend Vanilla HTML/CSS/JavaScript (no build step)
AI OpenRouter API (300+ models), optional Persona MCP
Data File-based (Markdown + YAML frontmatter, JSON)
MCP FastMCP (streamable-http transport), 74 tools
Deploy Docker, docker-compose, or bare Python
Screenshots
Quick Start
$ cd ghostwriter3000
$ make docker
# Opens at http://localhost:8000
# Add your OpenRouter API key in Settings. That’s it.