一键导入
ainovel-cli-vietnamese
CLI tool for AI-powered multi-agent Vietnamese novel writing with automatic orchestration, rolling planning, and real-time intervention
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
CLI tool for AI-powered multi-agent Vietnamese novel writing with automatic orchestration, rolling planning, and real-time intervention
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ainovel-cli-vietnamese |
| description | CLI tool for AI-powered multi-agent Vietnamese novel writing with automatic orchestration, rolling planning, and real-time intervention |
| triggers | ["write a Vietnamese novel using AI","set up ainovel-cli for automatic story writing","configure multi-agent novel writing system","create a Vietnamese novel with AI agents","resume interrupted novel writing session","customize novel writing style and rules","export AI-generated novel to EPUB","troubleshoot ainovel-cli Vietnamese version"] |
Skill by ara.so — Devtools Skills collection.
ainovel-cli (Vietnamese fork) is an autonomous multi-agent CLI system for long-form Vietnamese novel generation. It orchestrates three specialized agents (Architect, Writer, Editor) through a single LLM loop to produce complete novels from a one-sentence prompt, with support for 500+ chapters, real-time intervention, and automatic checkpoint recovery.
Key capabilities:
# Clone the repository
git clone https://github.com/kentjuno/ainovel-cli.git
cd ainovel-cli
# Create directories
mkdir -p config workspace
# Build image
docker build -t ainovel-cli-vi .
# Run TUI
docker run --rm -it \
-v "$PWD/config:/root/.ainovel" \
-v "$PWD/workspace:/workspace" \
-e TERM=xterm-256color \
ainovel-cli-vi
Windows PowerShell:
docker run --rm -it `
-v "${PWD}\config:/root/.ainovel" `
-v "${PWD}\workspace:/workspace" `
-e TERM=xterm-256color `
ainovel-cli-vi
git clone https://github.com/kentjuno/ainovel-cli.git
cd ainovel-cli
go build -o ainovel-cli ./cmd/ainovel-cli/
# Run
./ainovel-cli # Linux/macOS
ainovel-cli.exe # Windows
Requirements:
Create config/config.json (Docker) or ~/.ainovel/config.json (source build).
# Install Ollama: https://ollama.com
# Pull model (12B+ recommended)
ollama pull gemma4:12b
config.json:
{
"provider": "ollama",
"model": "gemma4:12b",
"providers": {
"ollama": {
"base_url": "http://host.docker.internal:11434/v1",
"models": ["gemma4:12b", "qwen3.5:27b"]
}
}
}
On Linux Docker, use
172.17.0.1instead ofhost.docker.internal
{
"provider": "openrouter",
"model": "google/gemini-2.5-flash",
"providers": {
"openrouter": {
"api_key": "${OPENROUTER_API_KEY}",
"base_url": "https://openrouter.ai/api/v1",
"models": [
"google/gemini-2.5-flash",
"google/gemini-2.5-pro",
"anthropic/claude-sonnet-4"
]
}
}
}
{
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"providers": {
"anthropic": {
"api_key": "${ANTHROPIC_API_KEY}",
"models": ["claude-sonnet-4-6", "claude-opus-4"]
}
}
}
Assign different models to each agent role:
{
"provider": "openrouter",
"model": "google/gemini-2.5-flash",
"providers": {
"openrouter": {
"api_key": "${OPENROUTER_API_KEY}",
"base_url": "https://openrouter.ai/api/v1"
},
"anthropic": {
"api_key": "${ANTHROPIC_API_KEY}"
}
},
"roles": {
"coordinator": {
"provider": "openrouter",
"model": "google/gemini-2.5-flash"
},
"architect": {
"provider": "anthropic",
"model": "claude-sonnet-4-6"
},
"writer": {
"provider": "openrouter",
"model": "google/gemini-2.5-flash"
},
"editor": {
"provider": "openrouter",
"model": "google/gemini-2.5-flash"
}
}
}
Launch TUI and enter your prompt in the input field:
Short prompt (system expands automatically):
Cung đấu gia tộc, nhân vật chính xuất thân thấp kém nhưng tài năng ẩn giấu
Detailed prompt (more control):
Tiểu thuyết fantasy cổ đại Việt Nam, nhân vật chính là cô gái nghèo bị bán vào phủ làm tỳ nữ.
Thể loại: cung đấu + ngôn tình. Khoảng 80 chương. Nhân vật nam chính: vương gia lạnh lùng nhưng
thực ra bảo vệ nàng từ bóng tối. Kết thúc có hậu. Viết theo phong cách truyện ngôn tình Việt.
Type / in the input field to see command list:
| Command | Description |
|---|---|
/help | Show command list and keyboard shortcuts |
/model [role] | Switch model (opens selector). Example: /model writer |
/diag | Diagnostic report: detect loops, missing chapters, stuck foreshadowing |
/export | Export novel to TXT (default location) |
/export ~/novel.epub | Export to EPUB format |
/import <path> | Import external novel into workspace |
/pause | Pause writing (finishes current step first) |
/resume | Resume after pause |
/quit | Exit (safe, saves checkpoint) |
Run without TUI (server/automation):
docker run --rm \
-v "$PWD/config:/root/.ainovel" \
-v "$PWD/workspace:/workspace" \
ainovel-cli-vi \
--headless \
--prompt "Viết tiểu thuyết cung đấu, nhân vật chính là cô lao công xuất thân thấp kém"
With custom output:
docker run --rm \
-v "$PWD/config:/root/.ainovel" \
-v "$PWD/workspace:/workspace" \
ainovel-cli-vi \
--headless \
--output /workspace/my-novel \
--prompt "Xuyên không vào game MMORPG, nhân vật chính là NPC buôn bán"
Inject feedback while writing is ongoing:
Example intervention:
Chương vừa rồi quá nhanh. Hãy bổ sung thêm mô tả tâm lý nhân vật khi họ đối mặt với quyết định khó khăn.
The system will:
When to intervene:
Create workspace/<novel-name>/custom_rules.md:
# Quy tắc tuỳ chỉnh
## Phong cách văn
- Dùng ngôn ngữ cổ điển, tránh từ hiện đại
- Đối thoại ngắn gọn, sắc bén
- Mô tả cảnh quan tỉ mỉ nhưng không rườm rà
## Nhân vật
- Nữ chính: kiên cường, thông minh, nhưng dễ tổn thương
- Nam chính: lạnh lùng bề ngoài, nội tâm sâu sắc
- Tránh nhân vật phụ trở thành "công cụ phục vụ cốt truyện"
## Cốt truyện
- Mỗi chương phải có ít nhất 1 xung đột nhỏ
- Tránh giải quyết mâu thuẫn quá dễ dàng
- Phục bút phải tự nhiên, không ép buộc
## Cấm
- KHÔNG dùng "đột nhiên", "bỗng chốc"
- KHÔNG để nhân vật giải thích cảm xúc thẳng thừng ("tôi cảm thấy buồn")
- KHÔNG kết thúc chương bằng cliffhanger giả tạo
The system reads this file automatically and enforces rules during writing.
Built-in detection (automatically applied):
Mechanical checks:
Semantic checks:
Override checks:
# In custom_rules.md
## Ngoại lệ
- Cho phép "đột nhiên" trong cảnh hành động nhanh
- Cho phép giải thích cảm xúc khi nhân vật tự vấn
System auto-saves after every successful tool call. Recovery is automatic on restart.
Manual recovery:
# Resume from last checkpoint (default behavior)
./ainovel-cli
# Resume specific novel
./ainovel-cli --resume /workspace/my-novel
Checkpoint structure:
workspace/
└── my-novel/
├── checkpoint.json # Last successful step
├── progress.json # Overall progress tracker
├── outline/ # Architect output
│ ├── world.json
│ ├── characters.json
│ └── arc_001.json
├── drafts/ # Writer output
│ ├── chapter_001_v1.md
│ └── chapter_001_v2.md # After rewrite
└── final/ # Published chapters
└── chapter_001.md
Recovery scenarios:
workspace/
└── <novel-name>/
├── config.json # Novel-specific config
├── progress.json # Current writing state
├── checkpoint.json # Recovery point
├── custom_rules.md # User-defined rules (optional)
├── outline/
│ ├── world.json # World-building
│ ├── characters.json # Character profiles
│ ├── volume_001.json # Volume outline
│ ├── arc_001_001.json # Arc outline (volume 1, arc 1)
│ └── ...
├── drafts/
│ ├── chapter_001_v1.md # First draft
│ ├── chapter_001_v2.md # After editor feedback
│ └── ...
├── final/
│ ├── chapter_001.md # Published version
│ ├── chapter_002.md
│ └── ...
└── exports/
├── novel.txt # Plain text export
└── novel.epub # EPUB export
# Via TUI command
/export
# Default output: workspace/<novel-name>/exports/novel.txt
Custom location:
/export ~/Documents/my-novel.txt
/export ~/Documents/my-novel.epub
EPUB metadata:
The system reads from workspace/<novel-name>/metadata.json:
{
"title": "Cung Đấu Kiến Trúc",
"author": "AI Multi-Agent System",
"language": "vi",
"description": "Một câu chuyện về...",
"cover": "cover.jpg"
}
If missing, defaults are used (title from folder name, author "ainovel-cli").
# In custom_rules.md
## Quy tắc phát triển nhân vật
### Giai đoạn 1 (chương 1-20): Khởi đầu
- Nữ chính: ngây thơ, dễ bị lợi dụng
- Mỗi 5 chương: 1 sự kiện tổn thương nhỏ (dần cứng rắn)
### Giai đoạn 2 (chương 21-50): Trưởng thành
- Nữ chính bắt đầu chủ động
- Quan hệ với nam chính: từ sợ → tò mò → tin tưởng
### Giai đoạn 3 (chương 51-80): Đỉnh cao
- Nữ chính nắm quyền lực
- Đối đầu với phản diện chính
## Công cụ phát triển
- Sử dụng flashback tiết kiệm (tối đa 1 lần/10 chương)
- Mỗi arc phải có 1 "điểm không thể quay lại"
// In workspace/<novel-name>/config.json
{
"quality_gates": {
"min_words_per_chapter": 3000,
"max_words_per_chapter": 6000,
"editor_threshold": 7,
"max_rewrites_per_chapter": 2,
"auto_pause_on_low_score": true
}
}
When editor score < 7, system pauses and waits for intervention.
# In custom_rules.md
## POV
- Chương chẵn: POV nữ chính
- Chương lẻ: POV nam chính
- Chương kết arc: POV phản diện (1 lần duy nhất)
## Quy tắc POV
- Không chuyển POV giữa chương
- Dùng ngôi thứ 3 nhìn sát vai
- Mỗi POV có giọng văn riêng (nữ chính: mềm mại; nam chính: ngắn gọn)
System automatically tracks foreshadowing elements:
// Auto-generated in workspace/<novel-name>/foreshadowing.json
{
"items": [
{
"id": "fh_001",
"setup_chapter": 3,
"content": "Chiếc bình ngọc trong kho báu",
"expected_payoff_arc": 2,
"status": "pending"
},
{
"id": "fh_002",
"setup_chapter": 7,
"content": "Lời tiên tri về người cứu thế",
"payoff_chapter": 45,
"status": "resolved"
}
]
}
Use /diag to check unresolved foreshadowing.
Symptoms:
Solution:
# Check Ollama is running
curl http://localhost:11434/api/tags
# Docker: verify network access
docker run --rm curlimages/curl:latest \
curl http://host.docker.internal:11434/api/tags
# Linux: use host IP instead
docker run --rm curlimages/curl:latest \
curl http://172.17.0.1:11434/api/tags
Update config.json with correct base_url.
Symptoms:
Solution:
# Run diagnostics
/diag
# Check output for:
# - "Loop detected: architect called 5 times for same arc"
# - "Writer stuck on chapter X for 3 iterations"
Fix:
/pauseworkspace/<novel-name>/progress.json:
{
"current_step": "writing",
"current_chapter": 15,
"stuck_counter": 0 // Reset this
}
/resumeOr inject intervention: "Bỏ qua chương hiện tại, tiếp tục chương kế tiếp"
Symptoms:
Solution:
workspace/<novel-name>/outline/characters.json{
"name": "Lý Thanh Vân",
"personality": [
"kiên cường",
"thông minh",
"dễ tổn thương khi đối mặt với gia đình"
],
"values": [
"trung thành với người đáng tin",
"ghét sự lừa dối",
"không bao giờ từ bỏ"
],
"growth_arc": "từ ngây thơ → thực dụng → bi quan → cân bằng"
}
Nhân vật Thanh Vân không được phản ứng như vậy. Cô ấy ghét lừa dối nhất,
nên phải đối mặt trực tiếp thay vì lẩn tránh. Viết lại cảnh này.
Symptoms:
/export novel.epub shows errorSolution:
workspace/<novel-name>/final/ has chaptersmetadata.json:
{
"title": "Tên Tiểu Thuyết",
"author": "Tên Tác Giả",
"language": "vi",
"description": "Mô tả ngắn gọn"
}
Symptoms:
workspace/ or config/Solution:
# Add user to docker group
sudo usermod -aG docker $USER
# Or run with correct permissions
docker run --rm -it \
-v "$PWD/config:/root/.ainovel" \
-v "$PWD/workspace:/workspace" \
--user $(id -u):$(id -g) \
ainovel-cli-vi
Symptoms:
Solution:
{
"roles": {
"coordinator": {
"provider": "anthropic",
"model": "claude-sonnet-4-6"
}
}
}
Symptoms:
Solution:
grep "tokens_used" workspace/<novel-name>/logs/*.log
{
"roles": {
"writer": {
"provider": "openrouter",
"model": "google/gemini-2.5-flash" // Cheaper than Claude
}
}
}
{
"roles": {
"writer": { "provider": "ollama", "model": "qwen3.5:27b" },
"editor": { "provider": "anthropic", "model": "claude-sonnet-4-6" }
}
}
package main
import (
"github.com/kentjuno/ainovel-cli/pkg/core"
"github.com/kentjuno/ainovel-cli/pkg/config"
)
func main() {
cfg := config.Load("config.json")
novel := core.NewNovel(cfg)
novel.SetPrompt("Viết truyện xuyên không về lập trình viên")
// Start autonomous writing
novel.Start()
// Inject intervention during writing
novel.Intervene("Thêm chi tiết về công nghệ AI trong thế giới game")
// Export when done
novel.Export("novel.epub")
}
# Process multiple prompts
cat prompts.txt | while read prompt; do
docker run --rm \
-v "$PWD/config:/root/.ainovel" \
-v "$PWD/workspace:/workspace" \
ainovel-cli-vi \
--headless \
--prompt "$prompt" \
--output "/workspace/batch_$(date +%s)"
done
Extend the Writer agent with custom logic:
// In pkg/agents/writer/custom.go
package writer
func (w *Writer) CustomPreProcess(chapter *Chapter) error {
// Add custom validation before writing
if chapter.Number%10 == 0 {
// Every 10th chapter gets special treatment
chapter.Style = "climax"
}
return nil
}
Build with custom code:
go build -tags custom -o ainovel-cli-custom ./cmd/ainovel-cli/
This skill covers the core usage patterns for ainovel-cli Vietnamese edition. The system is designed for autonomous operation, so the primary skill is knowing when and how to intervene, not constant manual control.
Orchestrate psychology clinic workflows with AI-powered scheduling, WhatsApp automation, AFIP billing, and video consultations for Argentine practitioners
SaaS platform for psychology clinics with intelligent scheduling, WhatsApp automation, AFIP billing, videollamadas, and Claude AI integration
Build and customize the Sesión mental health practice management platform with appointment scheduling, WhatsApp automation, AFIP billing, and Claude AI integration
Orchestrate psychology clinic operations with AI-powered scheduling, WhatsApp automation, AFIP billing, and secure video consultations for Argentine mental health practitioners
Connect AI agents to a running Tabbit browser instance via Chrome DevTools Protocol (CDP) and control it through agent-browser
AI-powered mental health practice management platform for Argentina with WhatsApp automation, AFIP-compliant invoicing, and video consultations