Grok CLI Manual
Install Grok CLI, connect it to ZAI 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 ZAI Router. Complete installation and configuration first, then try image generation, editing, video generation, and one small, verifiable task.
Recommended path:
~/.grok/config.toml and ZAI Router./imagine, image tools, or the Images API./imagine-video or the Videos API.Sources checked on 2026-08-16: the official xAI Grok Build documentation, Grok 4.6 and Grok Imagine model information, the local Grok CLI, and the ZAI Router forwarding path.