@react-grab/cli 0.0.68

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Aiden Bai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # @react-grab/cli
2
+
3
+ Interactive CLI to install React Grab in your project.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx @react-grab/cli
9
+ ```
10
+
11
+ ### Interactive Mode (default)
12
+
13
+ Running without options starts the interactive wizard:
14
+
15
+ ```bash
16
+ npx @react-grab/cli
17
+ ```
18
+
19
+ ### Non-Interactive Mode
20
+
21
+ Pass options to skip prompts:
22
+
23
+ ```bash
24
+ # Auto-detect everything and install without prompts
25
+ npx @react-grab/cli -y
26
+
27
+ # Specify framework and agent
28
+ npx @react-grab/cli -f next -r app -a cursor -y
29
+
30
+ # Use specific package manager
31
+ npx @react-grab/cli -p pnpm -a claude-code -y
32
+ ```
33
+
34
+ ## Options
35
+
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
+ | `--agent` | `-a` | Agent integration to add | `claude-code`, `cursor`, `opencode`, `none` |
42
+ | `--yes` | `-y` | Skip all confirmation prompts | - |
43
+ | `--skip-install` | - | Skip package installation (only modify files) | - |
44
+ | `--help` | `-h` | Show help | - |
45
+ | `--version` | `-v` | Show version | - |
46
+
47
+ ## Examples
48
+
49
+ ```bash
50
+ # Interactive setup
51
+ npx @react-grab/cli
52
+
53
+ # Quick install with auto-detection
54
+ npx @react-grab/cli -y
55
+
56
+ # Next.js App Router with Cursor agent
57
+ npx @react-grab/cli -f next -r app -a cursor -y
58
+
59
+ # Vite with Claude Code agent using pnpm
60
+ npx @react-grab/cli -f vite -p pnpm -a claude-code -y
61
+
62
+ # Add agent to existing React Grab installation
63
+ npx @react-grab/cli -a opencode -y
64
+
65
+ # Only modify files (skip npm install)
66
+ npx @react-grab/cli -a cursor --skip-install -y
67
+ ```
68
+
69
+ ## Supported Frameworks
70
+
71
+ | Framework | File Modified |
72
+ |-----------|---------------|
73
+ | Next.js (App Router) | `app/layout.tsx` |
74
+ | Next.js (Pages Router) | `pages/_document.tsx` |
75
+ | Vite | `index.html` |
76
+ | Webpack | `src/index.tsx` or `src/main.tsx` |
77
+
78
+ ## Agent Integrations
79
+
80
+ The CLI can optionally set up agent integrations for:
81
+
82
+ - **Claude Code** (`-a claude-code`) - Send selected elements to Claude Code
83
+ - **Cursor** (`-a cursor`) - Send selected elements to Cursor
84
+ - **Opencode** (`-a opencode`) - Send selected elements to Opencode
85
+
86
+ ## Manual Installation
87
+
88
+ If the CLI doesn't work for your setup, visit the docs:
89
+
90
+ https://react-grab.com/docs