Skip to content

CLI Commands

Complete reference for all Moxxy CLI commands.

Overview

bash
moxxy <command> [options]

Global Options

OptionDescription
-h, --helpShow help information
--versionShow version information

Commands Reference

CommandDescription
initFirst-time setup wizard
webStart the web dashboard
tuiStart the terminal UI
gatewayManage the background daemon
logsFollow real-time daemon logs
runExecute a single prompt
channelManage channel connections
agentManage agents
doctorSystem diagnostics
devDevelopment mode

init

Run the first-time setup wizard to configure LLM providers and create your default agent.

bash
moxxy init

What It Does

  1. Creates the ~/.moxxy/ directory structure
  2. Prompts for LLM provider selection (OpenAI, Google, Z.Ai)
  3. Securely stores your API key in the vault
  4. Creates a default agent with standard configuration

Example

bash
$ moxxy init

 Welcome to moxxy!

  ? Select your LLM provider:
 OpenAI
      Google Gemini
      Z.Ai (Grok)

  ? Enter your OpenAI API key: sk-***

 Created default agent at ~/.moxxy/agents/default
 Configuration saved

  Run 'moxxy gateway start' to begin!

web

Start the web dashboard for interacting with your agents through a browser interface.

bash
moxxy web [options]

Prerequisites

The gateway must be running:

bash
moxxy gateway start

Options

OptionDefaultDescription
--port3001Port for the web server
--api-host127.0.0.1API server host
--api-port17890API server port

Example

bash
moxxy web --port 8080

The dashboard will be available at http://127.0.0.1:8080.

Features

  • Chat Panel - Conversational interface with streaming responses
  • Skills Manager - View, install, and manage agent skills
  • Memory Viewer - Inspect short-term and long-term memory
  • Channel Config - Set up Telegram, Discord, Slack, WhatsApp
  • Vault Manager - Securely store and manage secrets
  • Schedule Manager - Create and manage scheduled jobs

tui

Start the interactive terminal user interface for chatting with agents.

bash
moxxy tui [options]

Prerequisites

The gateway must be running:

bash
moxxy gateway start

Options

OptionDefaultDescription
--api-urlhttp://127.0.0.1:17890API endpoint URL

Keyboard Shortcuts

KeyAction
EnterSend message
Ctrl+CExit
Ctrl+LClear screen

Slash Commands

CommandDescription
/helpShow available commands
/clearClear chat history
/agent <name>Switch to a different agent
/newStart a new session
/quitExit the TUI

Example

bash
$ moxxy tui

  ┌─────────────────────────────────────────────────┐
 moxxy TUI Agent: default
  ├─────────────────────────────────────────────────┤

 You: Hello! What can you do?

 Agent: I can help you with various tasks using
 my skills. I can execute shell commands, run
 Python scripts, fetch web content, and more!

  ├─────────────────────────────────────────────────┤
 > _
  └─────────────────────────────────────────────────┘

gateway

Manage the background daemon process that runs agents.

bash
moxxy gateway <subcommand> [options]

Subcommands

SubcommandDescription
startStart the gateway daemon
stopStop the gateway daemon
restartRestart the gateway daemon
statusCheck gateway status

start

bash
moxxy gateway start

Starts the background daemon that:

  • Loads all agents
  • Initializes the API server
  • Connects configured channels
  • Begins scheduled job execution

stop

bash
moxxy gateway stop

Gracefully shuts down the daemon.

restart

bash
moxxy gateway restart

Performs a stop followed by a start. Useful for reloading configuration.

status

bash
moxxy gateway status

Shows:

  • Whether the daemon is running
  • Process ID
  • Uptime
  • Connected channels

Example Output

bash
$ moxxy gateway status

 Gateway Status: Running

  ├─ PID:        12345
  ├─ Uptime:     2h 34m 12s
  ├─ API:        http://127.0.0.1:17890
  ├─ Agents:     3 active

  └─ Channels:
     ├─ Telegram: @my_bot (connected)
     └─ Discord:  MyServer (connected)

logs

Follow real-time logs from the gateway daemon.

bash
moxxy logs

Output

Shows:

  • Agent activations
  • Skill invocations
  • LLM requests/responses
  • Channel events
  • Errors and warnings

Example

bash
$ moxxy logs

  2024-01-15 10:23:45 INFO  gateway started on :17890
  2024-01-15 10:23:46 INFO  agent 'default' booted
  2024-01-15 10:24:01 INFO  [default] brain activated by TELEGRAM
  2024-01-15 10:24:01 INFO  [default] invoking skill: host_shell
  2024-01-15 10:24:02 INFO  [default] skill completed in 0.8s

Press Ctrl+C to stop following logs.


run

Execute a single prompt programmatically without starting an interactive session.

bash
moxxy run --agent <name> --prompt "<prompt>"

Options

OptionRequiredDescription
--agent, -aNo (default: "default")Agent to use
--prompt, -pYesThe prompt to send

Example

bash
moxxy run --agent default --prompt "What files are in my home directory?"

Use Cases

  • Scripted automation
  • CI/CD pipelines
  • Quick one-off queries
  • Testing agent responses

Output Format

The response is printed to stdout, making it easy to capture:

bash
result=$(moxxy run --agent researcher --prompt "Summarize the latest news about AI")
echo "$result"

channel

Manage channel connections for messaging platforms.

bash
moxxy channel <type> [options]

Available Channels

TypeDescription
telegramConfigure Telegram bot
discordConfigure Discord bot
slackConfigure Slack bot
whatsappConfigure WhatsApp bridge

Telegram

bash
moxxy channel telegram --agent <name> [--token <bot_token>] [--pair-code <code>]
OptionDescription
--agent, -aAgent to connect (default: "default")
--tokenTelegram bot token (will prompt if omitted)
--pair-code, -cPairing code from /start command

See Telegram Channel for detailed setup.

Example

bash
$ moxxy channel telegram --agent default

 Setting up Telegram channel...

  ? Enter your bot token (from @BotFather): 123456:ABC***

 Bot configured!

  Now send /start to your bot on Telegram.
  Then enter the 6-digit pairing code you receive.

  ? Pairing code: 123456

 Telegram channel connected!

agent

Manage individual agents.

bash
moxxy agent <subcommand> <name> [options]

Subcommands

SubcommandDescription
restartRestart an agent
removeRemove an agent
listList all agents

restart

bash
moxxy agent restart <name>

Reloads the agent's configuration and persona.

remove

bash
moxxy agent remove <name>

Deletes the agent's workspace including:

  • Persona file
  • Memory database
  • Vault
  • Custom skills

WARNING

This action is irreversible. The agent's data will be permanently deleted.

list

bash
moxxy agent list

Shows all configured agents and their status.


doctor

Run system diagnostics to verify your Moxxy installation.

bash
moxxy doctor [--fix]

Checks

CheckDescription
SQLiteVerifies SQLite3 is installed and accessible
DirectoryChecks ~/.moxxy/ directory permissions
GatewayVerifies gateway process is running
LLM ConfigValidates LLM provider configuration
ChannelsChecks channel connection status

Options

OptionDescription
--fixAttempt to automatically fix issues

Example

bash
$ moxxy doctor

 SQLite3: installed (3.42.0)
 Directory: ~/.moxxy/ writable
 Gateway: running (PID 12345)
 LLM Config: OpenAI configured
 Memory: default agent database healthy

  All checks passed!

dev

Start the daemon in development mode with elevated permissions.

bash
moxxy dev

Dev Mode Features

  • Enables the evolve_core skill for self-modification
  • Allows agents to modify framework code
  • Disables certain safety restrictions
  • Enables detailed debug logging

WARNING

Dev mode is intended for development and experimentation. Use with caution in production environments.

Use Cases

  • Developing new skills
  • Testing framework modifications
  • Debugging agent behavior
  • Research and experimentation

Environment Variables

Moxxy respects these environment variables:

VariableDescription
MOXXY_API_BASEOverride API base URL
MOXXY_INTERNAL_TOKENInternal authentication token
MOXXY_SOURCE_DIROverride source directory for dev mode
MOXXY_ARGS_MODEArgument parsing mode

Exit Codes

CodeMeaning
0Success
1General error
2Configuration error
3Network error
4Authentication error

Open source · Self-hosted · Data sovereign