</>MCP Agents Market
Agent

grok-cli

by superagent-ai3.5kTypeScriptUpdated 2026-07-06

An open-source coding agent for the Grok API

Grok CLI is an open-source terminal coding agent that interfaces with xAI's Grok API, providing both interactive and headless modes for development workflows. Built with TypeScript and Bun, it features live X and web search, multi-agent delegation, desktop automation capabilities, and remote control via Telegram. Developers can run it interactively with a modern terminal UI or invoke it headless for CI/CD pipelines, code reviews, and automated testing, with conversation sessions that persist across runs.

Key Features

Interactive terminal UI built with OpenTUI and headless mode with structured JSON output for automation
Real-time X search and web search tools to access current information beyond training data
Built-in sub-agents that delegate tasks in foreground and background for parallel exploration
Computer use sub-agent for macOS desktop automation via accessibility snapshots and stable reference actions
Remote control through Telegram with voice message transcription using Grok Speech-to-Text API
Sandboxed execution using Shuru microVM on Apple Silicon for isolated testing and verification
Image and video generation tools integrated into chat sessions with local file persistence
Custom sub-agent definitions and Model Context Protocol server extensions

Use Cases

  • 01Running automated code reviews and refactoring tasks in CI/CD pipelines with headless mode
  • 02Testing and verifying applications in isolated sandbox environments with screenshots and video evidence
  • 03Controlling desktop applications and capturing UI snapshots for automation workflows on macOS
  • 04Managing remote development tasks via Telegram while away from the terminal
  • 05Generating project documentation and changelogs on recurring schedules with the daemon
  • 06Exploring codebases with parallel sub-agent delegation for faster analysis

Related Agents

View more

grok-cli — FAQ

What is Grok CLI?+

Grok CLI is an open-source terminal coding agent that connects to xAI's Grok API, offering both interactive chat and headless automation modes. It includes built-in sub-agents for task delegation, desktop automation, and supports remote control through Telegram.

How do I install Grok CLI?+

Run the install script with curl -fsSL https://raw.githubusercontent.com/superagent-ai/grok-cli/main/install.sh | bash, or install globally with Bun using bun add -g grok-dev. The script bundles Bun automatically if not already present.

What API key do I need for Grok CLI?+

You need a Grok API key from x.ai to use this agent. Set it via the GROK_API_KEY environment variable, save it in ~/.grok/user-settings.json, or pass it with the -k flag when running the CLI.

Which terminals work with the interactive mode?+

Modern terminal emulators like WezTerm, Alacritty, Ghostty, and Kitty are recommended for the best OpenTUI experience. Headless mode with --prompt works in any terminal and doesn't require UI support.

Is Grok CLI free to use?+

The Grok CLI software is open-source under the MIT license and free to use. However, you will incur costs based on xAI's API pricing for Grok model usage, which you can review by running grok models.

What platforms support the sandbox and computer use features?+

The Shuru sandbox requires macOS 14 or later on Apple Silicon. The computer use sub-agent for desktop automation also targets macOS and requires Accessibility permissions for your terminal app in System Settings.

How do I install grok-cli?+

Open the source repository on GitHub and follow its README. grok-cli is a agent — MCP Agents Market links you directly to the official repo.

Is grok-cli free?+

grok-cli is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches