Server
CLI Client
Use the xiantong CLI to interact with the server from your terminal
xiantong-cli is a terminal client for a xiantong remote server. It connects over WebSocket and supports session management, real-time message streaming, and server validation.
Install#
Ensure xiantong-cli is included in your xiantong installation or provided by your deployment package, then confirm it is on PATH:
xiantong-cli --help
xiantong-cli ping
Quick Start#
export XIANTONG_SERVER_URL=ws://127.0.0.1:9100
export XIANTONG_SERVER_TOKEN=<your-token>
xiantong-cli ping
xiantong-cli sessions
xiantong-cli send <session-id> "What files changed in the last commit?"
Common Workflows#
Run a one-off task:
xiantong-cli run "Summarize the project structure"
xiantong-cli run --workspace-dir ./my-project --source github "List open PRs"
Validate a server:
xiantong-cli --validate-server --url ws://127.0.0.1:9100 --token <token>
xiantong-cli --validate-server --json | jq '.failed'
Manage sessions:
xiantong-cli session create --name "Code Review" --mode safe
xiantong-cli sessions
xiantong-cli send <id> "Review the changes in src/auth/"
xiantong-cli cancel <id>
xiantong-cli session delete <id>
Pipe input:
cat error.log | xiantong-cli send abc-123 "What's causing these errors?"
git diff HEAD~1 | xiantong-cli send abc-123 "Review this diff"
Use JSON output for scripts:
xiantong-cli --json workspaces | jq -r '.[].id'
xiantong-cli --json sessions | jq length
Raw RPC Access#
xiantong-cli invoke system:homeDir
xiantong-cli invoke sessions:get '"workspace-123"'
xiantong-cli listen session:event
See CLI Reference for all flags and troubleshooting.