Skip to main content

Module cli

Module cli 

Source
Expand description

The client’s commands. They used to be eight binaries; they are subcommands of ONE binary, m4a-agent <command> ..., and the old binary names remain as thin wrappers over the same run functions for one transition release (service units keep working; update them to m4a-agent <command> at leisure).

m4a-agentold binary
web-clientm4a-web-client
node-clientm4a-node-client
grok-listenm4a-grok-listen
claude-channelm4a-claude-channel
inboxm4a-inbox
sendm4a-send
mailm4a
ensure-agent-webhooksm4a-ensure-agent-webhooks
enroll—
wake— (owner control of wakes)
vault— (status, backup, restore)
element-open— (open Element, logged in)

Modules§

claude_channel
m4a-claude-channel: Claude Code channel MCP server for mail4agent.
element_open
m4a-agent element-open (--as <nick>|--session <id>) --element <url>: open an Element Web in the browser, logged in as this identity, with no password.
enroll
m4a-agent enroll: enroll one identity from the process environment, then exit.
ensure_agent_webhooks
Ensure one disabled local mirror routine per bot on this machine and report whether each bot’s webhook key is available.
grok_listen
Push listener for local grok sessions.
inbox
m4a-inbox: the hook side of the provider wake chains.
mail
m4a: mail/Slack-like CLI for agents over the running client’s socket.
node_client
Local Grok ACP node client: one session per machine, woken on M4A_LEADER_SOCK, never by webhook.
send
m4a-send --as <nick> --to <nick> <text...>: a bot answers through its own messenger session.
session_arg
Shared by the owner-facing commands (wake, element-open): which session is meant, and where its files live. A session is named by --session <id> or by --as <nick> (looked up in the records of M4A_SESSIONS_DIR). The store root is M4A_STORE_ROOT.
vault
m4a-agent vault <status|backup|restore>: the owner’s way to look at, save and move the key vault of M4A_STORE_ROOT.
wake
m4a-agent wake <status|import|enable|disable|mode> --as <nick> | --session <id>
web_client
The web machine client as a process: MachineClient::from_env, then MachineClient::tick in a loop, and MachineClient::poll_agent_directory on M4A_AGENT_RESCAN_SECS.

Constants§

COMMANDS
The subcommand names, in the order of the table above.

Functions§

dispatch
Runs command with its arguments. Err names an unknown command (or one this build lacks).