gravity-core 1.0.4 → 1.0.5
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 +21 -21
- package/dist/mcp-server.js +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -25,15 +25,23 @@ npm install gravity-core
|
|
|
25
25
|
### 2. Setup Extension
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
gravity setup-extension
|
|
28
|
+
npx gravity-core setup-extension
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
This extracts the Chrome extension to `~/.gravity-extension`.
|
|
32
32
|
|
|
33
|
-
### 3.
|
|
33
|
+
### 3. Load Extension in Chrome
|
|
34
|
+
|
|
35
|
+
1. Open Chrome and go to `chrome://extensions`
|
|
36
|
+
2. Enable "Developer mode" (toggle in top right)
|
|
37
|
+
3. Click "Load unpacked"
|
|
38
|
+
4. Select the `~/.gravity-extension` folder
|
|
39
|
+
5. ✅ Done!
|
|
40
|
+
|
|
41
|
+
### 4. Setup Native Host
|
|
34
42
|
|
|
35
43
|
```bash
|
|
36
|
-
gravity setup-native-host
|
|
44
|
+
npx gravity-core setup-native-host
|
|
37
45
|
```
|
|
38
46
|
|
|
39
47
|
This:
|
|
@@ -42,18 +50,10 @@ This:
|
|
|
42
50
|
- Sets up native messaging for Chrome
|
|
43
51
|
- Optionally restarts Chrome
|
|
44
52
|
|
|
45
|
-
### 4. Load Extension in Chrome
|
|
46
|
-
|
|
47
|
-
1. Open Chrome and go to `chrome://extensions`
|
|
48
|
-
2. Enable "Developer mode" (toggle in top right)
|
|
49
|
-
3. Click "Load unpacked"
|
|
50
|
-
4. Select the `~/.gravity-extension` folder
|
|
51
|
-
5. ✅ Done!
|
|
52
|
-
|
|
53
53
|
### 5. Test Connection
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
gravity test-connection
|
|
56
|
+
npx gravity-core test-connection
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
This verifies:
|
|
@@ -160,7 +160,7 @@ Browser Tab (DOM, CSS, Layout data)
|
|
|
160
160
|
|
|
161
161
|
### Fix Offscreen Modal
|
|
162
162
|
|
|
163
|
-
1. Terminal: Run `gravity setup-extension` and `gravity setup-native-host`
|
|
163
|
+
1. Terminal: Run `npx gravity-core setup-extension` and `npx gravity-core setup-native-host`
|
|
164
164
|
2. Chrome: Load extension from `~/.gravity-extension`
|
|
165
165
|
3. Browser: Open page with broken layout
|
|
166
166
|
4. Extension: Click icon → "Connect to Tab" (🟢 Green)
|
|
@@ -186,7 +186,7 @@ Browser Tab (DOM, CSS, Layout data)
|
|
|
186
186
|
Extract the Chrome extension to your home directory:
|
|
187
187
|
|
|
188
188
|
```bash
|
|
189
|
-
gravity setup-extension
|
|
189
|
+
npx gravity-core setup-extension
|
|
190
190
|
```
|
|
191
191
|
|
|
192
192
|
Creates `~/.gravity-extension/` ready to load in Chrome.
|
|
@@ -196,7 +196,7 @@ Creates `~/.gravity-extension/` ready to load in Chrome.
|
|
|
196
196
|
Configure native messaging for Chrome:
|
|
197
197
|
|
|
198
198
|
```bash
|
|
199
|
-
gravity setup-native-host
|
|
199
|
+
npx gravity-core setup-native-host
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
This command:
|
|
@@ -212,7 +212,7 @@ This command:
|
|
|
212
212
|
Verify everything is working:
|
|
213
213
|
|
|
214
214
|
```bash
|
|
215
|
-
gravity test-connection
|
|
215
|
+
npx gravity-core test-connection
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
Checks:
|
|
@@ -228,13 +228,13 @@ Checks:
|
|
|
228
228
|
Run the MCP server (used by your IDE):
|
|
229
229
|
|
|
230
230
|
```bash
|
|
231
|
-
gravity
|
|
231
|
+
npx gravity-core
|
|
232
232
|
```
|
|
233
233
|
|
|
234
234
|
### Show Help
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
gravity --help
|
|
237
|
+
npx gravity-core --help
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
## 🔧 API Reference
|
|
@@ -382,9 +382,9 @@ Contributions welcome! Please open an issue or PR on GitHub.
|
|
|
382
382
|
|
|
383
383
|
```bash
|
|
384
384
|
npm install gravity-core
|
|
385
|
-
gravity setup-extension
|
|
386
|
-
gravity setup-native-host
|
|
387
|
-
gravity test-connection
|
|
385
|
+
npx gravity-core setup-extension
|
|
386
|
+
npx gravity-core setup-native-host
|
|
387
|
+
npx gravity-core test-connection
|
|
388
388
|
```
|
|
389
389
|
|
|
390
390
|
Then configure your IDE and start debugging! 🎉
|
package/dist/mcp-server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gravity-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Gravity - AI-powered CSS layout diagnostics for any IDE. Connect your browser to get real-time layout issue detection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"gravity-core": "dist/cli.js"
|
|
10
|
+
},
|
|
8
11
|
"files": [
|
|
9
12
|
"dist",
|
|
10
13
|
"extension",
|