setclaw 1.1.1 → 1.2.1
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 +13 -81
- package/bin/postinstall.mjs +0 -1
- package/bin/setclaw.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Connect [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Facto
|
|
|
9
9
|
[](https://www.npmjs.com/package/setclaw)
|
|
10
10
|
[](https://nodejs.org)
|
|
11
11
|
[](./LICENSE)
|
|
12
|
-
[](https://www.npmjs.com/package/setclaw)
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
@@ -35,62 +35,34 @@ Connect [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Facto
|
|
|
35
35
|
|:-:|:-----|:----|
|
|
36
36
|
| 1 | **Node.js 18+** | [nodejs.org](https://nodejs.org) |
|
|
37
37
|
| 2 | **Quatarly API key** | Format: `qua_trail_...` or `qua_...` |
|
|
38
|
-
| 3 | **Factory AI** *(optional)* | See [Install Factory](#install-factory-ai-optional) below |
|
|
38
|
+
| 3 | **Factory AI** *(optional)* | See [Install Factory AI](#install-factory-ai-optional) below |
|
|
39
39
|
|
|
40
40
|
### Install & Configure
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
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:
|
|
50
|
-
|
|
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
|
-
```bash
|
|
58
|
-
QUATARLY_API_KEY=qua_your-key-here npm i -g setclaw --foreground-scripts
|
|
43
|
+
npx setclaw@latest
|
|
59
44
|
```
|
|
60
45
|
|
|
61
|
-
That's it.
|
|
46
|
+
That's it. It will prompt for your API key and configure everything in one shot:
|
|
62
47
|
|
|
63
48
|
```
|
|
64
49
|
setclaw — BOA & Quatarly setup for Claude Code & Factory
|
|
65
50
|
─────────────────────────────────────────────────
|
|
66
51
|
|
|
67
|
-
|
|
68
|
-
✔ Factory: 11 models added, 0 updated (11 total)
|
|
69
|
-
✔ Backup saved to ~/.factory/settings.json.backup
|
|
70
|
-
> Setting Claude Code environment variables...
|
|
71
|
-
✔ Env vars written to Windows registry (HKCU\Environment).
|
|
72
|
-
|
|
73
|
-
Environment variables set:
|
|
74
|
-
ANTHROPIC_BASE_URL = https://api.quatarly.cloud/
|
|
75
|
-
ANTHROPIC_AUTH_TOKEN = qua_trai...
|
|
76
|
-
ANTHROPIC_DEFAULT_HAIKU_MODEL = claude-haiku-4-5-20251001
|
|
77
|
-
ANTHROPIC_DEFAULT_SONNET_MODEL = claude-sonnet-4-6-20250929
|
|
78
|
-
ANTHROPIC_DEFAULT_OPUS_MODEL = claude-opus-4-6-thinking
|
|
79
|
-
|
|
80
|
-
✔ All done! Restart your terminal, then launch Claude Code.
|
|
52
|
+
Enter your Quatarly API key: █
|
|
81
53
|
```
|
|
82
54
|
|
|
83
|
-
|
|
55
|
+
Or pass the key directly:
|
|
84
56
|
|
|
85
57
|
```bash
|
|
86
|
-
setclaw
|
|
87
|
-
# Enter your Quatarly API key: █
|
|
58
|
+
npx setclaw@latest <your-quatarly-api-key>
|
|
88
59
|
```
|
|
89
60
|
|
|
90
|
-
|
|
61
|
+
Want the `setclaw` command available globally for future use?
|
|
91
62
|
|
|
92
63
|
```bash
|
|
93
|
-
|
|
64
|
+
npm i -g setclaw
|
|
65
|
+
setclaw <your-quatarly-api-key>
|
|
94
66
|
```
|
|
95
67
|
|
|
96
68
|
---
|
|
@@ -135,13 +107,7 @@ irm https://app.factory.ai/cli/windows | iex
|
|
|
135
107
|
curl -fsSL https://app.factory.ai/cli | sh
|
|
136
108
|
```
|
|
137
109
|
|
|
138
|
-
Then create an account at [app.factory.ai](https://app.factory.ai), run `droid` once to generate `~/.factory/settings.json`, and
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
npm i -g setclaw
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
`setclaw` will detect the Factory config and inject all 11 models automatically.
|
|
110
|
+
Then create an account at [app.factory.ai](https://app.factory.ai), run `droid` once to generate `~/.factory/settings.json`, then run `setclaw` — it will detect the Factory config and inject all 11 models automatically.
|
|
145
111
|
|
|
146
112
|
---
|
|
147
113
|
|
|
@@ -186,46 +152,12 @@ npm i -g setclaw
|
|
|
186
152
|
|
|
187
153
|
---
|
|
188
154
|
|
|
189
|
-
## Manual Setup (Without setclaw)
|
|
190
|
-
|
|
191
|
-
<details>
|
|
192
|
-
<summary><b>macOS / Linux</b></summary>
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
export ANTHROPIC_BASE_URL="https://api.quatarly.cloud/"
|
|
196
|
-
export ANTHROPIC_AUTH_TOKEN="qua_trail_your-key-here"
|
|
197
|
-
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
|
|
198
|
-
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4-6-20250929"
|
|
199
|
-
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4-6-thinking"
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Add these to `~/.zshrc` or `~/.bashrc` to persist.
|
|
203
|
-
|
|
204
|
-
</details>
|
|
205
|
-
|
|
206
|
-
<details>
|
|
207
|
-
<summary><b>Windows (PowerShell)</b></summary>
|
|
208
|
-
|
|
209
|
-
```powershell
|
|
210
|
-
$env:ANTHROPIC_BASE_URL = "https://api.quatarly.cloud/"
|
|
211
|
-
$env:ANTHROPIC_AUTH_TOKEN = "qua_trail_your-key-here"
|
|
212
|
-
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = "claude-haiku-4-5-20251001"
|
|
213
|
-
$env:ANTHROPIC_DEFAULT_SONNET_MODEL = "claude-sonnet-4-6-20250929"
|
|
214
|
-
$env:ANTHROPIC_DEFAULT_OPUS_MODEL = "claude-opus-4-6-thinking"
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
To persist, use `[System.Environment]::SetEnvironmentVariable("VAR", "value", "User")` for each.
|
|
218
|
-
|
|
219
|
-
</details>
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
155
|
## FAQ
|
|
224
156
|
|
|
225
157
|
<details>
|
|
226
158
|
<summary><b>Can I run it again with a different API key?</b></summary>
|
|
227
159
|
|
|
228
|
-
Yes. Just run `setclaw <new-key>` again — it updates existing models and env vars without creating duplicates. A backup of your Factory settings is saved before any changes.
|
|
160
|
+
Yes. Just run `npx setclaw@latest <new-key>` again — it updates existing models and env vars without creating duplicates. A backup of your Factory settings is saved before any changes.
|
|
229
161
|
|
|
230
162
|
</details>
|
|
231
163
|
|
|
@@ -250,7 +182,7 @@ No. Claude Code routes through Quatarly — you only need a Quatarly API key.
|
|
|
250
182
|
npm uninstall -g setclaw
|
|
251
183
|
```
|
|
252
184
|
|
|
253
|
-
|
|
185
|
+
To also remove the env vars:
|
|
254
186
|
- **Windows:** Delete from `HKCU\Environment` via System Properties > Environment Variables
|
|
255
187
|
- **macOS/Linux:** Remove the `# --- Quatarly / Claude Code env ---` block from `~/.bashrc` / `~/.zshrc`
|
|
256
188
|
|
package/bin/postinstall.mjs
CHANGED
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
|
|