Skip to main content

Grok

Install, authenticate, and resume xAI's Grok CLI inside Daintree, including its inline default and the --fullscreen alt-screen flag.

Reviewed

Grok

Grok Build is xAI's CLI coding agent, invoked as grok. It runs as a process in its own Daintree terminal panel with full PTY emulation, like every other built-in agent.

Commandgrok
ShortcutNone by default — assign one in Keyboard Shortcuts
ColorNear-white (#E8E8E8)
Context window200,000 tokens (Composer 2.5 Fast, the CLI default)
Default renderingInline, via --no-alt-screen
Permission bypass--always-approve
PlatformsmacOS, Windows, Linux

Install & Authenticate

curl -fsSL https://x.ai/cli/install.sh | bash

Run grok once. It opens a browser for sign-in and writes the result to ~/.grok/auth.json, which is where Daintree looks. For headless or CI use, set XAI_API_KEY instead — that counts as authenticated too. Access needs an eligible xAI subscription on the account you sign in with; the install itself succeeds either way.

The installer places the launcher at ~/.local/bin/grok on macOS and Linux, and Daintree probes that path directly so a script install is detected even when the Electron process inherits a PATH that misses it.

Note
Grok Build is a self-updating managed binary with its own stable and alpha channels, so Daintree does not drive its upgrades. Run grok update yourself when you want a newer build.

How Daintree Launches It

Grok is one of the three agents that launch inline by default. Its Rust TUI would otherwise take the alternate screen buffer and grab the mouse; Daintree passes --no-alt-screen so output flows into its own scrollback and stays selectable with the native selection layer.

Choosing alt-screen — globally, per agent, or per preset — does not merely drop the inline flag: Daintree passes --fullscreen, which forces the full-screen presentation. Grok goes inline on its own whenever its config or terminal auto-detection says so, so omitting a flag was not enough to make the choice stick; both directions now carry an explicit flag.

Grok's bypass flag is --always-approve. Daintree injects it when you turn bypass on for the agent or a preset; the global "skip permission prompts" switch passes Grok over, because the agent does not declare bypass support yet.

Scrolling

Grok's TUI tracks the mouse, which is the case that used to make trackpad scrolling stutter and, once a pane latched into the low-power resource profile, stay slow. Daintree's scroll handling was retuned for mouse-tracking TUIs like Grok, lazygit, and btop: sub-line trackpad motion is preserved, and each wheel notch advances a sensible number of lines.

Resuming Sessions

Daintree captures Grok's session ID and resumes with grok --resume <session-id>. Quit cleanly with /quit. The pattern Daintree uses to read that ID out of Grok's exit output is still provisional, so capture can miss; the fallback is grok --continue, which reopens the latest session for the launch directory. For the same reason the move-or-rename preview marks a Grok conversation unverified rather than claiming it survives. For the resume mechanics across all agents, see Session Resume.

Tip
If grok isn't detected after install, confirm it's on your PATH (which grok on macOS/Linux, where grok on Windows), then restart Daintree. See Agent Availability for the five detection states, and Presets for launch configurations.