Aleph
CLI Reference

Commands

Complete CLI command reference for Aleph

Aleph provides two CLI binaries with distinct roles:

  • aleph — The client CLI that connects to a running Gateway server over WebSocket
  • aleph-server — The server binary that starts and manages the Gateway process

Both share similar conventions for flags and output formatting.

Client CLI (aleph)

The aleph binary is a reference implementation of an Aleph Protocol client. It communicates with the Gateway over WebSocket using JSON-RPC 2.0.

Synopsis

aleph [OPTIONS] [COMMAND]

When invoked without a subcommand, aleph starts an interactive chat session (equivalent to aleph chat).

Global Options

FlagShortDefaultDescription
--server <URL>-sws://127.0.0.1:18790Gateway server WebSocket URL
--verbose-vfalseEnable debug-level logging
--config <PATH>-c~/.config/aleph-cli/config.tomlConfiguration file path

Subcommands

CommandDescription
chatStart an interactive chat session
askSend a single message and print the response
healthCheck server health status
infoDisplay server version, uptime, and providers
toolsList available tools on the server
sessionManage conversation sessions (list, new, delete)
connectAuthenticate and save a bearer token
guestsManage guest invitations and permissions

Examples

# Interactive chat (default action)
aleph

# Send a one-shot question
aleph ask "What is the weather in Tokyo?"

# Connect to a remote server
aleph -s ws://192.168.1.50:18790 chat

# Use a custom config file
aleph -c ~/my-config.toml health

Server CLI (aleph-server)

The aleph-server binary runs the Aleph Gateway and provides management subcommands for configuration, devices, plugins, and more.

Synopsis

aleph-server [OPTIONS] [COMMAND]

When invoked without a subcommand (or with start), the server starts the Gateway listener.

Global Options

FlagShortDefaultDescription
--config <PATH>-cConfiguration file path (TOML)
--daemon-dfalseRun as a background daemon process
--pid-file <PATH>~/.aleph/gateway.pidPID file location (daemon mode)
--log-file <PATH>Log file path (daemon mode)
--bind <ADDR>127.0.0.1Bind address
--port <PORT>18790WebSocket listen port
--forcefalseForce start even if port appears in use
--log-level <LEVEL>infoLog level (error, warn, info, debug, trace)
--max-connections <N>1000Maximum concurrent WebSocket connections
--webchat-dir <PATH>Serve a WebChat UI from this static file directory
--webchat-port <PORT>same as --portHTTP port for the WebChat UI

Subcommands

CommandDescription
startStart the Gateway (default)
stopStop a running daemon
statusCheck whether the daemon is running
configGet, set, validate, reload, or export configuration
pairingManage device pairing requests
devicesList or revoke approved devices
pluginsInstall, uninstall, enable, or disable plugins
gatewayCall arbitrary RPC methods on the Gateway
channelsList channels and check channel status
cronList, inspect, or trigger cron jobs
auditView tool risk scores and execution history
secretManage encrypted secrets in the vault

Examples

# Start in foreground (default)
aleph-server

# Start as daemon with custom port
aleph-server -d --port 9000 --log-file ~/.aleph/server.log

# Check daemon status
aleph-server status

# Stop the daemon
aleph-server stop

Environment Variables

The following environment variables affect CLI behavior:

VariableDescription
ANTHROPIC_API_KEYAPI key for the Anthropic provider (required for agent operation)
ANTHROPIC_BASE_URLCustom base URL for the Anthropic API
ALEPH_MASTER_KEYMaster key for the encrypted secret vault
ALEPH_VERBOSEWhen set, aleph ask prints reasoning traces to stderr
RUST_LOGOverride log level filter (e.g. info, debug, aleph=trace)
TOKIO_WORKER_THREADSNumber of async runtime worker threads

Configuration Files

FilePurpose
~/.config/aleph-cli/config.tomlClient CLI configuration (server URL, auth token, device ID)
~/.aleph/config.tomlServer configuration (agent, gateway, control plane settings)
~/.aleph/gateway.pidDaemon PID file
~/.aleph/gateway.logDaemon log file (when --log-file is used)

Exit Codes

CodeMeaning
0Success
1General error (connection failed, RPC error, invalid arguments)
2Configuration or authentication error

Next Steps

On this page