Skip to Content

Demo Bot (CLI)

TL;DR

DemoBot is a CLI bot for local testing — no external messaging API needed. Install with pip install cmdop-bot (no extras required). Runs directly in your terminal with rich formatting. Supports all standard commands plus chat mode where plain text goes to the AI agent. Token streaming is enabled by default.

CLI bot for local testing. No external messaging API needed — runs directly in your terminal with rich formatting.

How do I install?

# Install the base package — DemoBot uses rich for terminal output (included by default) pip install cmdop-bot

No channel extras required — DemoBot uses rich for terminal formatting (included by default).

How do I use the DemoBot?

from cmdop_bot.channels.demo import DemoBot # Create a DemoBot pointing at your CMDOP API and target machine bot = DemoBot( cmdop_api_key="cmdop_xxx", # Your CMDOP API key machine="my-server", # Default target machine hostname ) bot.run() # Starts the interactive CLI session in your terminal

What parameters are available?

ParameterTypeRequiredDescription
cmdop_api_keystrYesCMDOP API key
machinestrNoDefault target machine hostname
modelstrNoAI model tier (use Model.balanced() etc.)
serverstrNogRPC server address (e.g. 127.0.0.1:50051)
insecureboolNoDisable TLS (for local dev)
timeoutfloatNoCommand timeout in seconds (default: 120.0)
streamboolNoStream agent tokens in real-time (default: True)

What commands are supported?

CommandDescription
/helpShow available commands
/agent <task>Run AI agent (with streaming)
/shell <cmd>Execute shell command
/exec <cmd>Alias for /shell
/ls [path]List directory
/cat <path>Read file
/machine [name]Show or set target machine
/statusShow current machine and model
/quitExit the bot

How does chat mode work?

Any text that doesn’t start with / is sent directly to the AI agent:

> Check disk usage on this server ⏳ Thinking... Using tool: execute_shell ...

How does streaming work?

When stream=True (default), agent responses stream token-by-token to your terminal. Tool usage events are also shown:

> Analyze the nginx config Using tool: read_file Using tool: execute_shell The nginx configuration shows...

How do I connect to a local agent?

Connect directly to a local agent without cloud relay:

# Point the bot at a local gRPC agent server instead of the cloud bot = DemoBot( cmdop_api_key="cmdop_xxx", server="127.0.0.1:50051", # Local gRPC server address insecure=True, # Disable TLS for local development ) bot.run() # Starts the CLI session connected to the local agent
Last updated on