Skip to main content

Overview

The grab 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:
  1. Package dependencies in package.json
  2. Configuration files (next.config.ts, vite.config.ts, etc.)
  3. Project structure and file locations

Monorepo Support

For monorepos, React Grab will:
  1. Scan for all React projects in the workspace
  2. Prompt you to select a project
  3. Install React Grab in the selected project
Specify a project directly with --cwd:

Output Example

Troubleshooting

Framework Not Detected

If the CLI cannot detect your framework:
Solution: Follow the manual installation guide.

Multiple Projects Found

For monorepos with multiple projects:
Solution: Specify the project with --cwd.

Already Installed

If React Grab is already installed:
Options:
  • Use --force to reconfigure
  • Run grab configure to change options
  • Run grab add to add agent integrations