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 opencode CLI, installed as a weak dependency of witty
  • 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:

EntryUser ActionImplementation
Shell direct inputType natural language at the regular Bash promptShell Adapter calls witty ask
REPLRun wittyStarts 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 witty to enter the interactive CLI, prompt witty [<agent>:<model>] >
  • Automatic service management: manages the opencode serve lifecycle, including automatic startup, health checks, idle timeout shutdown, and multi-user isolation
  • Provider management: witty provider list / witty provider connect to connect model services and switch models
  • Environment diagnostics: witty doctor checks 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 ​

Witty overall architecture

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):

LayerDescription
User accessIntelligent interaction entries (natural language interaction / agent scheduling / intelligent Shell) and customer operations systems; Witty CLI sits in this layer
Operations agentsIntelligent O&M, intelligent tuning, intelligent Q&A, and third-party agents, providing fused collection, topology awareness, root cause analysis, and log anomaly detection
Operations foundationOperations LLM / OS domain LLM, operations meta-capabilities, operations knowledge services, and operations intelligent services
Intelligent platformVector databases (openGauss and others), agent development platform and runtime (xiaoO / OpenCode and others), and heterogeneous converged OS
InfrastructureK + 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.