One screen
Cheat sheet
Slash commands, keyboard modes, install lines, and video mode pickers — the desk reference.
Install
Windows PowerShell
irm https://x.ai/cli/install.ps1 | iex
grok --version
cd your-project
grokmacOS / Linux / WSL
curl -fsSL https://x.ai/cli/install.sh | bash
grok --versionHeadless / CI
export GROK_CODE_XAI_API_KEY="xai-..."
grok -p "fix failing tests only; stop when green" --no-auto-updateSlash commands & CLI utilities
| Command | Use it for |
|---|---|
| /help | Built-in guide (model-driven — costs context) |
| /plan [task] | Architecture doc → approve / comment / quit |
| /design … | Visual system + UI craft (skill) |
| /imagine [prompt] | Inline image in TUI |
| /imagine-video | Inline video when available |
| /model … | Switch model routing |
| /always-approve | Skip prompts; deny rules and hooks still apply |
| /auto | Classifier auto-approval |
| /workflow | Launch, pause, stop. Bare /workflow lists runs |
| /deep-research | Background research |
| /goal | Goal planner |
| /effort | Reasoning effort |
| /memory /dream /flush /remember | Cross-session memory (GA) |
| /theme | TUI theme, including auto |
| /rewind | Restore an earlier turn |
| /loop [interval] … | Recurring agent job. Stops itself after 7 days unless you renew it |
| /btw … | Side-channel Q&A without derailing task |
| /feedback | Report bugs / reactions |
| /marketplace | Skills & plugins catalog |
| /skillify | Capture workflow as reusable skill |
| /plugin /mcps | Plugins and MCP servers |
| /import-claude | Import Claude Code settings |
| ! / !cmd | Shell mode from empty prompt |
| @path/to/file | Attach file into prompt |
| grok inspect | Loaded skills, hooks, MCP, AGENTS.md + cost |
| grok -p "…" | Headless one-shot |
| grok wrap ssh … | Fix remote clipboard (OSC 52) |
| grok worktree … | list | show | rm | gc parallel trees |
| grok agent stdio | ACP for IDE orchestration |
Browser and Bot, in one screen
| Want | Do this |
|---|---|
| Mail + calendar every weekday | grok.com/automations — schedule, @ the connectors |
| React when a certain email lands | Email-trigger Automation (SuperGrok) |
| Click a site that has no API | Grok Bot computer use, or Teach a task |
| Repeat that click-path | Save a skill, test it, then a routine on one Bot |
| Team shares one coworker | Team Bot (Teams / Enterprise): shared context, private chats |
| Edit the repo | Grok Build CLI, not a Bot |
Keyboard (TUI + this manual)
| Keys | Action |
|---|---|
| Shift+Tab | Cycle Normal / Plan / Auto-approve |
| Ctrl+O | Flip always-approve (same family as /yolo) |
| Esc Esc (~800ms) | Clear draft / rewind picker |
| ⌘K / Ctrl+K | Search this manual |
Video mode picker
| Goal | Mode |
|---|---|
| New scene from words | Text-to-video |
| Exact first frame | Image-to-video from composed still |
| Same face/product in new place | Reference-to-video (1–7 refs) |
| Same voice + face | Image ref + voice ref |
| Episode N+1 continuity | End still of N as ref + freeze list |
Freeze list recipe
Freeze list
FREEZE: face geometry, hair, scars/marks, body proportions,
outfit colors & materials, signature props.
CHANGE ONLY: <one action or location>.
Duration: 6s. One camera move. Present tense.Magic constants (Build stack)
Copy these
#FF00FF solid magenta chroma for sprites/maps
window.__controlsTest vehicle/flight QA probe
?qa=1 enable QA hooks in games
/api/rtc WebRTC signaling for P2P co-op
grok-4.5 default runtime chat model
grok-imagine-image-quality | grok-imagine-image
grok-imagine-video runtime video (async)
voice_id: "eve" default TTS
XAI_API_KEY server-only; never VITE_*
1536x864 default side-scroll stage canvas
user_id TEXT never UUID for auth-scoped rowsDeep dives: Easter eggs chapter.
Hostinger Cloud Startup go-live checklist
- On-demand backup
- A record → dedicated IPv4 (not a leftover shared IP)
- HTTPS / SSL green
- CDN on; purge after asset renames
- LiteSpeed Cache (WP) or static headers; ObjectCache if WP
- Forms tested on real domain
- SPF (include the dedicated IP) + DKIM/DMARC if sending mail
- SPA: /assets and /media not swallowed by index.html fallback
- Optional: traffic power boost the week of launch
Watch out
Never leave /yolo on in production monorepos. Never paste FTP passwords into chat. Never put XAI_API_KEY in the browser.