kentjuno/ainovel-cli
CLI sáng tác tiểu thuyết AI đa agent — Bản tiếng Việt của voocel/ainovel-cli
ainovel‑cli – AI‑powered multi‑agent novel writer (Vietnamese & multilingual)
What it is – A command‑line / terminal UI (TUI) application written in Go that orchestrates several LLM agents (Coordinator, Architect, Writer, Editor, Arbiter) to automatically draft long‑form fiction. It ships with a fully Vietnamese‑localized interface, supports writing in Vietnamese or Chinese, and can run entirely offline with local Ollama models or connect to cloud providers (OpenRouter, Gemini, Claude, OpenAI, DeepSeek).
Key capabilities
- Multi‑agent workflow – separate agents handle story planning, drafting, editing, and arbitration, with step‑level checkpointing and recovery.
- Two‑tier rolling planning – only the next arc is expanded as the story progresses, keeping context windows manageable for very long novels.
- Prompt caching & 4‑level context compression – reduces token usage while preserving narrative state.
- Rich slash‑command UI –
/diag,/simulate,/import,/export,/sync, etc., let you inspect health, mimic a target writing style, import existing texts, and export finished works as TXT or EPUB. - Model flexibility – you can mix providers per role (e.g., a powerful Claude model for editing and a local Qwen model for drafting) and switch models on the fly.
- Offline first – with Ollama you can run 100 % locally on a GPU (≥12 GB VRAM) using open‑source models such as Qwen 2.5/3.5.
- Vietnamese‑only UI – every menu, status bar, and error message is translated, while the story content can be generated in Vietnamese (default) or Chinese.
Typical workflow
- Run the setup wizard (first launch) to choose a provider, enter API keys or configure Ollama, and set the language.
- Start the TUI (
docker compose run --rm ainovelor./ainovel-cli). - Either give a one‑sentence premise for a quick start or enter co‑create mode to iteratively refine world‑building and characters.
- Use slash commands to intervene, import external drafts, simulate a desired author’s style, or export the manuscript.
- The system saves checkpoints after each tool step, so a crash or
Ctrl‑Cresumes exactly where it left off.
Installation
- Docker (recommended):
docker compose build && docker compose run --rm ainovel. - From source: Install Go ≥ 1.21, clone the repo, then
go build -o ainovel-cli ./cmd/ainovel-cliand run./ainovel-cli. - Local LLM: Create an Ollama model with a large context window (e.g.,
qwen2.5:14bwithnum_ctx 65536). - Cloud LLM: Provide API keys for OpenRouter, Gemini, Claude, OpenAI, or DeepSeek in
config/config.json.
Directory layout (output lives under workspace/ or a custom NOVEL_DIR):
novels/<title>/output/novel/
├─ chapters/ # finished markdown chapters
├─ drafts/ # intermediate drafts
├─ reviews/ # editor quality reports
├─ summaries/ # arc/volume summaries
├─ premise.md
├─ characters.md
├─ world_rules.md
└─ meta/ # checkpoints, progress, logs
Tech stack
- Language: Go
- Agent core:
agentcore(tool‑calling & streaming) - LLM wrapper:
litellm - TUI framework: Bubble Tea + Lip Gloss
- License: MIT
Who might use it – Writers who want AI assistance for long‑form fiction, hobbyists experimenting with multi‑agent LLM pipelines, or developers looking for a ready‑made example of a sophisticated agent orchestration system.
Related
- Project
- Project
- Project
- Project