setclaw
v1.3.2
Published
BOA & Quatarly setup for Claude Code and Factory
Maintainers
Readme
setclaw
BOA & Quatarly setup for Claude Code & Factory
Connect Claude Code and Factory AI Droid to Quatarly — access Claude, Gemini, and GPT models with a single API key.
What You Get
| Provider | Models | |:---------|:-------| | Claude | Sonnet 4.6, Opus 4.6 Thinking, Haiku 4.5 | | Gemini | 3.1 Pro, 3 Flash | | GPT | 5.1, 5.1 Codex, 5.1 Codex Max, 5.2, 5.2 Codex, 5.3 Codex |
All 11 models through one Quatarly API key. No separate accounts needed.
Quick Start
Prerequisites
| # | What | How |
|:-:|:-----|:----|
| 1 | Node.js 18+ | nodejs.org |
| 2 | Quatarly API key | Format: qua_trail_... or qua_... |
| 3 | Factory AI (optional) | See Install Factory AI below |
Install & Configure
npx setclaw@latestThat's it. It will prompt for your API key and configure everything in one shot:
setclaw — BOA & Quatarly setup for Claude Code & Factory
─────────────────────────────────────────────────
Enter your Quatarly API key: █Or pass the key directly:
npx setclaw@latest <your-quatarly-api-key>Want the setclaw command available globally for future use?
npm i -g setclaw
setclaw <your-quatarly-api-key>What it does
- ✔ Backs up your current env vars and Factory config to
~/.setclaw/backup.json - ✔ Adds all 11 models to Factory AI Droid
- ✔ Sets env vars system-wide (all users) — falls back to current user if no admin rights
- ✔ Works on Windows, macOS, and Linux
Restore Original Settings
Made a mistake or want to undo everything?
setclaw --restoreThis removes all env vars setclaw set and restores your original Factory config from the backup.
Using Claude Code
1. Install Claude Code
npm i -g @anthropic-ai/claude-code2. Restart Your Terminal
Important: Environment variables are set persistently, but your current shell won't see them until you restart it.
- New terminal — picks up automatically
- Current terminal — run
source ~/.zshrcorsource ~/.bashrc- VS Code / GUI apps — restart the app or log out & back in
3. Launch
claudeClaude Code now routes all requests through Quatarly using your API key and credit balance.
Install Factory AI (Optional)
If you also want custom models inside Factory AI Droid:
Windows (PowerShell):
irm https://app.factory.ai/cli/windows | iexmacOS / Linux:
curl -fsSL https://app.factory.ai/cli | shThen create an account at 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.
Environment Variables Set
| Variable | Value |
|:---------|:------|
| ANTHROPIC_BASE_URL | https://api.quatarly.cloud/ |
| ANTHROPIC_AUTH_TOKEN | your Quatarly API key |
| ANTHROPIC_DEFAULT_HAIKU_MODEL | claude-haiku-4-5-20251001 |
| ANTHROPIC_DEFAULT_SONNET_MODEL | claude-sonnet-4-6-20250929 |
| ANTHROPIC_DEFAULT_OPUS_MODEL | claude-opus-4-6-thinking |
| OS | Location |
|:---|:---------|
| Windows | HKCU\Environment (User-level registry) |
| macOS | ~/.bashrc and ~/.zshrc |
| Linux | ~/.bashrc and ~/.zshrc |
Models Reference
| Model | Provider | Endpoint |
|:------|:---------|:---------|
| claude-sonnet-4-6-20250929 | Anthropic | https://api.quatarly.cloud/ |
| claude-opus-4-6-thinking | Anthropic | https://api.quatarly.cloud/ |
| claude-haiku-4-5-20251001 | Anthropic | https://api.quatarly.cloud/ |
| gemini-3.1-pro | OpenAI-compat | https://api.quatarly.cloud/v1 |
| gemini-3-flash | OpenAI-compat | https://api.quatarly.cloud/v1 |
| gpt-5.1 | OpenAI-compat | https://api.quatarly.cloud/v1 |
| gpt-5.1-codex | OpenAI-compat | https://api.quatarly.cloud/v1 |
| gpt-5.1-codex-max | OpenAI-compat | https://api.quatarly.cloud/v1 |
| gpt-5.2 | OpenAI-compat | https://api.quatarly.cloud/v1 |
| gpt-5.2-codex | OpenAI-compat | https://api.quatarly.cloud/v1 |
| gpt-5.3-codex | OpenAI-compat | https://api.quatarly.cloud/v1 |
FAQ
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.
setclaw --restoreThis reverts all env vars to their pre-setclaw values and restores your original Factory config from ~/.setclaw/backup.json.
No. Claude Code routes through Quatarly — you only need a Quatarly API key.
setclaw detects whether ~/.factory/settings.json exists. If not, it skips Factory setup and only configures Claude Code env vars.
npm uninstall -g setclawTo also remove the env vars:
- Windows: Delete from
HKCU\Environmentvia System Properties > Environment Variables - macOS/Linux: Remove the
# --- Quatarly / Claude Code env ---block from~/.bashrc/~/.zshrc
License
MIT
