### Project Setup and Installation Source: https://github.com/narcooo/inkos/blob/master/CONTRIBUTING.md Clone the repository, install dependencies, build the project, and run tests. Requires Node.js version 20+ and pnpm version 9+. ```bash git clone https://github.com/Narcooo/inkos.git cd inkos pnpm install pnpm build pnpm test ``` -------------------------------- ### Development Setup Commands Source: https://github.com/narcooo/inkos/blob/master/README.en.md Commands for setting up and running the development environment, including installation, watching files, and type checking. ```bash pnpm install ``` ```bash pnpm dev # Watch mode for all packages ``` ```bash pnpm test # Run tests ``` ```bash pnpm typecheck # Type-check without emitting ``` -------------------------------- ### Diagnose Setup Issues Source: https://github.com/narcooo/inkos/blob/master/README.en.md Diagnoses setup issues by performing API connectivity tests and providing provider compatibility hints. ```bash inkos doctor ``` -------------------------------- ### Start Web Workbench Source: https://github.com/narcooo/inkos/blob/master/README.en.md Starts the Inkos web workbench. Use -p to specify the port, defaults to 4567. ```bash inkos / inkos studio (-p ) ``` -------------------------------- ### Launch InkOS Studio Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Start the InkOS Studio local web UI on the default port 4567 or a custom port. ```bash inkos studio ``` ```bash inkos studio -p 8080 ``` -------------------------------- ### Initialize Fan Fiction Project Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Start a fan fiction project with 'inkos fanfic init'. Import from a source file and choose a mode (canon, au, ooc, cp) to define the writing style relative to the source material. ```bash # 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 ``` -------------------------------- ### Plan and compose a chapter Source: https://github.com/narcooo/inkos/blob/master/README.en.md Plan a chapter by providing context to guide the LLM's focus, then compose the chapter. This process generates intent files and runtime artifacts. The 'compose' command can run even before API key setup. ```bash inkos plan chapter my-book --context "Pull attention back to the mentor conflict first" inkos compose chapter my-book ``` -------------------------------- ### Install InkOS Skill from ClawHub Source: https://github.com/narcooo/inkos/blob/master/README.en.md Install the InkOS Skill from ClawHub. This allows compatible agents like Claude Code or OpenClaw to use InkOS functionalities. ```bash clawhub install inkos ``` -------------------------------- ### Start Open World Play Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Initiate an interactive open world session using the `play_start` tool. This is used when no active world exists or a new one is requested. ```python play_start( world_contract="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." ) ``` -------------------------------- ### Start web workbench on a specific port Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Starts the InkOS web workbench on a specified port using the -p flag for local UI access. ```bash inkos -p ``` ```bash inkos studio -p ``` -------------------------------- ### Install InkOS via npm Source: https://github.com/narcooo/inkos/blob/master/README.en.md Install the InkOS package globally using npm. This command is typically used for direct command-line usage or integration into other Node.js projects. ```bash npm i -g @actalk/inkos ``` -------------------------------- ### Start background daemon Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Starts the InkOS daemon in the background for long-running operations. Logs are written to inkos.log in JSON Lines format. Use -q for quiet mode. ```bash # Start background daemon inkos up ``` -------------------------------- ### Start Terminal TUI Source: https://github.com/narcooo/inkos/blob/master/README.en.md Starts the Inkos terminal-based user interface. ```bash inkos tui ``` -------------------------------- ### Start InkOS in daemon mode Source: https://github.com/narcooo/inkos/blob/master/README.en.md Initiate an autonomous background process for writing chapters on a schedule. This mode handles non-critical issues and pauses for human review when necessary. Configure notifications and logging behavior. ```bash inkos up ``` -------------------------------- ### Check InkOS System Status Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Checks the installation and configuration of InkOS. Also used to view the current configuration settings. ```bash # Check installation and configuration inkos doctor # View current config inkos status ``` -------------------------------- ### Control Daemon Service Source: https://github.com/narcooo/inkos/blob/master/README.en.md Starts or stops the Inkos daemon service. Use -q for quiet mode. Automatically writes to inkos.log. ```bash inkos up / down (-q) ``` -------------------------------- ### Resume Interrupted Chapter Import Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Continue an interrupted chapter import process by specifying the starting chapter number. ```bash inkos import chapters book-id --from novel.txt --resume-from 15 ``` -------------------------------- ### Analyze Writing Style Source: https://github.com/narcooo/inkos/blob/master/README.en.md Use the 'inkos style analyze' command to examine reference text and extract a statistical fingerprint and style guide for a book. ```bash inkos style analyze ``` -------------------------------- ### Continue Writing from Imported Chapters Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Write new chapters based on imported content. InkOS rebuilds state, summaries, hooks, relationships, projections, and a style guide from the imported text. ```bash inkos write next book-id --count 3 ``` -------------------------------- ### Create a new book from a brief Source: https://github.com/narcooo/inkos/blob/master/README.en.md Use this command to initialize a new book project by providing your brainstorming notes or worldbuilding documents. The system generates a story bible and book rules, and persists your brief for long-term author intent. ```bash inkos book create --brief my-ideas.md ``` -------------------------------- ### Initialize and Run InkOS Project Source: https://github.com/narcooo/inkos/blob/master/README.en.md Use these commands to initialize a new InkOS project and run the CLI. ```bash inkos init my-novel cd my-novel inkos ``` -------------------------------- ### Initialize Project Source: https://github.com/narcooo/inkos/blob/master/README.en.md Initializes a new Inkos project. Omit the name to initialize the current directory. ```bash inkos init [name] ``` -------------------------------- ### Initialize InkOS Project Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Initializes a new project directory with the necessary configuration structure. This is the first step for any new InkOS project. ```bash # Initialize a project directory (creates config structure) inkos init my-writing-project ``` -------------------------------- ### Create a new book Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Creates a new book within the project. You can specify options like brief file, language, and genre. ```bash inkos book create ``` -------------------------------- ### Create and Manage a Book with InkOS CLI Source: https://github.com/narcooo/inkos/blob/master/README.en.md Commands for creating a new book, writing the next chapter, checking status, reviewing drafts, and exporting the book in EPUB format. Use --lang to override the default language. ```bash inkos book create --title "The Last Delver" --genre litrpg # LitRPG novel (English by default) inkos write next my-book # Write next chapter (full pipeline: draft → audit → revise) inkos status # Check status inkos review list my-book # Review drafts inkos review approve-all my-book # Batch approve inkos export my-book --format epub # Export EPUB (read on phone/Kindle) ``` -------------------------------- ### Initialize Fanfiction Book Source: https://github.com/narcooo/inkos/blob/master/README.en.md Creates a fanfiction book from source material. Supports different modes like canon, au, ooc, cp. ```bash inkos fanfic init (--from --mode canon/au/ooc/cp) ``` -------------------------------- ### Initialize fanfiction creation Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Creates a fanfiction project from source material. Supports different modes like canon, AU, OOC, and CP. ```bash inkos fanfic init ``` -------------------------------- ### Initialize a fan fiction book Source: https://github.com/narcooo/inkos/blob/master/README.en.md Create a fan fiction book from source material. Supports multiple modes like 'canon', 'au', 'ooc', and 'cp', and includes features for lore consistency and audit dimensions. ```bash inkos fanfic init --from source.txt --mode canon ``` -------------------------------- ### Context Guidance for Writer and Architect Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Illustrates how to use the --context parameter to provide directional hints for narrative coherence to the Writer and Architect. Supports both English and Chinese. ```bash inkos write next book-id --count 2 --context "protagonist discovers betrayal, must decide whether to trust mentor" ``` -------------------------------- ### Control daemon mode for background processing Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Manages the InkOS daemon for background processing. Use 'up' to start and 'down' to stop. The daemon processes queued chapters automatically. ```bash inkos up ``` ```bash inkos down ``` -------------------------------- ### Create New Book Source: https://github.com/narcooo/inkos/blob/master/README.en.md Creates a new book with optional genre, chapter word count, target chapters, brief file, and language settings. ```bash inkos book create (--genre --chapter-words --target-chapters --brief --lang en/zh) ``` -------------------------------- ### List Books Source: https://github.com/narcooo/inkos/blob/master/README.en.md Lists all available books in the project. ```bash inkos book list ``` -------------------------------- ### Plan Next Chapter Intent Source: https://github.com/narcooo/inkos/blob/master/README.en.md Generates the intent for the next chapter. Use --context or --context-file for current steering. ```bash inkos plan chapter [id] (--context | --context-file ) ``` -------------------------------- ### Import Writing Style Source: https://github.com/narcooo/inkos/blob/master/README.en.md Imports a style fingerprint into a book. ```bash inkos style import [id] ``` -------------------------------- ### Create a new genre with options Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Use this command to create a new genre profile, specifying its name and various attributes like numerical, power, and era. ```bash inkos genre create dark-xuanhuan --name "Dark Xuanhuan" --numerical --power ``` -------------------------------- ### Show Model Routing Source: https://github.com/narcooo/inkos/blob/master/README.en.md Displays the current model routing configuration. ```bash inkos config show-models ``` -------------------------------- ### Generate Initial Chapters Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Generates a specified number of initial chapters for a book. The command runs the full pipeline including drafting, auditing, and revising. Context can be provided for guidance. ```bash inkos write next book-id --count 5 --words 3000 --context "young protagonist discovering powers" ``` -------------------------------- ### Using --json Flag for Structured Output Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Shows how to use the --json flag with content-generating commands to obtain structured output, which is essential for programmatic use. ```bash inkos draft book-id --words 3000 --context "guidance" --json ``` -------------------------------- ### Configure Global InkOS Settings via CLI Source: https://github.com/narcooo/inkos/blob/master/README.en.md Set global language, LLM provider, base URL, API key, and model using the InkOS CLI. This configuration is saved to ~/.inkos/.env. ```bash inkos config set-global \ --lang en \ --provider \ --base-url \ --api-key \ --model ``` -------------------------------- ### Plan Chapter Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Use the `plan_chapter` tool to generate the intent for the next chapter. This is recommended before writing when a change in focus is desired. ```python plan_chapter(bookId="your_book_id", guidance="Focus on the protagonist's internal conflict.") ``` -------------------------------- ### Configure a custom LLM provider Source: https://github.com/narcooo/inkos/blob/master/README.en.md Set up InkOS to use any OpenAI-compatible endpoint. Includes automatic fallback to sync mode if SSE is not supported and a fallback parser for non-standard model outputs. ```bash --provider custom ``` -------------------------------- ### Create a New Novel Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Initializes and creates a new novel with a specified title, genre, and chapter word count. Can optionally use a creative brief document. ```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 ``` -------------------------------- ### Explicit vs. Auto-Detected Book ID Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Demonstrates how to specify a book ID explicitly or rely on auto-detection when only one book exists in the project. ```bash # Explicit inkos write next book-123 --count 1 ``` ```bash # Auto-detected (if only one book exists) inkos write next --count 1 ``` -------------------------------- ### Compose Chapter Inputs Source: https://github.com/narcooo/inkos/blob/master/README.en.md Generates the input files for the next chapter (context.json, rule-stack.yaml, trace.json). This command does not require a live LLM. ```bash inkos compose chapter [id] ``` -------------------------------- ### Configure Multi-Model Routing for Agents Source: https://github.com/narcooo/inkos/blob/master/README.en.md Assign specific models, providers, and API key environment variables to different agents for cost and quality balancing. Use 'inkos config show-models' to view current routing. ```bash # Assign different models/providers to different agents inkos config set-model writer --provider --base-url --api-key-env inkos config set-model auditor --provider inkos config show-models # View current routing ``` -------------------------------- ### Development Commands Source: https://github.com/narcooo/inkos/blob/master/CONTRIBUTING.md Commands for development workflows, including watch mode, building, testing, and type checking. ```bash pnpm dev # Watch mode (both packages) pnpm build # Build once pnpm test # Run all tests pnpm typecheck # Type-check without emitting ``` -------------------------------- ### Creating a Custom Genre Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Command to create a new custom genre, specifying its unique key and display name. ```bash inkos genre create my-genre --name "My Genre" ``` -------------------------------- ### Manage Genres Source: https://github.com/narcooo/inkos/blob/master/README.en.md Provides commands to view, copy, or create genres. ```bash inkos genre list/show/copy/create ``` -------------------------------- ### Import Canon for Spinoff Source: https://github.com/narcooo/inkos/blob/master/README.en.md Imports the parent canon into a spinoff book. ```bash inkos import canon [id] --from ``` -------------------------------- ### Plan and Compose Chapters Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Commands to plan the intent of a chapter and compose the necessary input files. 'plan_chapter' generates an intent file, while 'compose_chapter' generates context, rule stack, and trace files. ```text plan_chapter(bookId, guidance?) compose_chapter(bookId, guidance?) ``` -------------------------------- ### Execute the full writing pipeline Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Runs the complete workflow: draft generation, auditing, and revision. This is the primary command for content creation. ```bash inkos write next ``` -------------------------------- ### Import Writing Style Source: https://github.com/narcooo/inkos/blob/master/README.en.md Use the 'inkos style import' command to inject a previously analyzed style fingerprint into a book, ensuring future chapters adopt the same style. ```bash inkos style import ``` -------------------------------- ### Configure Global LLM Provider (OpenAI) Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Configures the global settings for an LLM provider, such as OpenAI. It's recommended to use --api-key-env to prevent API keys from appearing in shell history. ```bash # 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 ``` -------------------------------- ### Export Book Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Exports the created book in various formats, including TXT, Markdown, and EPUB. Specify the desired format using the --format flag. ```bash inkos export book-id inkos export book-id --format epub ``` -------------------------------- ### Generate Short Fiction Package Source: https://github.com/narcooo/inkos/blob/master/README.en.md Generates a standalone short-fiction package. ```bash inkos short run ``` -------------------------------- ### Project Status Source: https://github.com/narcooo/inkos/blob/master/README.en.md Displays the current status of the project. ```bash inkos status [id] ``` -------------------------------- ### Import Chapters from a Directory Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Import an existing novel by providing a directory containing separate chapter files. InkOS reads .md and .txt files in sorted order. ```bash inkos import chapters book-id --from ./chapters/ ``` -------------------------------- ### Launch Open World or Branching Story Source: https://github.com/narcooo/inkos/blob/master/README.en.md Describe your desired world in natural language within Studio Chat to create an open world or branching interactive story. This includes defining world mechanics, time, and item properties. ```text Create a Warcraft-like border watchtower open world. Time is not fixed per turn: patrols take an hour, training can take several days. Equipment has rarity, but no stat sheet; show rarity through material, glow, and atmosphere. ``` -------------------------------- ### Compose Chapter Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Use the `compose_chapter` tool after planning to generate runtime context and artifacts before writing the chapter. ```python compose_chapter(bookId="your_book_id", guidance="Ensure the pacing matches the planned intent.") ``` -------------------------------- ### External Agent Interaction Source: https://github.com/narcooo/inkos/blob/master/README.en.md Provides an entry point for external agents or CLI natural-language interaction. Supports JSON output, messages, and book specification. ```bash inkos interact (--json --message --book ) ``` -------------------------------- ### Generate chapter intent Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Generates the intent for the next chapter of a book, providing a preview of its content before writing. ```bash inkos plan chapter [book-id] ``` -------------------------------- ### Run Anti-Detect Rewriting Source: https://github.com/narcooo/inkos/blob/master/README.en.md Execute 'revise --mode anti-detect' to perform dedicated anti-detection rewriting on existing chapters. ```bash revise --mode anti-detect ``` -------------------------------- ### Manage chapter approvals Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Provides commands to list and approve chapters, acting as a quality gate. ```bash inkos review list ``` ```bash inkos review approve-all ``` -------------------------------- ### Natural Language Agent Mode Source: https://github.com/narcooo/inkos/blob/master/README.en.md Enters natural language agent mode for direct instruction. ```bash inkos agent ``` -------------------------------- ### Update Book Settings Source: https://github.com/narcooo/inkos/blob/master/README.en.md Updates existing book settings such as chapter word count, target chapters, status, and language. ```bash inkos book update [id] (--chapter-words --target-chapters --status --lang ) ``` -------------------------------- ### Create an English Novel Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Initiate the creation of a new English novel with 'inkos book create'. Specify title, genre, and optionally chapter words and language. The language can also be set globally. ```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 ``` -------------------------------- ### Configure Multi-Model Routing Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Assigns specific LLM models to different agents (e.g., writer, auditor) to balance quality and cost. Agents without explicit overrides use the global model. ```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 ``` -------------------------------- ### Generate runtime artifacts for a chapter Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Creates runtime artifacts, including context, rule-stack, and trace, for the next chapter. ```bash inkos compose chapter [book-id] ``` -------------------------------- ### Import Existing Chapters Source: https://github.com/narcooo/inkos/blob/master/README.en.md Imports existing chapters for continuation. Supports splitting and resuming from a specific point. ```bash inkos import chapters [id] --from (--split --resume-from ) ``` -------------------------------- ### Running Specific Package Tests Source: https://github.com/narcooo/inkos/blob/master/CONTRIBUTING.md Commands to run tests for the core package or the CLI package individually using pnpm filters. ```bash pnpm --filter @actalk/inkos-core test # Core tests only pnpm --filter @actalk/inkos test # CLI tests only ``` -------------------------------- ### Listing Built-In Genres Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Command to view a list of all available built-in genres within InkOS. ```bash inkos genre list ``` -------------------------------- ### Review Drafts Source: https://github.com/narcooo/inkos/blob/master/README.en.md Lists drafts for review. ```bash inkos review list [id] ``` -------------------------------- ### Import Style to a Book Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Import a style profile from a reference text into your book. All future chapters will adopt this style, and style rules will be used in the audit process. ```bash inkos style import reference_text.txt book-id --name "Author Name" ``` -------------------------------- ### Configure Global LLM Provider (Custom/Proxy) Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Configures the global settings for a custom or proxy LLM endpoint. Ensure the endpoint is trusted. ```bash # 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 ``` -------------------------------- ### Write Next Chapter Source: https://github.com/narcooo/inkos/blob/master/README.en.md Executes the full pipeline to write the next chapter. Use --words to override target word count, --count for batch writing, and -q for quiet mode. ```bash inkos write next [id] (--words --count -q) ``` -------------------------------- ### Showing a Specific Genre Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Command to display details about a specific genre, identified by its key. ```bash inkos genre show xuanhuan ``` -------------------------------- ### Copy a built-in genre for customization Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md This command copies an existing built-in genre to your project's 'genres/' directory, allowing for custom modifications. ```bash inkos genre copy xuanhuan ``` -------------------------------- ### Generate Complete Short Fiction with InkOS CLI Source: https://github.com/narcooo/inkos/blob/master/README.en.md Run short fiction generation from the CLI, specifying direction, chapter count, and character count. Outputs are saved in shorts//final/. ```bash inkos short run \ --direction "modern short fiction marriage reversal evidence-driven heroine" \ --chapters 12 \ --chars 1000 ``` -------------------------------- ### Set Global LLM Configuration Source: https://github.com/narcooo/inkos/blob/master/README.en.md Sets the global LLM configuration, typically in ~/.inkos/.env. ```bash inkos config set-global ``` -------------------------------- ### Re-import fanfic canon from an updated source file Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Refreshes the fanfiction canon by re-importing from an updated source file specified with the --from flag. ```bash inkos fanfic refresh [book-id] --from ``` -------------------------------- ### Export Book Source: https://github.com/narcooo/inkos/blob/master/README.en.md Exports the book in specified formats (txt, md, epub). Use --output for path and --approved-only to export only approved chapters. ```bash inkos export [id] (--format txt/md/epub --output --approved-only) ``` -------------------------------- ### Analyze Reference Text for Style Imitation Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Analyze a reference text file to extract stylistic elements such as vocabulary, sentence structure, tone, and pacing. ```bash inkos style analyze reference_text.txt ``` -------------------------------- ### Interact using natural language Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Provides a natural language interface for flexible requests to InkOS. ```bash inkos agent ``` -------------------------------- ### Full Pipeline Write Command Source: https://github.com/narcooo/inkos/blob/master/README.en.md Execute the entire writing pipeline (draft, audit, revise) with a single command. You can specify the number of chapters to write. ```bash inkos write next my-book # Draft → audit → auto-revise, all in one inkos write next my-book --count 5 # Write 5 chapters in sequence ``` -------------------------------- ### Natural Language Agent Mode Commands Source: https://github.com/narcooo/inkos/blob/master/README.en.md Interact with InkOS using natural language prompts to generate content. The available tools adapt to the session's context (e.g., book creation, editing, planning). ```bash inkos agent "Write a LitRPG novel where the MC is a healer class in a dungeon world" inkos agent "Write the next chapter, focus on the boss fight and loot distribution" inkos agent "Create a progression fantasy about a mage who can only use one spell" ``` -------------------------------- ### Link a spinoff to its parent material Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Links a spinoff work (prequel/sequel) to its parent material. ```bash inkos import canon ``` -------------------------------- ### Export a finished book Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Exports the completed book in various formats, including TXT, MD, and EPUB. ```bash inkos export ``` -------------------------------- ### Review and Approve Chapters Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Lists chapters available for review and approves all of them for a given book ID. This is part of the writing workflow. ```bash inkos review list book-id inkos review approve-all book-id ``` -------------------------------- ### Perform a 33-dimension quality check Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Conducts a standalone quality evaluation of the current content based on 33 dimensions. ```bash inkos audit ``` -------------------------------- ### Configure agent models Source: https://github.com/narcooo/inkos/blob/master/README.en.md Set specific language models and providers for different agents within InkOS. Unconfigured agents will use the globally defined model. ```bash inkos config set-model ``` -------------------------------- ### Import existing novel text Source: https://github.com/narcooo/inkos/blob/master/README.en.md Use this command to import existing novel text, which rebuilds structured state, chapter summaries, hooks, and character relationships. After import, you can continue the story using 'inkos write next'. ```bash inkos import chapters ``` -------------------------------- ### Generate Short Fiction Cover Source: https://github.com/narcooo/inkos/blob/master/README.en.md Use this command in Studio chat to generate a cover for an existing title or synopsis. The tool creates cover prompt and image files. Ensure a cover provider is configured. ```text Generate a short-fiction cover for "The Divorce Papers He Regretted", modern city, high-drama reversal. ``` -------------------------------- ### Re-import and regenerate fanfic canon Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Re-imports source material and regenerates the fanfiction canon. Use --from for updated source material. ```bash inkos fanfic refresh [book-id] ``` -------------------------------- ### Generate Quality Evaluation Report Source: https://github.com/narcooo/inkos/blob/master/README.en.md Generates a quality evaluation report for a book. Supports JSON output and chapter ranges. ```bash inkos eval [id] (--json --chapter-ranges) ``` -------------------------------- ### Rewrite Chapter Source: https://github.com/narcooo/inkos/blob/master/README.en.md Rewrites a specific chapter. Restores state snapshot. Use --force to skip confirmation. ```bash inkos write rewrite [id] [--force] ``` -------------------------------- ### InkOS Global Environment Variables Source: https://github.com/narcooo/inkos/blob/master/README.en.md Manually edit the global ~/.inkos/.env file or project .env file to configure LLM settings and default language. ```bash # Required INKOS_LLM_PROVIDER= # openai / anthropic / custom (use custom for any OpenAI-compatible API) INKOS_LLM_BASE_URL= # API endpoint INKOS_LLM_API_KEY= # API Key INKOS_LLM_MODEL= # Model name # Language (defaults to global setting or genre default) # INKOS_DEFAULT_LANGUAGE=en # en or zh # Optional # INKOS_LLM_TEMPERATURE=0.7 # Temperature # INKOS_LLM_THINKING_BUDGET=0 # Anthropic extended thinking budget ``` -------------------------------- ### Consolidate Chapter Summaries Source: https://github.com/narcooo/inkos/blob/master/README.en.md Consolidates chapter summaries for long-book context control. ```bash inkos consolidate [id] ``` -------------------------------- ### Generate Standalone Cover Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Use the `generate_cover` tool for creating a cover for an existing title. It accepts optional context and visual direction. ```python generate_cover( title="The Divorce Papers He Regretted", coverPrompt="modern city, high-drama reversal", outputDir="covers/The Divorce Papers He Regretted/" ) ``` -------------------------------- ### Continue Open World Play Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Advance an existing interactive open world session with `play_step`. This is used when the user performs an action within the current world. ```python play_step( action="Patrol the border" ) ``` -------------------------------- ### Invoke Agent with Natural Language Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Use the `inkos agent` command to interact with the system using natural language. The agent interprets requests and invokes appropriate commands. ```bash inkos agent "写一部都市题材的小说,主角是一个年轻律师,第一章三千字" ``` -------------------------------- ### InkOS Configuration for Governance Mode Source: https://github.com/narcooo/inkos/blob/master/README.en.md Explicitly set the input governance mode in inkos.json. The default is 'v2', but 'legacy' is available as a fallback. ```json { "inputGovernanceMode": "legacy" } ``` -------------------------------- ### Continue Spinoff/Prequel Writing Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Write new chapters for a spinoff or prequel, with options to specify context such as an alternate timeline. ```bash inkos write next spinoff-book-id --count 3 --context "alternate timeline after Chapter 20" ``` -------------------------------- ### Continue Writing Existing Novel Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Continues writing an existing novel by generating a specified number of new chapters. InkOS maintains state for consistency. If only one book exists, the book ID can be omitted. ```bash inkos write next book-id --count 3 --words 2500 --context "protagonist faces critical choice" ``` -------------------------------- ### Delete a book with force confirmation Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Deletes a book and all its chapters. The --force flag bypasses the confirmation prompt. ```bash inkos book delete --force ``` -------------------------------- ### Shared interaction endpoint for OpenClaw Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md The primary entry point for OpenClaw, providing a shared interaction endpoint. Supports JSON output, messages, and book context. ```bash inkos interact ``` -------------------------------- ### Atomic Commands for Composable Operations Source: https://github.com/narcooo/inkos/blob/master/README.en.md Perform individual operations like planning, composing, drafting, auditing, and revising. Use the --json flag for structured output. These commands are suitable for external agents or scripting. ```bash inkos plan chapter my-book --context "Focus on the mentor conflict first" --json inkos compose chapter my-book --json inkos draft my-book --context "Focus on the dungeon boss encounter and party dynamics" --json inkos audit my-book 31 --json inkos revise my-book 31 --json ``` -------------------------------- ### Display parsed fanfic canon Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Shows the parsed fanfiction canon, which is an analysis of the imported source material. ```bash inkos fanfic show [book-id] ``` -------------------------------- ### Import Parent Canon for Spinoff/Prequel Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Import the canon of a parent book to create a spinoff or prequel. This establishes links to the parent's world state, characters, and events, ensuring canon consistency. ```bash inkos import canon spinoff-book-id --from parent-book-id ``` -------------------------------- ### Analyze Writing Style Source: https://github.com/narcooo/inkos/blob/master/README.en.md Analyzes a reference text to extract a style fingerprint. ```bash inkos style analyze ``` -------------------------------- ### Interact via shared endpoint with JSON output Source: https://github.com/narcooo/inkos/blob/master/skills/SKILL.md Uses the shared interaction endpoint for communication, with --json flag for structured output, and specifying message and book context. ```bash inkos interact --json --message "" --book ``` -------------------------------- ### Scan Market Trends Source: https://github.com/narcooo/inkos/blob/master/README.en.md Scans market and trend inputs to determine new book direction. ```bash inkos radar scan ```