Witty CLI Introduction
Product Overview
Witty CLI (command witty) is the AI assistant command-line entry point for openEuler terminal scenarios, providing natural language operations interaction for the openEuler ecosystem. It ships as a single binary with two interaction entries, Shell direct input and REPL, streams AI answers in real time over SSE, and uses opencode serve as its execution base to provide session, rendering, permission, and display capabilities.
With deep integration of LLM capabilities, Witty CLI turns natural language instructions into operations actions, helping users complete system queries, log analysis, fault diagnosis, and solution planning quickly. It lowers the entry barrier for new openEuler users, simplifies operations workflows, and reduces overall operations cost.
Supported Platforms
- Operating System: openEuler 24.03 LTS SP3 or later (x86_64 / aarch64)
- Runtime Dependency: the
opencodeCLI, installed as a weak dependency ofwitty - Terminal: Bash ≥ 4.0, required for Shell direct input
Working Modes
Witty CLI provides two modes that share the same session, rendering, permission, and display core. Only the entry differs:
| Entry | User Action | Implementation |
|---|---|---|
| Shell direct input | Type natural language at the regular Bash prompt | Shell Adapter calls witty ask |
| REPL | Run witty | Starts the interactive REPL over the same core |
Output style, session continuity, and control commands are identical in both modes.
Features
- Shell direct input: type natural language at the Bash prompt to invoke the AI assistant
- REPL: run
wittyto enter the interactive CLI, promptwitty [<agent>:<model>] > - Automatic service management: manages the
opencode servelifecycle, including automatic startup, health checks, idle timeout shutdown, and multi-user isolation - Provider management:
witty provider list/witty provider connectto connect model services and switch models - Environment diagnostics:
witty doctorchecks the configuration, server, Shell integration, and terminal environment in one pass - Single-shot query:
witty ask <prompt>streams the answer and exits; pipe input is supported - Session management: restores the session of the current directory automatically; supports
/session list,/session continue <id>, and/new
Architecture Overview
The Witty architecture spans five layers from top to bottom: user access, operations agents, operations foundation, intelligent platform, and infrastructure. It covers both general computing (traditional clusters and standalone machines) and intelligent computing (super nodes):
| Layer | Description |
|---|---|
| User access | Intelligent interaction entries (natural language interaction / agent scheduling / intelligent Shell) and customer operations systems; Witty CLI sits in this layer |
| Operations agents | Intelligent O&M, intelligent tuning, intelligent Q&A, and third-party agents, providing fused collection, topology awareness, root cause analysis, and log anomaly detection |
| Operations foundation | Operations LLM / OS domain LLM, operations meta-capabilities, operations knowledge services, and operations intelligent services |
| Intelligent platform | Vector databases (openGauss and others), agent development platform and runtime (xiaoO / OpenCode and others), and heterogeneous converged OS |
| Infrastructure | K + A / K + X computing bases |
All backend interaction of Witty CLI is built on opencode serve: session operations use the HTTP API, streaming events use SSE, permission and question replies use the API, and agent / MCP / session metadata also comes from OpenCode.
RAG and log detection capabilities are provided as Skills, see Using the Witty CLI Agent. No standalone MCP Server is required.

