Grok CLI Manual
Install Grok CLI, connect it to XAI Router, then learn Grok Imagine image and video generation, permissions, sessions, worktrees, and API usage step by step.
This practical manual covers Grok CLI and Grok API access through XAI Router. Complete installation and configuration first, then try image generation, editing, video generation, and one small, verifiable task.
Recommended path:
~/.grok/config.toml and XAI Router./imagine, image tools, or the Images API./imagine-video or the Videos API.This guide draws on the official xAI Grok Build documentation, Grok Imagine model information, the local Grok CLI, and the XAI Router forwarding path.
Grok 4.7 model details were updated on 2026-09-22 using the official xAI documentation.