@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 +71 -45
- package/dist/cli.cjs +2210 -4135
- package/dist/cli.d.cts +2 -2
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +2181 -4102
- package/dist/cli.js.map +1 -0
- package/package.json +10 -8
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
|
-
##
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx grab
|
|
8
|
+
npx grab@latest init
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Commands
|
|
12
12
|
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
32
|
+
Connect React Grab to your coding agent via MCP.
|
|
22
33
|
|
|
23
34
|
```bash
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
28
|
-
npx grab -f next -r app -y
|
|
43
|
+
### `grab remove`
|
|
29
44
|
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
Disconnect React Grab from your coding agent.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx grab@latest remove mcp
|
|
32
49
|
```
|
|
33
50
|
|
|
34
|
-
|
|
51
|
+
| Option | Alias | Description |
|
|
52
|
+
| ------------- | ----- | ---------------------------------------- |
|
|
53
|
+
| `--yes` | `-y` | Skip confirmation prompts |
|
|
54
|
+
| `--cwd <cwd>` | `-c` | Working directory (default: current dir) |
|
|
35
55
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
|
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
|
-
#
|
|
53
|
-
npx grab -
|
|
84
|
+
# Set a custom activation key
|
|
85
|
+
npx grab@latest init -k "Meta+K"
|
|
54
86
|
|
|
55
|
-
#
|
|
56
|
-
npx grab
|
|
87
|
+
# Connect MCP to your agent
|
|
88
|
+
npx grab@latest add mcp
|
|
57
89
|
|
|
58
|
-
#
|
|
59
|
-
npx grab
|
|
90
|
+
# Change activation mode to hold
|
|
91
|
+
npx grab@latest configure --mode hold --hold-duration 500
|
|
60
92
|
|
|
61
|
-
#
|
|
62
|
-
npx grab
|
|
93
|
+
# Interactive configuration wizard
|
|
94
|
+
npx grab@latest configure
|
|
63
95
|
```
|
|
64
96
|
|
|
65
97
|
## Supported Frameworks
|
|
66
98
|
|
|
67
|
-
| Framework |
|
|
68
|
-
| ---------------------- |
|
|
69
|
-
| Next.js (App Router) | `
|
|
70
|
-
| Next.js (Pages Router) | `
|
|
71
|
-
| Vite | `
|
|
72
|
-
| Webpack | `
|
|
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.*` |
|