Separate check from install
Use grok update --check or --check --json to inspect availability without changing the installation. The released command can switch to --stable (the default channel, which help describes as weekly releases) or --alpha, or install a specific --version; switching channel is a deliberate policy choice.
Record grok version --json before installation. xAI does not publish a per-version Grok Build changelog on docs.x.ai, so read the in-TUI /release-notes view after updating and re-run a smoke test. Avoid --force-reinstall unless repairing a known installation problem.
- Pin a version in automation and record the version output.
- In CI or containers, suppress background update checks with GROK_DISABLE_AUTOUPDATER or auto_update = false under [cli].
- Re-run the smoke test after every channel or version change.
grok version --json
grok update --check --json Diagnose before fixing
grok doctor checks terminal, clipboard, color, and input support without starting Grok; --json makes the diagnostic machine-readable. grok inspect covers discovered configuration and extensions, a different evidence surface.
Run grok doctor fix without an ID to list the available automatic fixes, review them, then apply one named fix. --yes applies the displayed changes without confirmation and belongs only in a procedure that has already audited them.
- Review debug-file output before sharing.
- Fix the first failing layer before changing unrelated settings.
- Re-run doctor after a repair.
grok doctor --json
grok doctor fix
grok doctor fix FIX_ID Generate completion code deliberately
grok completions takes a shell (bash, elvish, fish, powershell, or zsh) and prints its completion script. Write it to a temporary file, inspect it, and install it using the conventions of that shell rather than appending unknown text directly to a startup file.
The TUI /doctor command is source-preview in the captured source ledger, while the grok doctor shell command is runtime-confirmed and /terminal-setup is the documented in-TUI terminal check. Keep availability labels attached to the surface you teach.
grok completions zsh > /tmp/_grok
sed -n "1,40p" /tmp/_grok