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
Examples
Basic Installation
1
Run init command
Navigate to your project root and run:
2
Review changes
The CLI will show a diff of changes to your files:
3
Apply changes
Confirm to apply the changes when prompted:
4
Start development server
React Grab is now installed. Start your development server:
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
