Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Autonomous novel writing CLI agent - use for creative fiction writing, novel generation, style imitation, chapter continuation/import, EPUB export, AIGC detection, and fan fiction. Native English support with 10 built-in English genre profiles (LitRPG, Progression Fantasy, Isekai, Cultivation, System Apocalypse, Dungeon Core, Romantasy, Sci-Fi, Tower Climber, Cozy Fantasy). Also supports Chinese web novel genres (xuanhuan, xianxia, urban, horror, other). Multi-agent pipeline, two-phase writer (c
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | — | — |
| case-08 | ✗→✓ | ▲ Improved | — | — |
| case-20 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✗→✓ | ▲ Improved | — | — |
| case-22 | ✗→✓ | ▲ Improved | — | — |
InkOS is a CLI tool for autonomous fiction writing powered by LLM agents. It orchestrates a multi-agent pipeline (Radar → Planner → Composer → Architect → Writer → Observer → Reflector → Normalizer → Auditor → Reviser) to generate, audit, and revise novel content with zero human intervention per chapter.
The pipeline operates in three phases:
Truth files are persisted as schema-validated JSON (story/state/*.json) with markdown projections for human readability. SQLite temporal memory database (story/memory.db) enables relevance-based retrieval on Node 22+.
--lang enbash# Initialize a project directory (creates config structure) inkos init my-writing-project # Configure your LLM provider (OpenAI, Anthropic, or any OpenAI-compatible API) inkos config set-global --provider openai --base-url https://api.openai.com/v1 --api-key sk-xxx --model gpt-4o # For compatible/proxy endpoints, use --provider custom: # inkos config set-global --provider custom --base-url https://your-proxy.com/v1 --api-key sk-xxx --model gpt-4o
bash# Assign different models to different agents — balance quality and cost inkos config set-model writer claude-sonnet-4-20250514 --provider anthropic --base-url https://api.anthropic.com --api-key-env ANTHROPIC_API_KEY inkos config set-model auditor gpt-4o --provider openai inkos config show-models
Agents without explicit overrides fall back to the global model.
bash# Check installation and configuration inkos doctor # View current config inkos status
bash inkos book create --title "My Novel Title" --genre xuanhuan --chapter-words 3000 # Or with a creative brief (your worldbuilding doc / ideas): inkos book create --title "My Novel Title" --genre xuanhuan --chapter-words 3000 --brief my-ideas.md
xuanhuan (cultivation), xianxia (immortal), urban (city), horror, otherbook-id for all subsequent operationsbash inkos write next book-id --count 5 --words 3000 --context "young protagonist discovering powers"
write next command runs the full pipeline: draft → audit → revise--context provides guidance to the Architect and Writer agentsbash inkos review list book-id inkos review approve-all book-id
bash inkos export book-id inkos export book-id --format epub
bash inkos book list
bash inkos write next book-id --count 3 --words 2500 --context "protagonist faces critical choice"
book-id for auto-detectionbash inkos review approve-all
Use this when the user says things like "pull focus back to the mentor conflict", "pause the merchant guild subplot", or "change what the next chapter should prioritize".
update_author_intent to change the long-horizon identity of the bookupdate_current_focus to change the next 1-3 chapters' focustext plan_chapter(bookId, guidance?)
story/runtime/chapter-XXXX.intent.mdtext compose_chapter(bookId, guidance?)
story/runtime/chapter-XXXX.context.jsonstory/runtime/chapter-XXXX.rule-stack.yamlstory/runtime/chapter-XXXX.trace.jsonwrite_draft if the user wants intermediate reviewwrite_full_pipeline if they want the usual write → audit → revise flowRecommended orchestration:
update_current_focusplan_chaptercompose_chapterwrite_draft or write_full_pipelineUse this when you have an existing novel (or partial novel) and want InkOS to pick up where it left off.
bash inkos import chapters book-id --from novel.txt
第X章 pattern--split "Chapter\\s+\\d+"bash inkos import chapters book-id --from ./chapters/
.md and .txt files in sorted orderbash inkos import chapters book-id --from novel.txt --resume-from 15
bash inkos write next book-id --count 3
bash inkos style analyze reference_text.txt
bash inkos style import reference_text.txt book-id --name "Author Name"
bash inkos import canon spinoff-book-id --from parent-book-id
bash inkos write next spinoff-book-id --count 3 --context "alternate timeline after Chapter 20"
If you need separate control over each pipeline stage:
bash inkos draft book-id --words 3000 --context "protagonist escapes" --json
bash inkos audit book-id chapter-1 --json
bash inkos revise book-id chapter-1 --mode polish --json
polish (minor), spot-fix (targeted), rewrite (major), rework (structure), anti-detect (reduce AI traces)bashinkos radar scan
bash# Detect AIGC in a specific chapter inkos detect book-id # Deep scan all chapters inkos detect book-id --all
bashinkos analytics book-id --json # Shorthand alias inkos stats book-id --json
bash# Create an English LitRPG novel (language auto-detected from genre) inkos book create --title "The Last Delver" --genre litrpg --chapter-words 3000 # Or set language explicitly inkos book create --title "My Novel" --genre other --lang en # Set English as default for all projects inkos config set-global --lang en
inkos genre list to see all available genresbash# Create a fanfic from source material inkos fanfic init --title "My Fanfic" --from source-novel.txt --mode canon # Modes: canon (faithful), au (alternate universe), ooc (out of character), cp (ship-focused) inkos fanfic init --title "What If" --from source.txt --mode au --genre other
For flexible, conversational requests:
bashinkos agent "写一部都市题材的小说,主角是一个年轻律师,第一章三千字"
These tools are the preferred control surface for chapter steering:
plan_chapter(bookId, guidance?)compose_chapter(bookId, guidance?)update_author_intent(bookId, content)story/author_intent.mdupdate_current_focus(bookId, content)story/current_focus.mdwrite_truth_file remains available for broad file edits, but prefer the dedicated control tools above for input-governance changes.
If your project contains only one book, most commands accept book-id as optional. You can omit it for brevity:
bash# Explicit inkos write next book-123 --count 1 # Auto-detected (if only one book exists) inkos write next --count 1
All content-generating commands support --json for structured output. Essential for programmatic use:
bashinkos draft book-id --words 3000 --context "guidance" --json
InkOS maintains 7 files per book for coherence:
All agents reference these to maintain long-term consistency. Since 0.6.0, truth files are backed by schema-validated JSON in story/state/ with automatic bootstrap from markdown for legacy books. During import chapters, these files are reverse-engineered from existing content via the ChapterAnalyzerAgent.
The Writer operates across multiple phases with specialized agents:
Truth files use structured JSON (story/state/*.json) as the authoritative source, with markdown projections for human readability. Hook admission control prevents duplicate/family hooks from inflating the hook table.
The --context parameter provides directional hints to the Writer and Architect:
bashinkos write next book-id --count 2 --context "protagonist discovers betrayal, must decide whether to trust mentor"
bashinkos genre list inkos genre show xuanhuan
bashinkos genre create my-genre --name "My Genre" # Options: --numerical, --power, --era inkos genre create dark-xuanhuan --name "Dark Xuanhuan" --numerical --power
bashinkos genre copy xuanhuan # Copies to project genres/ directory for editing
| Command | Purpose | Notes | |---------|---------|-------| | inkos init [name] | Initialize project | One-time setup | | inkos book create | Create new book | Returns book-id. --brief <file>, --lang en/zh, --genre litrpg/progression/... | | inkos book list | List all books | Shows IDs, statuses | | inkos write next | Full pipeline (draft→audit→revise) | Primary workflow command | | inkos draft | Generate draft only | No auditing/revision | | inkos audit | 33-dimension quality check | Standalone evaluation | | inkos revise | Revise chapter | Modes: polish/spot-fix/rewrite/rework/anti-detect | | inkos agent | Natural language interface | Flexible requests | | inkos style analyze | Analyze reference text | Extracts style profile | | inkos style import | Apply style to book | Makes style permanent | | inkos import canon | Link spinoff to parent | For prequels/sequels | | inkos import chapters | Import existing chapters | Reverse-engineers truth files for continuation | | inkos detect | AIGC detection | Flags AI-generated passages | | inkos export | Export finished book | Formats: txt, md, epub | | inkos analytics / inkos stats | View book statistics | Word count, audit rates, token usage | | inkos radar scan | Platform trend analysis | Informs new book ideas | | inkos config set-global | Configure LLM provider | OpenAI/Anthropic/custom (any OpenAI-compatible) | | inkos config set-model <agent> <model> | Set model override for a specific agent | --provider, --base-url, --api-key-env for multi-provider routing | | inkos config show-models | Show current model routing | View per-agent model assignments | | inkos doctor | Diagnose issues | Check installation | | inkos update | Update to latest version | Self-update | | inkos up/down | Daemon mode | Background processing. Logs to inkos.log (JSON Lines). -q for quiet mode | | inkos review list/approve-all | Manage chapter approvals | Quality gate | | inkos fanfic init | Create fanfic from source material | --from <file>, --mode canon/au/ooc/cp | | inkos genre list | List all available genres | Shows English and Chinese genres with default language | | inkos genre create <id> | Create custom genre profile | --name, --numerical, --power, --era | | inkos genre copy <id> | Copy built-in genre to project | For customization | | inkos write rewrite <book> <ch> | Rewrite a specific chapter | Deletes chapter and later, rewrites from that point | | inkos book update [book-id] | Update book settings | --chapter-words, --target-chapters, --status, --lang | | inkos book delete <book-id> | Delete book and all chapters | --force to skip confirmation | | inkos plan chapter [book-id] | Generate chapter intent | Preview what next chapter will do before writing | | inkos compose chapter [book-id] | Generate runtime artifacts | Context, rule-stack, trace for next chapter | | inkos consolidate [book-id] | Consolidate chapter summaries | Reduces context for long books (volume-level summaries) | | inkos eval [book-id] | Quality evaluation report | --json, --chapters <range>. Composite quality score | | inkos studio | Start web workbench | -p for port. Local web UI for book management | | inkos fanfic show [book-id] | Display parsed fanfic canon | Shows imported source material analysis | | inkos fanfic refresh [book-id] | Re-import and regenerate fanfic canon | --from <file> for updated source material |
"book-id not found"
inkos book list"Provider not configured"
inkos config set-global with valid credentialsinkos doctor"Context invalid"
--context is a string (wrap in quotes if multi-word)"Audit failed"
inkos revise with --mode rewrite"Book already has chapters" (import)
--resume-from <n> to append to existing chaptersFor long-running operations:
bash# Start background daemon inkos up # Stop daemon inkos down # Daemon auto-processes queued chapters
--context, the more coherent the narrativeinkos style import before generationinkos import chapters to bootstrap truth files before continuinginkos review to catch issues earlyinkos audit metrics to understand quality bottlenecksinkos analytics to track quality trends over timeinkos exportinkos initbooks/<id>/story/ per book, with structured JSON in story/state/inkos doctor for troubleshooting| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +86 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.