Skip to content

CLI Reference

The LingXiao CLI (lingxiao) is the primary entry point, built on Commander.js. It launches the TUI interface and WebUI service, and provides session management, environment diagnostics, background daemons, Git Worktree management, and custom Agent definitions.

lingxiao # Default: start TUI + WebUI (equivalent to lingxiao start)
lingxiao start # Start a session
lingxiao list # List all sessions
lingxiao init # First-run configuration wizard
lingxiao doctor # Environment diagnostics
lingxiao about # Show about info
lingxiao demo <id> # Start a specific session in demo mode
lingxiao agents ... # Manage custom Agent definitions
lingxiao daemon ... # Manage background daemon services
lingxiao worktree ... # Manage Git Worktrees

Start a LingXiao session with TUI and WebUI by default.

Terminal window
lingxiao start [options]
OptionDescription
--bgRun in background (no TUI, services only)
--name <name>Specify session name
--output-format <format>Output format (text | stream-json), default text
--daemon-modeUsed internally by DaemonManager, not for direct use
--worktree [name]Run in an isolated Git Worktree
--worktree-branch <branch>Specify the branch name for the Worktree
--tmuxUse tmux pane splitting (experimental)
-s, --session <id>Resume a specific session ID
Terminal window
# Default start
lingxiao
# Background mode, WebUI only
lingxiao start --bg --name my-project
# Run in isolated Worktree
lingxiao start --worktree feature-x
# Resume existing session
lingxiao start --session abc123

List all saved sessions.

Terminal window
lingxiao list

Output includes session ID, creation time, message count, and status.

First-run configuration wizard guiding you through model connection, permissions, and initialization.

Terminal window
lingxiao init [options]
OptionDescription
--checkRun built-in environment check only, no interactive config
Terminal window
# Full interactive config
lingxiao init
# Environment check only
lingxiao init --check

Run runtime environment diagnostics, checking Node.js version, Git, dependencies, ports, etc.

Terminal window
lingxiao doctor [options]
OptionDescription
--jsonOutput JSON format report

Exit code 0 means environment is ready, 1 means issues found.

Display LingXiao version, vision, and tech stack info.

Terminal window
lingxiao about

Manage custom Agent definitions with create, show, update, and delete operations.

List custom Agent definitions.

OptionDescription
--allShow definitions shadowed by project/global overrides
--jsonOutput JSON

Show details of a specific Agent.

Terminal window
lingxiao agents show <name> [options]
OptionDescription
--globalView global definition
--projectView project-level definition
--jsonOutput JSON

Create a custom Agent.

Terminal window
lingxiao agents create <name> [options]
OptionDescription
--description <text>Agent description
--prompt <text>Agent system prompt
--prompt-file <path>Read system prompt from file
--base-role <name>Inherited built-in role baseline
--model <model>Default model for this Agent
--backend <backend>Worker backend: worker_process | claude | codex
--tool <name>Allowed tools, repeatable or comma-separated
--skill <name>Default skills, repeatable or comma-separated
--globalWrite to global ~/.lingxiao/agents
--projectWrite to project .lingxiao/agents
--jsonOutput JSON

Update an existing custom Agent definition. Same options as create.

Delete a custom Agent definition.

OptionDescription
--globalDelete global definition
--projectDelete project-level definition
-y, --yesSkip confirmation

Manage LingXiao background daemon services.

OptionDescription
-p, --port <port>Port number, default 8080
-H, --host <host>Listen address, default 127.0.0.1
-s, --session <id>Session ID to resume
--supervisorEnable process self-healing (auto-restart on crash)
Terminal window
lingxiao daemon stop
lingxiao daemon restart [-p <port>] [-H <host>]
lingxiao daemon status

daemon supervisor-status / stop-supervisor

Section titled “daemon supervisor-status / stop-supervisor”
Terminal window
lingxiao daemon supervisor-status
lingxiao daemon stop-supervisor
Terminal window
lingxiao daemon ps
lingxiao daemon logs <name> [-f] [-n <lines>]
lingxiao daemon kill <name> [-f]
lingxiao daemon attach <name>

Manage Git Worktrees for isolated task execution.

Terminal window
lingxiao worktree list
lingxiao worktree remove <name> [--keep-branch]
lingxiao worktree prune
~/.lingxiao/settings.json # Global config
~/.lingxiao/port # Web service port record
~/.lingxiao/agents/ # Global custom Agent definitions
.lingxiao/agents/ # Project-level custom Agent definitions
.lingxiao/permissions.*.json # Project-level permission configs
VariableDescription
LINGXIAO_WEB_HOSTWeb service listen address
LINGXIAO_WEB_PORTWeb service port
LINGXIAO_NO_AUTO_STARTSet to 1 to disable auto-start
LINGXIAO_DAEMON_MODEDaemon mode flag
LINGXIAO_SESSION_NAMESession name
LINGXIAO_LOG_PATHLog file path
FORCE_NO_TUISet to 1 to force-disable TUI
  • Node.js >= 24.0.0
  • Git (recommended)
  • OS: Linux / macOS / Windows / WSL