grok-cli
An open-source, unofficial terminal coding agent for xAI's Grok API, with real-time X and web search, sub-agents, remote control from Telegram, and a terminal UI built with Bun and OpenTUI.
grok-cli is an open-source terminal coding agent that connects to xAI's Grok API. It is community-built and not affiliated with xAI, and it uses the publicly available Grok API together with real-time X search, web search, the full Grok model lineup, and sub-agents that run by default.
It can be controlled remotely over Telegram once paired, so a session started on a machine can be driven from a phone, and it ships a terminal UI built with Bun and OpenTUI, recommended for use in modern terminal emulators such as WezTerm, Alacritty, Ghostty or Kitty. A headless prompt mode runs one instruction and exits, for scripts, CI and unattended runs, and a batch-API mode uses xAI's Batch API for lower-cost unattended jobs. On macOS, a built-in computer sub-agent can drive desktop automation when Accessibility permission is granted to the terminal app.
It requires a Grok API key from x.ai and is installed with a shell script or through Bun.