setclaw 1.0.7 → 1.1.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 CHANGED
@@ -39,7 +39,14 @@ Connect [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Facto
39
39
 
40
40
  ### Install & Configure
41
41
 
42
- Pass your API key during install — everything configures automatically in one command:
42
+ ```bash
43
+ npm i -g setclaw --foreground-scripts
44
+ setclaw <your-quatarly-api-key>
45
+ ```
46
+
47
+ The `--foreground-scripts` flag makes npm show the setup instructions during install. Without it, npm is silent (that's npm's default behavior for lifecycle scripts).
48
+
49
+ **One-liner** — pass your key during install, no second command needed:
43
50
 
44
51
  **Windows (PowerShell):**
45
52
  ```powershell
@@ -51,13 +58,6 @@ $env:QUATARLY_API_KEY="qua_your-key-here"; npm i -g setclaw --foreground-scripts
51
58
  QUATARLY_API_KEY=qua_your-key-here npm i -g setclaw --foreground-scripts
52
59
  ```
53
60
 
54
- Or install first, then run the `setclaw` command separately:
55
-
56
- ```bash
57
- npm i -g setclaw
58
- setclaw qua_your-key-here
59
- ```
60
-
61
61
  That's it. When you run `setclaw`, it will:
62
62
 
63
63
  ```
@@ -1,18 +1,42 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { join } from "path";
4
- import { homedir } from "os";
4
+ import { homedir, platform } from "os";
5
5
  import { writeFileSync, mkdirSync } from "fs";
6
6
 
7
+ // ─── Write first-run marker ───────────────────────────────────────────
7
8
  const markerDir = join(homedir(), ".setclaw");
8
9
  const markerFile = join(markerDir, "pending");
9
10
 
10
11
  try {
11
12
  mkdirSync(markerDir, { recursive: true });
12
- wf(markerFile, "1", "utf-8");
13
+ writeFileSync(markerFile, "1", "utf-8");
13
14
  } catch {}
14
15
 
16
+ // ─── If API key provided, run full setup now ──────────────────────────
15
17
  const apiKey = process.env.QUATARLY_API_KEY;
16
18
  if (apiKey) {
17
19
  await import("./setclaw.js");
20
+ process.exit(0);
18
21
  }
22
+
23
+ // ─── Always print next-step instructions ─────────────────────────────
24
+ // (visible when user runs: npm i -g setclaw --foreground-scripts)
25
+ const w = (msg = "") => process.stdout.write(msg + "\n");
26
+
27
+ w();
28
+ w(" \x1b[1msetclaw\x1b[0m — BOA & Quatarly setup for Claude Code & Factory");
29
+ w(" \x1b[2m─────────────────────────────────────────────────\x1b[0m");
30
+ w();
31
+ w(" \x1b[32m✔ Installed!\x1b[0m Now run:");
32
+ w();
33
+ w(" \x1b[36msetclaw\x1b[0m \x1b[33m<your-quatarly-api-key>\x1b[0m");
34
+ 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "setclaw",
3
- "version": "1.0.7",
3
+ "version": "1.1.0",
4
4
  "description": "BOA & Quatarly setup for Claude Code and Factory",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,5 +26,9 @@
26
26
  "license": "MIT",
27
27
  "engines": {
28
28
  "node": ">=18"
29
+ },
30
+ "funding": {
31
+ "type": "individual",
32
+ "url": "https://api.quatarly.cloud"
29
33
  }
30
34
  }