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.Sources checked on 2026-08-06: the official xAI Grok Build documentation, Grok 4.5 and Grok Imagine model information, the local Grok CLI, and the XAI Router forwarding path.