CLI Reference#
The bot entrypoint is telegram-acp-bot.
Arguments#
--telegram-tokenDefault: TELEGRAM_BOT_TOKEN. Required if TELEGRAM_BOT_TOKEN is not set.--agent-commandDefault: ACP_AGENT_COMMAND. Required if ACP_AGENT_COMMAND is not set.--restart-commandDefault: ACP_RESTART_COMMAND. Optional command used by/restartto relaunch the process.--allowed-user-idRepeatable allowlist of Telegram user IDs. At least one allowlist entry is required across IDs/usernames.--allowed-usernameRepeatable allowlist of Telegram usernames.@prefix is optional; values are normalized to lowercase. At least one allowlist entry is required across IDs/usernames.--workspaceDefault workspace used by/newwhen no workspace path is provided.--permission-modeDefault: ACP_PERMISSION_MODE. Allowed values:ask,approve,deny.--permission-event-outputDefault: ACP_PERMISSION_EVENT_OUTPUT. Allowed values:stdout,off.--acp-stdio-limitDefault: ACP_STDIO_LIMIT. Asyncio stdio reader limit in bytes.--acp-connect-timeoutDefault: ACP_CONNECT_TIMEOUT. Timeout in seconds for ACPinitialize+new_sessionhandshake.-m,--activity-modeDefault: ACP_ACTIVITY_MODE. Allowed values:normal,compact,verbose. Innormal, the bot sends activity/tool updates as separate messages without streaming edits. Incompact, the bot keeps a single in-progress reply message per prompt, updates that message in place, and keeps the normal activity emoji in the message text while work is in progress. Inverbose, the bot streams append-only updates in place for active reply text and tool activity, then finalizes the same message when possible.-V,--versionPrint CLI version and exit.
Notes#
/restartbehavior:If ACP_RESTART_COMMAND (or
--restart-command) is set, that command is executed.Otherwise, the bot re-execs itself using
sys.executable + sys.argv.It requires an active session and reports session context (
session_id,workspace) in the response./restart N [workspace]selects and loads a resumable session in-process (no process relaunch) and replies with a resume acknowledgment instead of a relaunch message.
Access control behavior:
Configure at least one allowlist entry via
--allowed-user-id,--allowed-username, TELEGRAM_ALLOWED_USER_IDS, or TELEGRAM_ALLOWED_USERNAMES.
MCP behavior:
telegram-acp-botalways advertises an internal MCP stdio server (telegram-channel) to the ACP agent.
register-commands#
Register (or delete) the bot’s slash commands in Telegram via setMyCommands.
telegram-acp-bot register-commands --telegram-token <TOKEN> [options]
Options#
--telegram-tokenDefault: TELEGRAM_BOT_TOKEN. Required if TELEGRAM_BOT_TOKEN is not set.--scopeBotCommandScope to target. Allowed values:default,all_private_chats,all_group_chats,all_chat_administrators. Default:default(global scope for all users).--language-codeIETF language code for language-specific registration (e.g.en,es). Omit to register for all languages.--dry-runPrint the commands that would be registered without calling the Telegram API.--deleteDelete registered commands for the given scope/language instead of setting them (deleteMyCommands). Useful for cleanup flows.
Examples#
Register commands for all users (default scope):
telegram-acp-bot register-commands --telegram-token "$TELEGRAM_BOT_TOKEN"
Preview what would be registered without calling the API:
telegram-acp-bot register-commands --telegram-token "$TELEGRAM_BOT_TOKEN" --dry-run
Register commands only for private chats in English:
telegram-acp-bot register-commands \
--telegram-token "$TELEGRAM_BOT_TOKEN" \
--scope all_private_chats \
--language-code en
Delete all registered commands for the default scope:
telegram-acp-bot register-commands --telegram-token "$TELEGRAM_BOT_TOKEN" --delete
Notes#
Command definitions are sourced from the codebase constant
telegram_acp_bot.telegram.bot.BOT_COMMANDS. Runningregister-commandsis idempotent — it is safe to call multiple times.Exit code
0on success;1on Telegram API error.