Skip to content

CLI Commands

Gateway Commands

CommandDescription
imtoagent startStart gateway in background (terminal returns immediately)
imtoagent stopStop gateway (SIGTERM → wait → SIGKILL fallback)
imtoagent statusCheck running status (process + config + log size)
imtoagent restoreHot reload recovery (send SIGHUP)
imtoagent setupInteractive configuration wizard
imtoagent daemonForeground daemon (auto-restart on crash)

Running Modes

ModeBehavior
startBackground, terminal returns, execSync + 3s verify
runForeground, real-time logs via Bun.spawn, Ctrl+C to stop
daemonForeground with auto-restart on crash, normal exit doesn’t restart

Bot Commands (in IM chat)

Send these to your bot in the IM:

CommandDescription
/helpShow available commands
/statusGateway status
/infoBot information
/statsUsage statistics
/modelSwitch AI model
/providersView model providers
/clearClear conversation session
/modeSwitch mode (permission/auto/plan)
/dirSwitch working directory
/memoryMemory status
/soulSoul management
/reloadReload configuration

Unknown commands are matched with fuzzy matching (Levenshtein ≤ 2).