A comprehensive CLI tool that helps you write full-length novels using AI, with a structured workflow designed to maintain consistency and quality.
- Structured Workflow: 8-stage process from premise to final novel
- Revision Support: Regenerate any stage with feedback/comments
- Multiple AI Providers: Support for OpenAI, Anthropic (Claude), and Ollama (local)
- Writing Style Presets: 7 presets (Hemingway, Tolkien, Austen, Noir, Literary, Commercial, Sanderson)
- Smart Context Management: Intelligently loads relevant context for each writing stage
- Continuity Tracking: Timeline events, character states, plot threads, and glossary
- Consistency Checking: Automated detection of plot holes, character inconsistencies, and timeline errors
- Multiple Export Formats: Export to Markdown, DOCX, or EPUB
- Flexible Review Modes: Review per-stage, issues-only, or at the end
npm install
npm run build- Copy
.env.exampleto.envand add your API key:
cp .env.example .env- Set the API key for your chosen provider:
ANTHROPIC_API_KEYfor ClaudeOPENAI_API_KEYfor GPT-4- No key needed for Ollama (runs locally)
# Create a new project with interactive prompts
npm start -- init "My Novel Title"
# Create with specific options
npm start -- init "My Novel Title" --provider anthropic --review per-stage --style hemingway
# Create with custom premise (skip premise generation)
npm start -- init "My Novel Title" --premise "A detective investigates..."
# Check project status
npm start -- status
# Run the next workflow stage
npm start -- stage
# Run with auto-advance (no prompts)
npm start -- stage --auto
# Revise a stage with feedback
npm start -- stage --comment "Make the protagonist more morally ambiguous"
# Write a specific chapter
npm start -- write 5
# Run consistency check
npm start -- review
# Export the novel
npm start -- export docx- Premise: Generate the basic storyline from your title
- Characters: Create detailed character dossiers
- Worldbuilding: Develop locations, lore, and world rules
- Synopsis: Write a comprehensive plot synopsis
- Outline: Break down into chapter outlines
- Chapter Synopsis: Detailed synopsis for each chapter
- Writing: Generate full chapter prose
- Review: Consistency check and issue detection
Initialize a new novel project.
Options:
-p, --provider <provider>- AI provider (openai, anthropic, ollama)-m, --model <model>- Model name (e.g., gpt-4o, gpt-4o-mini, claude-3-5-sonnet-20241022)-r, --review <mode>- Review mode (per-stage, issues-only, end-only)-d, --directory <directory>- Project directory name-s, --style <style>- Writing style preset--premise <premise>- Custom premise/storyline (skips premise generation)
Show current project status.
Options:
-p, --path <path>- Project path (defaults to current directory)
Run the next workflow stage.
Options:
-p, --path <path>- Project path-a, --auto- Auto-advance without prompts-s, --stage <stage>- Run specific stage-c, --comment <comment>- Feedback to incorporate when regenerating
Write a specific chapter.
Options:
-p, --path <path>- Project path
Run consistency review.
Options:
-p, --path <path>- Project path
Export the novel.
Options:
-p, --path <path>- Project path-o, --output <output>- Output file path
Formats: md, docx, epub
Change AI provider.
Options:
-p, --path <path>- Project path-m, --model <model>- Model name
Show or set writing style.
Options:
-p, --path <path>- Project path-s, --set <style>- Set style preset
Available presets:
hemingway- Sparse, direct; show don't telltolkien- Rich description; elevated languageausten- Witty; social observation; elegantnoir- Hard-boiled; punchy; cynicalliterary- Lyrical; introspective; metaphor-richcommercial- Fast-paced; accessible; dialogue-drivensanderson- Clear modern prose; hard magic systems; multiple POVs
Update project configuration.
Options:
-p, --path <path>- Project path-w, --wordcount <count>- Target word count-c, --context <tokens>- Context window size-r, --review <mode>- Review mode
Any stage can be regenerated with feedback. Use the --comment flag to provide revision instructions:
# Revise the premise
npm start -- stage --stage premise --comment "Add more mystery elements"
# Revise characters
npm start -- stage --stage characters --comment "Make the antagonist more sympathetic"
# Revise outline
npm start -- stage --stage outline --comment "Add 3 more chapters for the climax"data/projects/your-novel/
├── project.json # Project metadata and settings
├── storyline.md # Basic premise
├── characters.md # Character dossiers
├── worldbuilding.md # World details
├── synopsis.md # Master synopsis
├── outline.md # Chapter outline
├── outline-meta.json # Chapter list (number + title)
├── continuity.json # Timeline and state tracking
├── chapters/
│ ├── ch001.md # Written chapter
│ ├── ch001.json # Chapter metadata (status: draft|revised|final)
│ └── ch001_synopsis.md # Chapter synopsis
└── glossary.md # Auto-generated from continuity
The tool uses smart context loading to ensure the AI has relevant information:
- For character creation: Storyline + existing characters
- For worldbuilding: Storyline + main characters
- For synopsis: All characters + worldbuilding
- For chapter writing:
- Chapter synopsis
- Characters + worldbuilding
- Continuity state (timeline, character states, plot threads)
- Previous 2 chapter summaries
- Last paragraphs of previous chapter (for flow)
- Tone sample from Chapter 1
- Writing style preset (if set)
- Timeline tracking: Events logged with chapters, characters, and locations
- Character state tracking: Physical state, location, knowledge, relationships, inventory
- Plot thread tracking: Active and resolved plot threads
- Glossary: Auto-built from worldbuilding terms
The review stage performs:
- Timeline consistency: Detects impossible location changes
- Name conflict detection: Warns about duplicate character/world names
- Knowledge consistency: Ensures characters know about others after meeting
| Provider | Default Model | Context Window | Best For |
|---|---|---|---|
| Anthropic | claude-3-opus-20240229 | 200K | Long-form writing |
| OpenAI | gpt-4o | 128K | General purpose |
| Ollama | llama3.1 | 128K | Local/private |
# Run in development mode with watch
npm run dev
# Build for production
npm run build
# Type check
npm run typecheckMIT