Overview
Thegrab configure command allows you to customize React Grab’s behavior including activation keys, activation modes, and context options.
Usage
grab config
Options
| Option | Alias | Description |
|---|---|---|
--yes | -y | Skip confirmation prompts |
--key <key> | -k | Activation key (e.g., Meta+K, Ctrl+Shift+G, Space) |
--mode <mode> | -m | Activation mode: toggle or hold |
--hold-duration <ms> | - | Key hold duration in milliseconds (for hold mode) |
--allow-input <boolean> | - | Allow activation inside input fields (true/false) |
--context-lines <lines> | - | Max context lines to include |
--cdn <domain> | - | CDN domain (e.g., unpkg.com, custom.react-grab.com) |
--cwd <cwd> | -c | Working directory (defaults to current directory) |
Configuration Options
Activation Key
The keyboard shortcut to activate React Grab:Meta(Cmd on Mac, Win on Windows)CtrlShiftAlt(Option on Mac)
- Letters:
a-z - Numbers:
0-9 - Special keys:
Space,Enter,Escape,Tab - Function keys:
F1-F12 - Symbols:
`,-,=,[,],\,;,',,,.,/
Activation Mode
How the activation key behaves:- Toggle — Press once to activate, press again to deactivate
- Hold — Hold the key to keep React Grab active, release to deactivate
Key Hold Duration
Milliseconds to hold the key before activation (only for hold mode):Default: 150ms
Allow Activation Inside Input
Whether to allow activation when focused on input fields:Max Context Lines
Number of surrounding code lines to include in copied context:Default: 3
CDN Domain
Customize the CDN domain for loading React Grab:Examples
Interactive Mode
Run without flags to use the interactive configuration wizard:Configure Multiple Options
Set multiple options at once:Non-Interactive Configuration
Configure without prompts:Change CDN Domain
Use a custom CDN:Output Example
Advanced Configuration
Combined Options Example
Interactive Key Selection
The interactive mode provides smart suggestions:Troubleshooting
React Grab Not Installed
grab init first.
Invalid Mode
toggle or hold for the --mode flag.
Invalid Hold Duration
Invalid Context Lines
No Changes Needed
If the configuration is already set:Configuration Persistence
Configurations are stored in your code via thedata-options attribute:
Related Commands
grab init— Initialize React Grab in your projectgrab add— Connect React Grab to your coding agentgrab remove— Disconnect agent integrations
