Grok CLI is an open-source terminal-based AI coding assistant developed by Superagent AI. It provides an interactive command-line interface designed to orchestrate xAI Grok models and specialized sub-agents directly within local software repositories. In daily developer workflows, Grok CLI executes commands, parses codebases, handles vision and multimodal inputs, and automates multi-step development tasks. Developers interact with the tool through direct terminal prompts, allowing the agent to inspect files, edit code, and invoke sub-agents tailored for specific desktop and environment tasks. Grok CLI differentiates itself by focusing on xAI Grok model support, multimodal vision handling in terminal contexts, and modular sub-agent architectures for desktop and tool automation. Additionally, the project integrates Sigstore build-provenance attestations into its release pipeline to verify binary authenticity. The project is open source and hosted on GitHub. Model execution requires an xAI API key or compatible backend credentials, with billing determined by standard API token consumption.
Grok Model Support — Utilizes xAI Grok models with tailored prompting and configuration for coding workflows. - Multimodal Vision Handling — Ingests visual assets and screenshots to assist with UI debugging and visual code tasks. - Modular Sub-Agents — Employs specialized sub-agents and desktop automation skills to execute system-level workflows. - Terminal-Native Interface — Runs inside standard command-line environments to inspect files, run tests, and apply diffs. - Provenance Attestations — Provides cryptographic build-provenance attestations via Sigstore for verifiable release security. - Clipboard Integration — Supports direct copy-to-clipboard functionality for generated code blocks and execution output.
Use cases
Use Case: Grok-Driven Terminal Development Developers utilizing xAI infrastructure can run interactive refactoring, code explanation, and bug-fixing workflows directly from the terminal without leaving their command-line environment.
Use Case: Vision-Assisted UI Debugging Developers can supply frontend screenshots or UI diagrams to the CLI agent alongside source code to identify layout regressions and generate styling adjustments.
Use Case: Sub-Agent Task Automation Engineers can orchestrate automated multi-step operations where sub-agents interact with repository tooling, run validation commands, and apply changes autonomously.
Who it is for
Grok CLI is designed for developers, DevOps practitioners, and engineers who actively utilize xAI Grok models and want a terminal-native autonomous coding harness. It is less suitable for developers who require turnkey IDE GUI plugins or teams that rely exclusively on non-xAI proprietary model ecosystems.
Install guide
Installation Clone the repository and build from source or install dependencies (inferred standard repository setup): bash git clone https://github.com/superagent-ai/grok-cli.git cd grok-cli npm install npm run build Alternatively, download the signed binaries from the GitHub Releases page.
First Run Set your xAI API key in your shell environment: bash export XAI_API_KEY="your_xai_api_key_here" Launch the CLI: bash grok
Example Session Execute a code inspection and refactoring prompt: bash grok "Audit src/server.ts for unhandled Promise rejections and generate typed error handling middleware"
OpenCode — OpenCode is an open-source AI coding agent developed by Anomaly that operates across terminal environments, desktop applications, and IDE extensions.…
goose — goose is an open-source, general-purpose AI agent built in Rust, hosted under the vendor-neutral Agentic AI Foundation (AAIF) at the…
SWE-agent — SWE-agent is an open-source autonomous software engineering agent harness built and maintained by researchers from Princeton University and Stanford University.…
OpenHands — OpenHands (formerly OpenDevin) is an open-source autonomous AI software development agent and orchestration platform. It provides an extensible runtime environment…
Plandex — Plandex is an open-source terminal-based AI coding agent designed to handle complex, multi-file engineering tasks in large codebases. Created by…
Weaver — Weaver is an open-source agent harness and orchestration framework maintained by sean35mm on GitHub. Built on top of the Bun…