@react-grab/cli 0.1.44-dev.f5093a4 → 0.1.44-dev.f610e2f
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/dist/cli.cjs +6 -6
- package/dist/cli.js +6 -6
- package/package.json +1 -1
- package/skills/react-grab/SKILL.md +31 -10
package/dist/cli.cjs
CHANGED
|
@@ -519,7 +519,7 @@ const removeSkill = async ({ cwd = process.cwd(), global = false } = {}) => {
|
|
|
519
519
|
};
|
|
520
520
|
//#endregion
|
|
521
521
|
//#region src/commands/add.ts
|
|
522
|
-
const VERSION$5 = "0.1.44-dev.
|
|
522
|
+
const VERSION$5 = "0.1.44-dev.f610e2f";
|
|
523
523
|
const add = new commander.Command().name("add").alias("install").description("install the React Grab skill for your agent").option("-y, --yes", "skip confirmation prompts", false).option("-c, --cwd <cwd>", "working directory (defaults to current directory)", process.cwd()).option("-g, --global", "install the skill globally instead of in the project", false).action(async (opts) => {
|
|
524
524
|
console.log(`${picocolors.default.magenta("✿")} ${picocolors.default.bold("React Grab")} ${picocolors.default.gray(VERSION$5)}`);
|
|
525
525
|
console.log();
|
|
@@ -1138,7 +1138,7 @@ const formatActivationKeyDisplay = (activationKey) => {
|
|
|
1138
1138
|
};
|
|
1139
1139
|
//#endregion
|
|
1140
1140
|
//#region src/commands/configure.ts
|
|
1141
|
-
const VERSION$4 = "0.1.44-dev.
|
|
1141
|
+
const VERSION$4 = "0.1.44-dev.f610e2f";
|
|
1142
1142
|
const isMac = process.platform === "darwin";
|
|
1143
1143
|
const META_LABEL = isMac ? "Cmd" : "Win";
|
|
1144
1144
|
const ALT_LABEL = isMac ? "Option" : "Alt";
|
|
@@ -1763,7 +1763,7 @@ const isTelemetryEnabled = () => {
|
|
|
1763
1763
|
};
|
|
1764
1764
|
//#endregion
|
|
1765
1765
|
//#region src/commands/init.ts
|
|
1766
|
-
const VERSION$3 = "0.1.44-dev.
|
|
1766
|
+
const VERSION$3 = "0.1.44-dev.f610e2f";
|
|
1767
1767
|
const REPORT_URL = "https://react-grab.com/api/report-cli";
|
|
1768
1768
|
const DOCS_URL = "https://github.com/aidenybai/react-grab";
|
|
1769
1769
|
const reportToCli = (type, config, error) => {
|
|
@@ -2713,7 +2713,7 @@ const pull = new commander.Command().name("pull").description("start the watcher
|
|
|
2713
2713
|
});
|
|
2714
2714
|
//#endregion
|
|
2715
2715
|
//#region src/commands/remove.ts
|
|
2716
|
-
const VERSION$2 = "0.1.44-dev.
|
|
2716
|
+
const VERSION$2 = "0.1.44-dev.f610e2f";
|
|
2717
2717
|
const remove = new commander.Command().name("remove").description("uninstall the React Grab skill from your agent").option("-c, --cwd <cwd>", "working directory (defaults to current directory)", process.cwd()).option("-g, --global", "remove the globally-installed skill instead of the project's", false).action(async (opts) => {
|
|
2718
2718
|
console.log(`${picocolors.default.magenta("✿")} ${picocolors.default.bold("React Grab")} ${picocolors.default.gray(VERSION$2)}`);
|
|
2719
2719
|
console.log();
|
|
@@ -2741,7 +2741,7 @@ const stop = new commander.Command().name("stop").description("stop the React Gr
|
|
|
2741
2741
|
});
|
|
2742
2742
|
//#endregion
|
|
2743
2743
|
//#region src/commands/upgrade.ts
|
|
2744
|
-
const VERSION$1 = "0.1.44-dev.
|
|
2744
|
+
const VERSION$1 = "0.1.44-dev.f610e2f";
|
|
2745
2745
|
const NPM_REGISTRY_URL = "https://registry.npmjs.org/react-grab/latest";
|
|
2746
2746
|
const fetchLatestVersion = async () => {
|
|
2747
2747
|
try {
|
|
@@ -2853,7 +2853,7 @@ const watch = new commander.Command().name("watch").description("run the React G
|
|
|
2853
2853
|
});
|
|
2854
2854
|
//#endregion
|
|
2855
2855
|
//#region src/cli.ts
|
|
2856
|
-
const VERSION = "0.1.44-dev.
|
|
2856
|
+
const VERSION = "0.1.44-dev.f610e2f";
|
|
2857
2857
|
const VERSION_API_URL = "https://www.react-grab.com/api/version";
|
|
2858
2858
|
process.on("SIGINT", () => process.exit(0));
|
|
2859
2859
|
process.on("SIGTERM", () => process.exit(0));
|
package/dist/cli.js
CHANGED
|
@@ -491,7 +491,7 @@ const removeSkill = async ({ cwd = process.cwd(), global = false } = {}) => {
|
|
|
491
491
|
};
|
|
492
492
|
//#endregion
|
|
493
493
|
//#region src/commands/add.ts
|
|
494
|
-
const VERSION$5 = "0.1.44-dev.
|
|
494
|
+
const VERSION$5 = "0.1.44-dev.f610e2f";
|
|
495
495
|
const add$1 = new Command().name("add").alias("install").description("install the React Grab skill for your agent").option("-y, --yes", "skip confirmation prompts", false).option("-c, --cwd <cwd>", "working directory (defaults to current directory)", process.cwd()).option("-g, --global", "install the skill globally instead of in the project", false).action(async (opts) => {
|
|
496
496
|
console.log(`${pc.magenta("✿")} ${pc.bold("React Grab")} ${pc.gray(VERSION$5)}`);
|
|
497
497
|
console.log();
|
|
@@ -1110,7 +1110,7 @@ const formatActivationKeyDisplay = (activationKey) => {
|
|
|
1110
1110
|
};
|
|
1111
1111
|
//#endregion
|
|
1112
1112
|
//#region src/commands/configure.ts
|
|
1113
|
-
const VERSION$4 = "0.1.44-dev.
|
|
1113
|
+
const VERSION$4 = "0.1.44-dev.f610e2f";
|
|
1114
1114
|
const isMac = process.platform === "darwin";
|
|
1115
1115
|
const META_LABEL = isMac ? "Cmd" : "Win";
|
|
1116
1116
|
const ALT_LABEL = isMac ? "Option" : "Alt";
|
|
@@ -1735,7 +1735,7 @@ const isTelemetryEnabled = () => {
|
|
|
1735
1735
|
};
|
|
1736
1736
|
//#endregion
|
|
1737
1737
|
//#region src/commands/init.ts
|
|
1738
|
-
const VERSION$3 = "0.1.44-dev.
|
|
1738
|
+
const VERSION$3 = "0.1.44-dev.f610e2f";
|
|
1739
1739
|
const REPORT_URL = "https://react-grab.com/api/report-cli";
|
|
1740
1740
|
const DOCS_URL = "https://github.com/aidenybai/react-grab";
|
|
1741
1741
|
const reportToCli = (type, config, error) => {
|
|
@@ -2685,7 +2685,7 @@ const pull = new Command().name("pull").description("start the watcher if needed
|
|
|
2685
2685
|
});
|
|
2686
2686
|
//#endregion
|
|
2687
2687
|
//#region src/commands/remove.ts
|
|
2688
|
-
const VERSION$2 = "0.1.44-dev.
|
|
2688
|
+
const VERSION$2 = "0.1.44-dev.f610e2f";
|
|
2689
2689
|
const remove = new Command().name("remove").description("uninstall the React Grab skill from your agent").option("-c, --cwd <cwd>", "working directory (defaults to current directory)", process.cwd()).option("-g, --global", "remove the globally-installed skill instead of the project's", false).action(async (opts) => {
|
|
2690
2690
|
console.log(`${pc.magenta("✿")} ${pc.bold("React Grab")} ${pc.gray(VERSION$2)}`);
|
|
2691
2691
|
console.log();
|
|
@@ -2713,7 +2713,7 @@ const stop = new Command().name("stop").description("stop the React Grab watcher
|
|
|
2713
2713
|
});
|
|
2714
2714
|
//#endregion
|
|
2715
2715
|
//#region src/commands/upgrade.ts
|
|
2716
|
-
const VERSION$1 = "0.1.44-dev.
|
|
2716
|
+
const VERSION$1 = "0.1.44-dev.f610e2f";
|
|
2717
2717
|
const NPM_REGISTRY_URL = "https://registry.npmjs.org/react-grab/latest";
|
|
2718
2718
|
const fetchLatestVersion = async () => {
|
|
2719
2719
|
try {
|
|
@@ -2825,7 +2825,7 @@ const watch = new Command().name("watch").description("run the React Grab captur
|
|
|
2825
2825
|
});
|
|
2826
2826
|
//#endregion
|
|
2827
2827
|
//#region src/cli.ts
|
|
2828
|
-
const VERSION = "0.1.44-dev.
|
|
2828
|
+
const VERSION = "0.1.44-dev.f610e2f";
|
|
2829
2829
|
const VERSION_API_URL = "https://www.react-grab.com/api/version";
|
|
2830
2830
|
process.on("SIGINT", () => process.exit(0));
|
|
2831
2831
|
process.on("SIGTERM", () => process.exit(0));
|
package/package.json
CHANGED
|
@@ -11,9 +11,9 @@ description: >-
|
|
|
11
11
|
# React Grab
|
|
12
12
|
|
|
13
13
|
The user selects UI elements in their browser and copies them with React Grab.
|
|
14
|
-
`npx grab pull` waits for new grabs and prints each as one line of
|
|
15
|
-
one, sometimes a few if several were copied), starting the
|
|
16
|
-
automatically the first time. Run it in a loop.
|
|
14
|
+
`npx react-grab@latest pull` waits for new grabs and prints each as one line of
|
|
15
|
+
JSON (usually one, sometimes a few if several were copied), starting the
|
|
16
|
+
background watcher automatically the first time. Run it in a loop.
|
|
17
17
|
|
|
18
18
|
## The loop
|
|
19
19
|
|
|
@@ -22,17 +22,40 @@ Repeat until the user says stop:
|
|
|
22
22
|
1. Wait for the next grab:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
npx grab pull
|
|
25
|
+
npx react-grab@latest pull --max-age 0
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
It blocks until the user grabs something, then prints the new grab(s) — one JSON
|
|
29
|
-
object per line.
|
|
30
|
-
|
|
31
|
-
the
|
|
29
|
+
object per line. `--max-age 0` is important: it delivers every grab regardless of
|
|
30
|
+
age, so a comment the user added while you were busy on the previous task isn't
|
|
31
|
+
silently dropped (the default skips grabs older than ~5 min as stale). Act on
|
|
32
|
+
every line. If your shell cancels the command before a grab arrives, just run it
|
|
33
|
+
again — nothing is lost; the watcher keeps capturing in the background and `pull`
|
|
34
|
+
resumes where it left off.
|
|
32
35
|
|
|
33
36
|
2. Act on the grab (below).
|
|
34
37
|
3. Go back to step 1.
|
|
35
38
|
|
|
39
|
+
## A new grab while you're working wins
|
|
40
|
+
|
|
41
|
+
The watcher never stops capturing — including while you're mid-task. A grab the
|
|
42
|
+
user makes before you finish is them redirecting you, so it supersedes whatever
|
|
43
|
+
you're doing. Don't make them wait for the old task to finish.
|
|
44
|
+
|
|
45
|
+
While acting on a grab:
|
|
46
|
+
|
|
47
|
+
- Run anything slow (dev servers, builds, installs, test runs) as a background
|
|
48
|
+
process, never a blocking foreground call, so you stay free to notice new grabs.
|
|
49
|
+
- Between steps, peek without blocking:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx react-grab@latest pull --max-age 0 --wait 0
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Empty output means nothing new — keep going. If it prints a grab, the user has
|
|
56
|
+
moved on: stop the current task, cancel any background processes you started for
|
|
57
|
+
it, and act on the newest grab instead.
|
|
58
|
+
|
|
36
59
|
## Acting on a grab
|
|
37
60
|
|
|
38
61
|
Each grab JSON has `content` (the element's source references) and, in prompt
|
|
@@ -50,12 +73,10 @@ mode, `prompt` (the user's typed instruction):
|
|
|
50
73
|
When the user says stop, run this and don't pull again:
|
|
51
74
|
|
|
52
75
|
```bash
|
|
53
|
-
npx grab stop
|
|
76
|
+
npx react-grab@latest stop
|
|
54
77
|
```
|
|
55
78
|
|
|
56
79
|
## Notes
|
|
57
80
|
|
|
58
81
|
- The watcher reads the clipboard on the machine it runs on — run it on the same
|
|
59
82
|
machine as the browser, not over SSH or in a remote container.
|
|
60
|
-
- Grabs older than ~5 minutes are skipped as stale; use `npx grab pull --max-age 0`
|
|
61
|
-
to deliver every grab regardless of age.
|