Install
openclaw skills install @narcooo/inkosStory Creation and Translation AI Agent with Studio Chat, CLI, and TUI - use for long-form novels, short fiction, scripts, storyboards, interactive-film projects, open-world / branching play, fan fiction, spinoffs, style imitation, continuations, covers, and multilingual EPUB/PDF/TXT/Markdown translation. Includes runtime skills, traceable research, governed context, persistent story state, multi-model routing, image services, and InkOS Studio.
openclaw skills install @narcooo/inkosInkOS is a story creation and multilingual translation AI agent for long-form novels, short fiction, scripts, storyboards, interactive-film projects, fan works, continuations, covers, open-world / branching interactive play, and long-document localization. Prefer the Studio Chat / action-surface workflow for natural-language requests: the model proposes or invokes typed actions, InkOS executes them, and completion is derived from real tool results and files, not from prose claims.
Long-form writing still uses the chapter pipeline internally:
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+.
Treat InkOS as a confirmable action system, not a bag of prompt shortcuts. v1.7.1 adds non-canonical narrative forecasting, background production tasks that do not block discussion, retryable task state, whole-book backup / restore, and rollback-safe latest-chapter deletion.
inkos interact whenever possible.short_fiction_run only for a standalone short-fiction package.generate_cover only for cover generation/regeneration.play_start / play_step for Open World or Branching Interactive sessions.research_web only when the user explicitly asks for external facts, market references, era/profession details, or worldbuilding research. Research reports are reference material and do not automatically mutate canon or prose.selected-branch-plan.md, but it must not be described as changing prose, outlines, or canonical state.prompt/<pack>/<prompt>.md; do not edit generated artifacts just to change system behavior.v1.7.0 keeps the v1.6 interactive-film and runtime-skill model, then adds complete multilingual translation/localization, English-native short/script/storyboard/interactive-film paths, existing-novel import from Chat, configurable review and revision gates, abortable long tasks, recoverable write locks, material archive/retrieval, and Studio-editable prompt packs. Still surface unresolved review or execution issues plainly instead of claiming they were fixed.
--lang en@skill-id# Initialize a project directory (creates config structure)
inkos init my-writing-project
# Configure your LLM provider (OpenAI, Anthropic, or any OpenAI-compatible API)
# Prefer --api-key-env so the key never appears in shell history:
export OPENAI_API_KEY=sk-xxx
inkos config set-global --provider openai --base-url https://api.openai.com/v1 --api-key-env OPENAI_API_KEY --model gpt-4o
# For compatible/proxy endpoints, use --provider custom and point ONLY to trusted endpoints:
# inkos config set-global --provider custom --base-url https://your-trusted-proxy.com/v1 --api-key-env OPENAI_API_KEY --model gpt-4o
# 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.
When the user needs an aggregator provider, point them to Studio's service settings. InkOS includes kkaiapi and OpenRouter as optional aggregator choices. For kkaiapi, use:
# Check installation and configuration
inkos doctor
# View current config
inkos status
Initialize and create book:
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 operationsGenerate initial chapters (e.g., 5 chapters):
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 agentsReview and approve chapters:
inkos review list book-id
inkos review approve-all book-id
Export the book (supports txt, md, epub):
inkos export book-id
inkos export book-id --format epub
List your books:
inkos book list
Continue from last chapter:
inkos write next book-id --count 3 --words 2500 --context "protagonist faces critical choice"
book-id for auto-detectionReview and approve:
inkos review approve-all
When InkOS is being driven by OpenClaw or another external agent, prefer the shared interaction executor instead of stitching together many ad-hoc CLI calls:
inkos interact --json --message "continue the current book, but keep the pacing tighter"
inkos interact --json --message "rewrite chapter 3"
inkos interact --json --message "start an open-world detective game about a locked archive room"
The current JSON payload contains:
Real completion still comes from tool results and files. Do not treat assistant prose alone as proof that a book, chapter, short, cover, or play step was created.
Use this as the primary OpenClaw entry because it shares the same control layer as the project TUI.
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 the book-level control docs when needed:
update_author_intent to change the long-horizon identity of the bookupdate_current_focus to change the next 1-3 chapters' focusCompile the next chapter intent:
plan_chapter(bookId, guidance?)
story/runtime/chapter-XXXX.intent.mdCompose the actual runtime input package:
compose_chapter(bookId, guidance?)
story/runtime/chapter-XXXX.context.jsonstory/runtime/chapter-XXXX.rule-stack.yamlstory/runtime/chapter-XXXX.trace.jsonOnly then write:
write_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 a narrative forecast when the author wants to inspect several plausible futures without committing any of them to canon.
inkos forecast create book-id --divergence "Does the protagonist reveal the evidence now?" --branches 3 --horizon 5
inkos forecast show [book-id] <forecast-id>.inkos forecast select book-id forecast-id branch-2
Selection writes only story/runtime/narrative-forecasts/<forecast-id>/selected-branch-plan.md. It does not apply the plan to chapter prose, outlines, author intent, or canonical state. Any later application remains a separate explicit authoring action.
Use this when you have an existing novel (or partial novel) and want InkOS to pick up where it left off.
Import from a single text file (auto-splits by chapter headings):
inkos import chapters book-id --from novel.txt
第X章 pattern--split "Chapter\\s+\\d+"Import from a directory of separate chapter files:
inkos import chapters book-id --from ./chapters/
.md and .txt files in sorted orderResume interrupted import:
inkos import chapters book-id --from novel.txt --resume-from 15
Continue writing from the imported chapters:
inkos write next book-id --count 3
Analyze reference text:
inkos style analyze reference_text.txt
Import style to your book:
inkos style import reference_text.txt book-id --name "Author Name"
Import parent canon:
inkos import canon spinoff-book-id --from parent-book-id
Continue spinoff:
inkos write next spinoff-book-id --count 3 --context "alternate timeline after Chapter 20"
If you need separate control over each pipeline stage:
Generate draft only:
inkos draft book-id --words 3000 --context "protagonist escapes" --json
Audit the chapter (33-dimension quality check):
inkos audit book-id chapter-1 --json
Revise with specific mode:
inkos revise book-id chapter-1 --mode polish --json
polish (minor), spot-fix (targeted), rewrite (major), rework (structure), anti-detect (reduce AI traces)inkos radar scan
# Detect AIGC in a specific chapter
inkos detect book-id
# Deep scan all chapters
inkos detect book-id --all
inkos analytics book-id --json
# Shorthand alias
inkos stats book-id --json
# 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 genres# 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
Use Studio Chat or inkos interact for small, explicit edits to generated text artifacts. Treat the chat layer like an external editor: it may edit persisted files, then the writing pipeline can continue from the updated state.
inkos interact --book my-book --json --message "把第 3 章里那句过长的解释删短一点,但不要改剧情事实"
inkos interact --json --message "把 covers/demo/cover-prompt.md 里的人物拉近一点,标题字更大"
author_intent.md / current_focus.md, then run plan / compose before writing.When the user asks for a rename or targeted replacement, keep the request explicit and scoped. Prefer Studio Chat / inkos interact over hidden slash shortcuts; the agent should route the edit through the shared action surface and report which file changed.
Examples:
inkos tui
inkos interact and StudioUse this when the user wants a complete short story or short-fiction deliverable that is separate from the active long-form book.
inkos short run \
--direction "modern short fiction marriage reversal evidence-driven heroine" \
--chapters 12 \
--chars 1000
Outputs are written under shorts/<story-name>/final/:
full.md — complete short-fiction manuscriptsales-package.md — synopsis and selling pointscover-prompt.md — cover promptcover.png — cover image when a cover provider is configuredFor OpenClaw/Studio/agent orchestration, call the short_fiction_run tool when the user asks for a new complete short-fiction package. Do not use it for the next chapter of an existing long-form book.
Use this when the user only wants a cover for an existing title, synopsis, or visual direction. Do not rerun the short-fiction pipeline.
In Studio or agent mode, ask naturally:
Generate a short-fiction cover for "The Divorce Papers He Regretted", modern city, high-drama reversal.
For tool-using agents, call generate_cover with:
title — requiredintro or sellingPoints — optional story contextcoverPrompt — optional visual directionoutputDir — optional; defaults to covers/<title>/The standalone cover tool writes:
covers/<title>/cover-prompt.mdcovers/<title>/cover.pngIf cover image generation fails, report the provider/configuration error plainly. Do not rewrite the story, do not rerun short_fiction_run, and do not suggest unrelated external tools unless the user asks.
Use this when the user wants to play inside an interactive world instead of generating a finished manuscript.
In Studio or agent mode, ask naturally:
Create a Warcraft-like border watchtower open world. Time can advance differently by action: patrols take an hour, training can take days. Equipment should show rarity through material and atmosphere, not stat blocks.
For tool-using agents:
play_start when there is no active world/run yet, or when the user explicitly asks to start a new world.play_step when the user performs an action inside an existing world.Use this when the user wants reusable professional rules, a domain-specific writing mode, or a forced capability for the current Chat turn.
Project-local skills live at:
.inkos/skills/<skill-id>/SKILL.md
External skill directories can be loaded with:
export INKOS_SKILL_DIRS=/abs/path/to/skills
Guidelines for agent orchestration:
@skill-id in the user message when the user explicitly chooses one.Use this when the user asks for real-world references, external facts, era/profession details, market references, or worldbuilding research.
For tool-using agents, call research_web with:
topic — the research questionpurpose — worldbuilding, era, profession, market, fact-check, or generaldepth — optional: quick, standard, or deepThe tool writes a Markdown report under:
.inkos/research/
The report includes sources, claims, unknowns, conflicts, query logs, and confidence. It is reference material only. If research should change canon, wait for explicit user confirmation and then use the normal truth-file editing path.
Search credentials are user/project supplied. Studio can configure a Tavily-compatible search API, or the server can use TAVILY_API_KEY from the environment.
Use this when the user wants a production artifact rather than a casual answer:
In Studio Chat, these actions should be proposed with a confirmation card first. After confirmation, InkOS writes the artifact and reports the saved files. Do not hand-write a fake "created" result in prose.
Use a translation project when the user wants a complete, reviewable deliverable rather than a one-off translated paragraph. Inputs can be EPUB, text-based PDF, TXT, or Markdown; source and target languages can be written as normal language names in Studio.
inkos translate init --from ./source.epub --source Chinese --target English
inkos translate run <project-id>
inkos translate export <project-id> --format epub
inkos studio launches a local web UI (default port 4567) that provides a visual interface for all InkOS operations:
.inkos/skills/<id>/SKILL.md, and force skills from Chatresearch_webinkos studio # Start on default port 4567
inkos studio -p 8080 # Start on custom port
The Studio Chat surface shares the same action kernel as TUI and CLI. It can answer questions, propose/confirm creation and translation actions, run Short, generate covers, start Play, import existing novels, edit persistent text artifacts, and invoke long-form writing operations.
For flexible, conversational requests:
inkos 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.mdThese are the preferred tools when InkOS is driven by OpenClaw, Studio chat, or inkos agent:
short_fiction_run
shorts/<story-name>/generate_cover
covers/<title>/ by defaultcoverPrompt and reuse the existing outputDir when availableplay_start
play_step
research_web
Script / storyboard / interactive-film creation tools
write_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:
# 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:
inkos draft book-id --words 3000 --context "guidance" --json
InkOS maintains each book's memory in three layers:
story/state/*.json is the authoritative runtime state, validated by Zod schemas.current_state.md, pending_hooks.md, chapter_summaries.md, character_matrix.md, and related Markdown files are for humans and debugging.story/memory.db on Node 22+ supports relevance-based retrieval of facts, hooks, and chapter summaries.Agents use the governed composer to select the relevant parts for the current task instead of blindly injecting every file. During import chapters, InkOS rebuilds structured state and projections 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:
inkos write next book-id --count 2 --context "protagonist discovers betrayal, must decide whether to trust mentor"
inkos genre list
inkos genre show xuanhuan
inkos genre create my-genre --name "My Genre"
# Options: --numerical, --power, --era
inkos genre create dark-xuanhuan --name "Dark Xuanhuan" --numerical --power
inkos 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 short run | Generate standalone short fiction | Outputs manuscript, sales package, cover prompt, optional cover |
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 forecast create/show/select | Compare non-canonical future branches | Selection saves a candidate plan only; canon remains unchanged |
inkos eval [book-id] | Quality evaluation report | --json, --chapters <range>. Composite quality score |
inkos / 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 |
inkos interact | Shared interaction endpoint | --json, --message, --book. Primary entry for OpenClaw |
inkos tui | Launch TUI dashboard | Full-screen Ink + React interactive dashboard |
"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:
# 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 export@actalk/inkos, @actalk/inkos-core, and @actalk/inkos-studio npm packages are AGPL-3.0-only. Running InkOS and distributing modified versions are governed by AGPL. Full source on GitHub for auditability.preinstall/postinstall/install scripts. Install is inert.books/*, inkos.json, inkos.log). No writes outside the working directory.--api-key-env <VAR_NAME> over literal keys. Studio stores service secrets in project-local .inkos/secrets.json; CLI env settings live in ~/.inkos/.env or project .env. Treat all of these as secrets and keep them out of commits.--provider custom forwards your API key to whatever URL you specify. Only point it at endpoints you trust (your own proxy or an audited reverse-proxy). Never paste an untrusted --base-url.localhost:4567 only).inkos initbooks/<id>/story/ per book, with structured JSON in story/state/inkos doctor for troubleshooting