setclaw 1.1.0 → 1.2.0
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 +4 -11
- package/bin/postinstall.mjs +5 -14
- package/bin/setclaw.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,22 +40,15 @@ Connect [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Facto
|
|
|
40
40
|
### Install & Configure
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
44
|
-
setclaw <your-quatarly-api-key>
|
|
43
|
+
npx setclaw@latest
|
|
45
44
|
```
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
That's it. It will prompt for your API key and configure everything in one shot.
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
Want the `setclaw` command available globally for future use?
|
|
50
49
|
|
|
51
|
-
**Windows (PowerShell):**
|
|
52
|
-
```powershell
|
|
53
|
-
$env:QUATARLY_API_KEY="qua_your-key-here"; npm i -g setclaw --foreground-scripts
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**macOS / Linux:**
|
|
57
50
|
```bash
|
|
58
|
-
|
|
51
|
+
npm i -g setclaw
|
|
59
52
|
```
|
|
60
53
|
|
|
61
54
|
That's it. When you run `setclaw`, it will:
|
package/bin/postinstall.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { join } from "path";
|
|
4
|
-
import { homedir
|
|
4
|
+
import { homedir } from "os";
|
|
5
5
|
import { writeFileSync, mkdirSync } from "fs";
|
|
6
6
|
|
|
7
7
|
// ─── Write first-run marker ───────────────────────────────────────────
|
|
@@ -20,23 +20,14 @@ if (apiKey) {
|
|
|
20
20
|
process.exit(0);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
// ───
|
|
24
|
-
// (visible when user runs: npm i -g setclaw --foreground-scripts)
|
|
23
|
+
// ─── Print next-step instructions ────────────────────────────────────
|
|
25
24
|
const w = (msg = "") => process.stdout.write(msg + "\n");
|
|
26
25
|
|
|
27
26
|
w();
|
|
28
|
-
w(" \x1b[1msetclaw\x1b[0m
|
|
29
|
-
w(" \x1b[2m
|
|
27
|
+
w(" \x1b[1msetclaw\x1b[0m \u2014 BOA & Quatarly setup for Claude Code & Factory");
|
|
28
|
+
w(" \x1b[2m\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\x1b[0m");
|
|
30
29
|
w();
|
|
31
|
-
w(" \x1b[32m
|
|
30
|
+
w(" \x1b[32m\u2714 Installed!\x1b[0m Now run:");
|
|
32
31
|
w();
|
|
33
32
|
w(" \x1b[36msetclaw\x1b[0m \x1b[33m<your-quatarly-api-key>\x1b[0m");
|
|
34
33
|
w();
|
|
35
|
-
if (platform() === "win32") {
|
|
36
|
-
w(" \x1b[2mor with env var:\x1b[0m");
|
|
37
|
-
w(' \x1b[2m$env:QUATARLY_API_KEY="<key>"; npm i -g setclaw --foreground-scripts\x1b[0m');
|
|
38
|
-
} else {
|
|
39
|
-
w(" \x1b[2mor with env var:\x1b[0m");
|
|
40
|
-
w(" \x1b[2mQUATARLY_API_KEY=<key> npm i -g setclaw --foreground-scripts\x1b[0m");
|
|
41
|
-
}
|
|
42
|
-
w();
|
package/bin/setclaw.js
CHANGED
|
@@ -36,9 +36,13 @@ function warn(msg) { err(`\x1b[33m!\x1b[0m ${msg}`); }
|
|
|
36
36
|
function fail(msg) { err(`\x1b[31m✖\x1b[0m ${msg}`); }
|
|
37
37
|
|
|
38
38
|
// ─── First-run detection ──────────────────────────────────────────────
|
|
39
|
+
// If run via npx (npm_execpath contains 'npx' or no global install marker),
|
|
40
|
+
// skip the first-run gate and always go interactive.
|
|
39
41
|
|
|
40
42
|
const markerFile = join(homedir(), ".setclaw", "pending");
|
|
41
|
-
const
|
|
43
|
+
const isNpx = (process.env.npm_execpath || "").includes("npx") ||
|
|
44
|
+
process.argv[1].includes("_npx");
|
|
45
|
+
const isFirstRun = !isNpx && existsSync(markerFile);
|
|
42
46
|
|
|
43
47
|
// ─── Banner ──────────────────────────────────────────────────────────
|
|
44
48
|
|