Overview
Thegrab init command automatically detects your framework and installs React Grab in your project. It supports Next.js, Vite, TanStack Start, and Webpack projects.
Usage
Options
| Option | Alias | Description | Default |
|---|---|---|---|
--yes | -y | Skip confirmation prompts | false |
--force | -f | Force overwrite existing config | false |
--agent <agent> | -a | Connect to your agent (cursor, claude, copilot, windsurf, mcp) | - |
--key <key> | -k | Activation key (e.g., Meta+K, Ctrl+Shift+G, Space) | - |
--skip-install | - | Skip package installation | false |
--pkg <pkg> | - | Custom package URL for CLI | grab |
--cwd <cwd> | -c | Working directory | Current directory |
Examples
Basic Installation
Non-Interactive Mode
Skip all prompts with the--yes flag:
Install with Agent Integration
Connect to your coding agent during installation:Custom Activation Key
Set a custom keyboard shortcut:Specify Working Directory
Install in a specific project directory:Force Reinstall
Overwrite existing React Grab configuration:Supported Frameworks
React Grab automatically detects and supports:- Next.js — Both App Router and Pages Router
- Vite — React + Vite projects
- TanStack Start — TanStack Start applications
- Webpack — Custom Webpack configurations
Framework Detection
The CLI detects your framework by analyzing:- Package dependencies in
package.json - Configuration files (
next.config.ts,vite.config.ts, etc.) - Project structure and file locations
Monorepo Support
For monorepos, React Grab will:- Scan for all React projects in the workspace
- Prompt you to select a project
- Install React Grab in the selected project
--cwd:
Output Example
Troubleshooting
Framework Not Detected
If the CLI cannot detect your framework:Multiple Projects Found
For monorepos with multiple projects:--cwd.
Already Installed
If React Grab is already installed:- Use
--forceto reconfigure - Run
grab configureto change options - Run
grab addto add agent integrations
Related Commands
grab add— Connect React Grab to your coding agentgrab configure— Configure React Grab optionsgrab remove— Disconnect agent integrations
