Skip to content
TraeIDE

Search

Popular pages

No matching pages

Try a tool name or a topic such as pricing or MCP.

English

Grok Build Guide

Grok’s coding agent with a terminal interface, script mode and ACP integration.

Last verified: · How we verify
Coding agentxAI / SpaceXAImacOSWindowsLinux

Suitable workflows

Grok-based development and embedding an agent in terminal scripts or ACP clients.

Limitations and billing

Browser login and API access have different billing paths; a chat subscription is not an API allowance.

Capabilities we verified

Agent workflowCLI surfaceMCPSkillsRules / instructionsHooksBring your own key

This is an evidence-based shortlist, not an exhaustive feature inventory. Omitted capabilities have not been checked for this record.

Pricing & usage

See official pricing

Account access or metered API usage. The cost of metered usage or an external agent can be separate from the subscription.

Check official pricing ↗

Models & access

Grok models and configurable API endpoints; inspect the active model before running a task.

Verified families: Grok.

Official model information ↗

Install and start the CLI

macOS, Linux or WSL for this installer; use the official PowerShell instructions on Windows.

Installation command · macOS / Linux

curl -fsSL https://x.ai/cli/install.sh | bash

Open your project folder in a terminal, then run:

grok
Official installation instructions ↗

Account and authentication

First launch opens browser authentication. Headless environments can use XAI_API_KEY.

Project configuration and tools

Configure models in ~/.grok/config.toml. Run grok inspect to inspect instructions, skills, hooks and MCP discovery.

First task to try

Ask Grok to trace a function across files, then review its proposed implementation plan.

Script usage

This example asks for a project summary. Tool permissions still apply; a prompt is not a sandbox.

grok -p "Summarize the project structure without modifying files."
Official configuration reference ↗

Related CLI tools

All AI CLI tools →

Project evaluation checklist

  1. Open a small, familiar project and confirm that your essential language tooling works.
  2. Give the agent one bounded change with an observable acceptance criterion.
  3. Review the diff, run the project’s checks and compare the result with your current workflow.
  4. Inspect usage after the task. Estimate a month of similar work, including any separate model or agent bill.