setclaw 1.3.0 → 1.3.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 +29 -1
- package/bin/setclaw.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,6 +65,23 @@ npm i -g setclaw
|
|
|
65
65
|
setclaw <your-quatarly-api-key>
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
### What it does
|
|
69
|
+
|
|
70
|
+
- ✔ Backs up your current env vars and Factory config to `~/.setclaw/backup.json`
|
|
71
|
+
- ✔ Adds all 11 models to Factory AI Droid
|
|
72
|
+
- ✔ Sets env vars **system-wide** (all users) — falls back to current user if no admin rights
|
|
73
|
+
- ✔ Works on Windows, macOS, and Linux
|
|
74
|
+
|
|
75
|
+
### Restore Original Settings
|
|
76
|
+
|
|
77
|
+
Made a mistake or want to undo everything?
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
setclaw --restore
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This removes all env vars setclaw set and restores your original Factory config from the backup.
|
|
84
|
+
|
|
68
85
|
---
|
|
69
86
|
|
|
70
87
|
## Using Claude Code
|
|
@@ -157,7 +174,18 @@ Then create an account at [app.factory.ai](https://app.factory.ai), run `droid`
|
|
|
157
174
|
<details>
|
|
158
175
|
<summary><b>Can I run it again with a different API key?</b></summary>
|
|
159
176
|
|
|
160
|
-
Yes. Just run `npx setclaw@latest <new-key>` again — it updates existing models and env vars without creating duplicates. A backup
|
|
177
|
+
Yes. Just run `npx setclaw@latest <new-key>` or `setclaw <new-key>` again — it updates existing models and env vars without creating duplicates. A fresh backup is saved before every run.
|
|
178
|
+
|
|
179
|
+
</details>
|
|
180
|
+
|
|
181
|
+
<details>
|
|
182
|
+
<summary><b>How do I restore my original settings?</b></summary>
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
setclaw --restore
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
This reverts all env vars to their pre-setclaw values and restores your original Factory config from `~/.setclaw/backup.json`.
|
|
161
189
|
|
|
162
190
|
</details>
|
|
163
191
|
|
package/bin/setclaw.js
CHANGED
|
@@ -56,7 +56,10 @@ out("");
|
|
|
56
56
|
|
|
57
57
|
const args = process.argv.slice(2);
|
|
58
58
|
const restore = args.includes("--restore");
|
|
59
|
-
|
|
59
|
+
|
|
60
|
+
// Only treat an arg as API key if it doesn't start with - and looks like a key
|
|
61
|
+
const keyArg = args.find(a => !a.startsWith("-") && a.length > 8);
|
|
62
|
+
const apiKey = !restore ? (process.env.QUATARLY_API_KEY || keyArg) : null;
|
|
60
63
|
|
|
61
64
|
// ─── First-run detection ──────────────────────────────────────────────
|
|
62
65
|
|