> getting started

Grok CLI is an open-source, conversational coding agent from superagent-ai that runs in your terminal: you describe a task in plain English and it reads, writes, edits, and runs code on its own using xAI's Grok models. It installs as the npm package @vibe-kit/grok-cli and exposes a single grok binary. Bun 1.0+ is the recommended runtime, with Node.js 18+ as a fallback.

// getting started

5 commands

// faq

Is Grok CLI free to use?

The CLI itself is open-source (MIT) and free to install, but it calls the xAI API, which is billed per token. Creating an xAI key at console.x.ai is free and new accounts get promotional credits, but there is no permanent free tier — you pay for what the agent generates. You can also point the CLI at a cheaper OpenAI-compatible provider.

What is the difference between @vibe-kit/grok-cli and xAI's own CLI?

@vibe-kit/grok-cli (the grok binary) is a community, open-source coding agent, not affiliated with xAI, and it works against any OpenAI-compatible endpoint. xAI separately ships its own first-party coding CLI (Grok Build, installed from x.ai/cli). This cheat sheet covers the community @vibe-kit/grok-cli.

Do I need Bun, or does Node.js work?

Node.js 18+ works — install with npm install -g @vibe-kit/grok-cli. Bun 1.0+ is recommended (bun add -g @vibe-kit/grok-cli) and is required if you build from source, since the development scripts use Bun.

Why does the grok command not exist after I install it?

The package is @vibe-kit/grok-cli but the installed binary is named grok, and a global npm install places it in npm's global bin directory. If that directory is not on your PATH, add $(npm config get prefix)/bin to PATH in your shell profile and reopen the terminal.