Synced from monorepo

Synced from monorepo

Changes:
- Workspace server: report `/ready` as failed with dwell on hub connect failure
- Refresh OIDC token for the Grok agent in the shell
- ACP terminal output recorder
- Cross-platform provider auth commands in the shell
- Default `/resume` to Grok sessions with a hint for hidden external sessions
- Resume sessions by title with `--resume`
- Limit app-builder archive size
- Data-driven tag labels for slash commands
- Doctor fixes for tmux
- Custom provider gateways and subprocess environment policy in the shell
- `/tutorial` — opt-in onboarding tour of Grok Build
- Soft and required CLI version checks in the shell
- Privacy banner env overrides survive live settings updates
- Add remote flag to override the image-edit model
- Return profile fields from auth info even when the access token is expired
- Add edit control on queued prompt rows
- Keep fail-closed policy when clearing orphans with no team
- Setting to disable the Ctrl+Space/F8 voice shortcut
- Pass `--raw` to pw-record so Linux dictation works on older PipeWire
- Validate git URLs when adding marketplace entries
- Stop shipping stale tool-doc parameter and tool names
- Re-point dashboard attach after `/fork` only when the parent was attached
- Surface Grok Computer media-generation results as file-path chunks
- Clear web background-task tray on kill and keep the task description
- Show privacy upsell banner in agent view until acted on
- Add tools-server client callback surface
- Protect persistent global hook sources

Source-Revision: 95d84f443eddcbed6cbfd6eed22e2eafe6b3939d
This commit is contained in:
grokkybara[bot] 2026-07-23 17:12:33 +00:00
commit 69f0ba880a
286 changed files with 22939 additions and 9624 deletions

View file

@ -0,0 +1,40 @@
# Coming from Claude, Cursor, or Codex?
Fear not — your settings, rules, and skills come with you. Grok Build
reads the same project conventions other agents use, and imports the rest.
## Picked up automatically
- **Rules & instructions**`AGENTS.md` (the Codex/OpenCode convention),
`CLAUDE.md` (including nested ones), and `*.md` rules under
`.claude/rules/` and `.cursor/rules/`.
- **Skills & custom commands**`~/.claude/skills/`, `~/.claude/commands/`,
`~/.cursor/skills/`, and their project-level twins. Flat command `.md`
files become slash commands here too.
- **MCP servers** — from `~/.claude.json`, `.cursor/mcp.json`, and project
`.mcp.json`.
- **Hooks** — from `.claude/settings.json`, including matcher aliases like
`Bash`, so most hooks run unchanged.
## One-step import
**`/import-claude`** scans your `~/.claude` settings — permissions, env
vars, MCP servers, hooks — and shows a checkbox preview; confirming
writes the items you selected into your `.grok` config. Re-run it anytime.
## Pick up where you left off
The **`/resume-claude`**, **`/resume-codex`**, and **`/resume-cursor`**
skills continue a recent session from those tools right here.
## Check what was discovered
Run **`grok inspect`** in a repo to see every rules file, skill, and MCP
server Grok picked up, tagged with where it came from. Each compat source
can be toggled in `[compat.claude]` / `[compat.cursor]` config sections.
And a few things you might have missed elsewhere: `/btw` asks a side
question without interrupting the current task, and `/rewind` restores
actual file snapshots, not just chat history.
*Go deeper: `/docs Project Rules (AGENTS.md)`, `/docs Skills`, or `/docs MCP Servers`*

View file

@ -0,0 +1,25 @@
# Your First Prompt
Grok Build is a conversation with an agent that can read your code, run
commands, and edit files — right here in your terminal.
Type what you want and press `Enter`. Grok streams its work into the
**scrollback** above the prompt: responses, shell commands, file edits.
## Keep typing while Grok works
While a turn is running, `Enter` **queues** your next message instead of
interrupting. Change your mind? Press `Enter` on the empty prompt to stop
the current turn and send the queued message right away.
## You are always in control
- **`Esc`** — cancel a running turn immediately (your draft is kept).
- **`Esc Esc`** while idle — clear the prompt; with an empty prompt, open
the rewind picker instead. Cleared something by accident? `Ctrl+Z` undoes.
- **`Ctrl+Q`** — quit (`Ctrl+D` in VS Code-family terminals), press twice.
The **shortcuts bar** at the bottom always shows the keys relevant to what
you're doing right now — when in doubt, look down.
*Go deeper: `/docs Getting Started`*

View file

@ -0,0 +1,26 @@
# Attach Files, Images & Paste
The more precisely you point Grok at the right context, the better the
result. Three ways to get things into the prompt:
## Mention files with `@`
Type `@` for a fuzzy file picker — line ranges work too:
```
@src/main.rs attach a file
@src/main.rs:10-50 attach specific lines
@!.env reach hidden files with @!
```
## Paste images
Paste a screenshot straight into the prompt: `Cmd+V` on macOS, `Ctrl+V` on
Linux, `Alt+V` on Windows. Great for error dialogs, designs, and diagrams.
## Run shell commands yourself
Type `!` on an empty prompt to run a shell command directly — the output
lands in the scrollback where Grok can see it too.
*Go deeper: `/docs Getting Started`*

View file

@ -0,0 +1,32 @@
# Finding Your Way Around
The screen has three parts: the **scrollback** (the conversation), the
**prompt** below it, and the **shortcuts bar** at the bottom. Panes for
todos and background tasks slide in when you need them.
## Focus
**`Tab`** switches focus between the prompt and the scrollback. Focused
scrollback gets a selection you can move with the arrow keys.
## Moving through the conversation
- **`↑`/`↓`** — select the previous/next entry.
- **`Shift+←`/`Shift+→`** — jump between turns (your prompts).
- **`PageUp`/`PageDown`** — scroll by page; this works straight from the
prompt, no focus change needed.
- **`←`/`→`** — collapse/expand the selected entry; long tool output stays
out of your way until you want it.
- **`Enter`** — open the selected entry in a fullscreen viewer.
## Panes
- **`Ctrl+T`** — toggle the **todos pane**: Grok's live plan for the
current task.
- **`Ctrl+G`** — toggle the **tasks pane**: everything running in the
background, with its status.
Prefer vim keys? **`/vim-mode`** switches the scrollback to `j`/`k`,
`g`/`G`, and friends.
*Go deeper: `/docs Keyboard Shortcuts`*

View file

@ -0,0 +1,36 @@
# Slash Commands
Type `/` on an empty prompt and a searchable dropdown of commands appears.
A few worth knowing on day one:
| Command | What it does |
|---------|--------------|
| `/help` | Browse every command and keyboard shortcut |
| `/model` | Switch models or reasoning effort |
| `/resume` | Pick up a previous session where you left off |
| `/new` | Start a fresh session |
| `/compact` | Compress a long conversation to free up context |
| `/btw` | Send Grok an aside *without* interrupting its current task |
| `/rewind` | Restore your files and history to an earlier prompt |
| `/docs` | Full How-to Guides, in the TUI or on the web |
| `/feedback` | Send feedback to the team |
Two of those deserve a second look:
- **`/compact`** takes an optional hint: `/compact keep the auth details`.
Check context usage anytime with `/context` — Grok also auto-compacts
when the window fills up.
- **`/rewind`** restores actual file snapshots taken at each prompt, not
just the chat.
## The command palette
Press **`Ctrl+P`** (or `?` from the scrollback) to open the command palette —
one searchable list of every command, shortcut, and skill. There's also a
full shortcuts cheatsheet on `Ctrl+.` (use `Ctrl+X` if your terminal
swallows it).
You don't need to memorize anything: `/` and `Ctrl+P` will always show you
what's available.
*Go deeper: `/docs Slash Commands`*

View file

@ -0,0 +1,34 @@
# Parallel Work: Worktrees
Want Grok working on a feature while you (or another Grok session) work on
something else in the same repo? **Git worktrees** give each session its own
isolated checkout — no stepping on each other's changes, no stashing.
## Start a session in a worktree
- **From anywhere:** press `Ctrl+N` (twice to confirm) for a new session,
then choose the worktree option.
- **From the welcome screen:** press `Ctrl+W` (inside a git repo) to open
the New Worktree dialog.
- **From the shell:**
```bash
grok --worktree=my-feature "refactor the auth module"
```
(Use `=` — otherwise the prompt is taken as the worktree name.)
## Why this is great
- Run two or three Grok sessions on the same repo simultaneously.
- Experiments stay isolated — if a change doesn't work out, your main
checkout is untouched.
- When the work is done, apply the changes back like any git branch.
**`/fork`** copies your current conversation into a parallel session —
add a directive to point it at a task: `/fork try the async approach`.
Running several agents? The **dashboard** (`/dashboard` or `Ctrl+\`) shows
every session grouped by state — who needs input, who's working, who's done.
*Go deeper: `/docs Session Management`*

View file

@ -0,0 +1,39 @@
# Plan Mode & Permissions
Grok asks before doing anything risky — and can plan before it codes.
## Permissions
When Grok wants to run a risky command or edit a file, it pauses and asks:
allow once, always allow that kind of action, or deny.
Reading is always free: file reads, searches, and safe read-only commands
(`ls`, `git status`, `grep`, …) never prompt. Chained commands are
checked piece by piece — `ls && rm -rf tmp` still prompts for the `rm`.
Trust the session? `/always-approve` (or `Ctrl+O`) skips the prompts.
## Plan mode
For bigger or more ambiguous tasks, use **plan mode**: Grok explores the
codebase read-only, designs an approach, and presents a plan you approve
*before* any code is written.
- **`Shift+Tab`** (prompt focused) cycles the mode: Normal → Plan →
Always-approve.
- **`/plan`** enters plan mode directly; `/plan <task>` plans that task in
one step.
When the plan is ready: `a` approves, `c` comments on a specific line,
`s` requests changes — Grok iterates until you're happy, then implements.
A good habit: plan mode for "how should we even do this?", normal mode for
"just do it".
## Long-running commands
A build or test run hogging the turn? **`Ctrl+B`** sends it to the
background — Grok keeps working and you're notified when it finishes
(`Ctrl+G` shows the tasks pane).
*Go deeper: `/docs Plan Mode` or `/docs Permissions and Safety`*

View file

@ -0,0 +1,40 @@
# Make It Yours
## The easiest way: just ask
Grok knows its own capabilities and can configure itself. Try:
- *"add the Postgres MCP server for our staging db"*
- *"switch to a light theme"*
- *"write an AGENTS.md for this repo"*
If you'd rather drive, everything below has a command too.
## Teach Grok your project: AGENTS.md
Drop an `AGENTS.md` file in your repo root with build commands, conventions,
and gotchas. Grok reads it automatically in every session — it's the single
highest-leverage customization:
```markdown
# My Project
- Run tests with `pnpm test`
- Never edit files under generated/
```
## Teach Grok your facts: memory
Start a prompt with `#` (or use `/remember`) to save a note for future
sessions: `# the staging deploy uses eu-west`.
## Looks, keys, and extensions
- **`/theme`** — color themes (or `auto` to follow your OS); **`/settings`**
(or `F2`) for everything else; **`/vim-mode`** if that's your thing.
- **Skills** (`/skills`) — reusable prompt packages; user-invocable skills
become slash commands automatically.
- **MCP servers** (`/mcps`) and **plugins & hooks** (`/plugins`, `/hooks`).
Start with `AGENTS.md` and a theme; add the rest when you need it.
*Go deeper: `/docs Project Rules (AGENTS.md)`, `/docs Skills`, or `/docs MCP Servers`*

View file

@ -0,0 +1,29 @@
# Where to Go Next
You know enough to be productive. When you want more:
## Built-in help
- **`/help`** or **`Ctrl+P`** — every command, shortcut, and skill, searchable.
- **`/docs`** — the full How-to Guides inside the TUI (`/docs web` for the
online docs). Covers sessions, headless mode, subagents, sandboxing,
memory, and much more.
- **Ask Grok itself** — it can read its own user guide and set itself up.
Try: "How do I run you in CI?" or "add an MCP server for GitHub".
## Good habits
- Sessions save automatically. Resume the latest with `grok -c`, or pick
one with `/resume` (`Ctrl+S`).
- Long session getting slow? `/compact` frees context; `/context` shows
where it's going.
- Automate anything: `grok -p "summarize new TODOs" --output-format json`
runs headless — great for scripts and CI.
- Stay current with `grok update`; see what changed with `/release-notes`.
- Something feel off? `/feedback` goes straight to the team.
## Reopen this tutorial
Type **`/tutorial`** anytime.
Now go build something.