Grok Build Guide
Grok’s coding agent with a terminal interface, script mode and ACP integration.
Last verified: · How we verifySuitable 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
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 | bashOpen your project folder in a terminal, then run:
grokAccount 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."Related CLI tools
All AI CLI tools →Project evaluation checklist
- Open a small, familiar project and confirm that your essential language tooling works.
- Give the agent one bounded change with an observable acceptance criterion.
- Review the diff, run the project’s checks and compare the result with your current workflow.
- Inspect usage after the task. Estimate a month of similar work, including any separate model or agent bill.