@react-grab/cli 0.1.29 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,78 +1,104 @@
1
1
  # @react-grab/cli
2
2
 
3
- Interactive CLI to install React Grab in your project.
3
+ Interactive CLI to install and configure React Grab in your project.
4
4
 
5
- ## Usage
5
+ ## Quick Start
6
6
 
7
7
  ```bash
8
- npx grab
8
+ npx grab@latest init
9
9
  ```
10
10
 
11
- ### Interactive Mode (default)
11
+ ## Commands
12
12
 
13
- Running without options starts the interactive wizard:
13
+ ### `grab init`
14
+
15
+ Initialize React Grab in your project. Auto-detects your framework and applies the necessary changes.
14
16
 
15
17
  ```bash
16
- npx grab
18
+ npx grab@latest init
17
19
  ```
18
20
 
19
- ### Non-Interactive Mode
21
+ | Option | Alias | Description |
22
+ | ---------------- | ----- | ---------------------------------------- |
23
+ | `--yes` | `-y` | Skip confirmation prompts |
24
+ | `--force` | `-f` | Force overwrite existing config |
25
+ | `--key <key>` | `-k` | Activation key (e.g. Meta+K, Space) |
26
+ | `--skip-install` | | Skip package installation |
27
+ | `--pkg <pkg>` | | Custom package URL |
28
+ | `--cwd <cwd>` | `-c` | Working directory (default: current dir) |
29
+
30
+ ### `grab add`
20
31
 
21
- Pass options to skip prompts:
32
+ Connect React Grab to your coding agent via MCP.
22
33
 
23
34
  ```bash
24
- # Auto-detect everything and install without prompts
25
- npx grab -y
35
+ npx grab@latest add mcp
36
+ ```
37
+
38
+ | Option | Alias | Description |
39
+ | ------------- | ----- | ---------------------------------------- |
40
+ | `--yes` | `-y` | Skip confirmation prompts |
41
+ | `--cwd <cwd>` | `-c` | Working directory (default: current dir) |
26
42
 
27
- # Specify framework
28
- npx grab -f next -r app -y
43
+ ### `grab remove`
29
44
 
30
- # Use specific package manager
31
- npx grab -p pnpm -y
45
+ Disconnect React Grab from your coding agent.
46
+
47
+ ```bash
48
+ npx grab@latest remove mcp
32
49
  ```
33
50
 
34
- ## Options
51
+ | Option | Alias | Description |
52
+ | ------------- | ----- | ---------------------------------------- |
53
+ | `--yes` | `-y` | Skip confirmation prompts |
54
+ | `--cwd <cwd>` | `-c` | Working directory (default: current dir) |
35
55
 
36
- | Option | Alias | Description | Choices |
37
- | ------------------- | ----- | --------------------------------------------- | ---------------------------- |
38
- | `--framework` | `-f` | Framework to configure | `next`, `vite`, `webpack` |
39
- | `--package-manager` | `-p` | Package manager to use | `npm`, `yarn`, `pnpm`, `bun` |
40
- | `--router` | `-r` | Next.js router type | `app`, `pages` |
41
- | `--yes` | `-y` | Skip all confirmation prompts | - |
42
- | `--skip-install` | - | Skip package installation (only modify files) | - |
43
- | `--help` | `-h` | Show help | - |
44
- | `--version` | `-v` | Show version | - |
56
+ ### `grab configure`
57
+
58
+ Configure React Grab options. Runs an interactive wizard when called without flags.
59
+
60
+ ```bash
61
+ npx grab@latest configure
62
+ ```
63
+
64
+ | Option | Alias | Description |
65
+ | ---------------------- | ----- | --------------------------------------------- |
66
+ | `--yes` | `-y` | Skip confirmation prompts |
67
+ | `--key <key>` | `-k` | Activation key (e.g. Meta+K, Ctrl+Shift+G) |
68
+ | `--mode <mode>` | `-m` | Activation mode (`toggle` or `hold`) |
69
+ | `--hold-duration <ms>` | | Key hold duration in ms (hold mode, max 2000) |
70
+ | `--allow-input <bool>` | | Allow activation inside input fields |
71
+ | `--context-lines <n>` | | Max context lines (max 50) |
72
+ | `--cdn <domain>` | | CDN domain (e.g. unpkg.com) |
73
+ | `--cwd <cwd>` | `-c` | Working directory (default: current dir) |
45
74
 
46
75
  ## Examples
47
76
 
48
77
  ```bash
49
78
  # Interactive setup
50
- npx grab
79
+ npx grab@latest init
80
+
81
+ # Non-interactive setup
82
+ npx grab@latest init -y
51
83
 
52
- # Quick install with auto-detection
53
- npx grab -y
84
+ # Set a custom activation key
85
+ npx grab@latest init -k "Meta+K"
54
86
 
55
- # Next.js App Router
56
- npx grab -f next -r app -y
87
+ # Connect MCP to your agent
88
+ npx grab@latest add mcp
57
89
 
58
- # Vite with pnpm
59
- npx grab -f vite -p pnpm -y
90
+ # Change activation mode to hold
91
+ npx grab@latest configure --mode hold --hold-duration 500
60
92
 
61
- # Only modify files (skip npm install)
62
- npx grab --skip-install -y
93
+ # Interactive configuration wizard
94
+ npx grab@latest configure
63
95
  ```
64
96
 
65
97
  ## Supported Frameworks
66
98
 
67
- | Framework | File Modified |
68
- | ---------------------- | --------------------------------- |
69
- | Next.js (App Router) | `app/layout.tsx` |
70
- | Next.js (Pages Router) | `pages/_document.tsx` |
71
- | Vite | `index.html` |
72
- | Webpack | `src/index.tsx` or `src/main.tsx` |
73
-
74
- ## Manual Installation
75
-
76
- If the CLI doesn't work for your setup, visit the docs:
77
-
78
- https://react-grab.com/docs
99
+ | Framework | Detection |
100
+ | ---------------------- | ------------------------------------- |
101
+ | Next.js (App Router) | `next.config.ts` + `app/` directory |
102
+ | Next.js (Pages Router) | `next.config.ts` + `pages/` directory |
103
+ | Vite | `vite.config.ts` |
104
+ | Webpack | `webpack.config.*` |