Terminal AI agent
Grok Build
Open-source coding-agent harness (Apache 2.0) from xAI: a full-screen terminal agent whose default model, Grok 4.6, is hosted and metered. Custom and local OpenAI-compatible endpoints such as Ollama are documented in its config file, though OpenSourcesAI has not tested that route yet.
Intermediate · Official one-line installers: curl -fsSL https://x.ai/cli/install.sh | bash (macOS and Linux) and irm https://x.ai/cli/install.ps1 | iex (Windows PowerShell). Both are pipe-to-shell one-liners, so read the script first if that matters to you. Building from source needs Rust, DotSlash and protoc. First launch opens a browser to sign in to xAI; non-browser environments use the XAI_API_KEY environment variable. Custom and local models are configured in ~/.grok/config.toml (Windows: %USERPROFILE%\.grok\config.toml).
Editorial review
Tool categories, pricing, source status, deployment options, and product claims can change quickly. Verify the official source before production or commercial use.
About Grok Build
Open-source coding-agent harness (Apache 2.0) from xAI: a full-screen terminal agent whose default model, Grok 4.6, is hosted and metered. Custom and local OpenAI-compatible endpoints such as Ollama are documented in its config file, though OpenSourcesAI has not tested that route yet.
Best for: Developers who want a full-screen terminal coding agent whose harness they can read and build from source, and who are comfortable that the default model is xAI's hosted Grok 4.6 until they point the harness at their own OpenAI-compatible endpoint.
Deployment: Official one-line installers: curl -fsSL https://x.ai/cli/install.sh | bash (macOS and Linux) and irm https://x.ai/cli/install.ps1 | iex (Windows PowerShell). Both are pipe-to-shell one-liners, so read the script first if that matters to you. Building from source needs Rust, DotSlash and protoc. First launch opens a browser to sign in to xAI; non-browser environments use the XAI_API_KEY environment variable. Custom and local models are configured in ~/.grok/config.toml (Windows: %USERPROFILE%\.grok\config.toml).
Skill level: Intermediate
Tradeoffs
The default model, Grok 4.6, is hosted and metered: at the time of writing, API pricing is $2 per million input tokens, $0.50 per million cached input tokens and $6 per million output tokens for prompts under 200K tokens, rising to $4, $1 and $12 above 200K and applied to the whole request. First launch opens a browser to authenticate with xAI; whether setting a custom default model lets you skip that login entirely is not something we have verified, so check before assuming an offline first run. xAI does not accept external contributions and has issues disabled on the repository, so this is open source you can read and fork, not a community project you can steer. Before it was open-sourced, the closed CLI (v0.2.93) uploaded entire tracked git repositories, including history and committed secrets, to an xAI-controlled Google Cloud Storage bucket regardless of the 'Improve the model' privacy toggle: a security researcher published the wire-level analysis on 12 July 2026, xAI stopped the upload server-side on 13 July without an advisory, the report was discussed on Hacker News on 14 July and Elon Musk said previously uploaded data would be deleted, and the open-source release followed on 15 July. The practical response is to run the open-source build, read your config.toml, and keep secrets out of tracked files. The local-endpoint route is documented but OpenSourcesAI has not tested it, and tool-calling quality with local models varies from model to model.
Related guides and resources
Explore step-by-step setup guides, comparisons, and stack recipes for this tool category.
Best for
Developers who want a full-screen terminal coding agent whose harness they can read and build from source, and who are comfortable that the default model is xAI's hosted Grok 4.6 until they point the harness at their own OpenAI-compatible endpoint.
Why use it
Grok Build is xAI's terminal coding agent: it reads and edits files, runs shell commands, searches the web, and keeps working through long-running tasks inside a full-screen, mouse-interactive TUI, with a headless mode for scripts and CI and an Agent Client Protocol (ACP) mode for embedding it in editors. The harness itself is Apache 2.0 and open source since 15 July 2026, so you can read every line and build the binary yourself; the model is a separate question. By default it talks to Grok 4.6, which is hosted and metered, but the official settings reference documents custom OpenAI-compatible model endpoints in ~/.grok/config.toml, so the same harness can drive a model on your own hardware; xAI's docs carry no Ollama-specific example, and OpenSourcesAI has not tested that route. Its extension system covers MCP servers, skills, plugins, hooks and subagents.
Key features
- Full-screen, mouse-interactive terminal UI, plus a headless mode for scripts and CI and an Agent Client Protocol (ACP) mode for embedding the agent in editors
- Extension system covering MCP servers, skills, plugins, hooks and subagents, so the agent can reach your tools and be shaped to your workflow
- Custom model endpoints in ~/.grok/config.toml: each [model.<id>] block sets model, base_url, name, env_key, context_window and api_backend, which can be chat_completions (OpenAI Chat Completions), responses (OpenAI Responses) or messages (Anthropic Messages); pointing a block at Ollama's documented OpenAI-compatible endpoint (http://localhost:11434/v1) applies those documented keys, though xAI's docs carry no Ollama-specific example and OpenSourcesAI has not tested it
- Agentic loop over your project: reads and edits files, runs shell commands, searches the web, and keeps working through long-running tasks under your review
- Apache 2.0 harness written in Rust that you can build yourself from the xai-org/grok-build repository, with third-party code under its own licences in THIRD-PARTY-NOTICES
Common AI use cases
- Work through a multi-file change in a repository from the terminal, with the agent reading, editing and running commands under your review
- Run the agent headless in a script or CI job, or embed it in an editor over the Agent Client Protocol
- Point the harness at a local OpenAI-compatible server such as Ollama to keep prompts and code on your own machine (documented by xAI, not yet tested by OpenSourcesAI)
Who should use it
- Terminal-first developers who want a mouse-interactive TUI agent and are comfortable with a hosted, metered default model
- Builders who want to read and compile the agent harness themselves rather than trust a closed binary
- Local AI users willing to edit config.toml to point the documented custom-endpoint route at Ollama and judge tool-calling quality on their own hardware
Who should not use it
- Anyone who needs a fully offline first run today: first launch authenticates with xAI in a browser, and whether a custom default model bypasses that step is unverified
- Teams that want to contribute upstream or file issues: external contributions are not accepted and issues are disabled
- Users who want a coding agent designed local-first rather than cloud-first with a documented local route; compare Aider and OpenCode
Tradeoffs
The default model, Grok 4.6, is hosted and metered: at the time of writing, API pricing is $2 per million input tokens, $0.50 per million cached input tokens and $6 per million output tokens for prompts under 200K tokens, rising to $4, $1 and $12 above 200K and applied to the whole request. First launch opens a browser to authenticate with xAI; whether setting a custom default model lets you skip that login entirely is not something we have verified, so check before assuming an offline first run. xAI does not accept external contributions and has issues disabled on the repository, so this is open source you can read and fork, not a community project you can steer. Before it was open-sourced, the closed CLI (v0.2.93) uploaded entire tracked git repositories, including history and committed secrets, to an xAI-controlled Google Cloud Storage bucket regardless of the 'Improve the model' privacy toggle: a security researcher published the wire-level analysis on 12 July 2026, xAI stopped the upload server-side on 13 July without an advisory, the report was discussed on Hacker News on 14 July and Elon Musk said previously uploaded data would be deleted, and the open-source release followed on 15 July. The practical response is to run the open-source build, read your config.toml, and keep secrets out of tracked files. The local-endpoint route is documented but OpenSourcesAI has not tested it, and tool-calling quality with local models varies from model to model.
Alternatives
- Gemini CLI
- OpenCode
- Aider
- Cline
Official verification sources
Direct official links used to verify pricing, features, security claims, and product packaging.
OpenSourcesAI ecosystem connections
Use these next-step links to move from this profile into related tools, comparisons, guides, stacks, and curated shortlists.
Alternative solutions
Guides, comparisons, and resources
Directory paths