Auto Config Tool
One command to install and configure Claude Code / Codex, even if your machine doesn't have Node.js yet.
1. Quick Start
macOS / Linux
curl -fsSL https://relay.upthos.com/auto-config/install.sh | bash
Windows PowerShell
irm https://relay.upthos.com/auto-config/install.ps1 | iex
The script will automatically:
- Detect if the system has a usable Node.js (>= 20)
- If not, install Node.js locally in your home directory
- Switch npm to a faster registry for better reliability
- Install Claude Code and Codex
- Write config files (same API Key is used for both Claude Code and Codex)
- Verify installation with a version check
2. Common Options
Non-interactive execution (pass API Key)
macOS / Linux:
curl -fsSL https://relay.upthos.com/auto-config/install.sh | bash -s -- --api-key YOUR_API_KEY
Windows PowerShell (pipe mode, pass via env var):
$env:UPTHOS_API_KEY='YOUR_API_KEY'; irm https://relay.upthos.com/auto-config/install.ps1 | iex
Windows PowerShell (download then execute):
.\install.ps1 --api-key YOUR_API_KEY
Configure Claude Code only
curl -fsSL https://relay.upthos.com/auto-config/install.sh | bash -s -- --api-key YOUR_API_KEY --tools claude
Configure Codex only
curl -fsSL https://relay.upthos.com/auto-config/install.sh | bash -s -- --api-key YOUR_API_KEY --tools codex
Custom API endpoint
If you're using a custom domain:
curl -fsSL https://relay.upthos.com/auto-config/install.sh | bash -s -- --api-key YOUR_API_KEY --base-url https://your-domain.example.com
3. Files Written by the Script
Claude Code
~/.claude/settings.json
Key fields:
{
"env": {
"ANTHROPIC_BASE_URL": "https://relay.upthos.com",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"CLAUDE_CODE_ATTRIBUTION_HEADER": "0"
}
}
Codex
~/.codex/auth.json
~/.codex/config.toml
auth.json:
{
"OPENAI_API_KEY": "YOUR_API_KEY"
}
config.toml:
model_provider = "upthos"
model = "gpt-5.6-sol"
review_model = "gpt-5.6-sol"
model_reasoning_effort = "high"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
model_context_window = 272000
model_auto_compact_token_limit = 272000
effective_context_window_percent = 95
[model_providers.upthos]
name = "upthos"
base_url = "https://relay.upthos.com"
wire_api = "responses"
requires_openai_auth = true
supports_websockets = false
[features]
goals = true
4. Does it require admin privileges?
No.
The script prefers the system Node.js if available. Otherwise, it installs Node.js to your home directory:
- macOS / Linux:
~/.upthosrelay/node - Windows:
%USERPROFILE%\.upthosrelay\node
Client packages are also installed in your home directory, not system-wide.
5. After Installation
macOS / Linux
Run after the script finishes:
source ~/.zshrc
If you're not using zsh, source the profile file shown at the end of the script output.
Windows
Simply reopen a PowerShell window.
6. Verifying the Installation
claude --version
codex --version
If you see a version number, everything is working.
7. Backup & Rollback
If you had existing config files, the script creates .bak backups before overwriting:
~/.claude/settings.json.bak~/.codex/auth.json.bak~/.codex/config.toml.bak
To roll back, simply restore the .bak files.
8. FAQ
Windows says git-bash is required
Claude Code requires git-bash on Windows. The script will auto-detect and install Git for Windows if needed.
How to pass arguments in Windows pipe mode
irm ... | iex doesn't accept trailing arguments. Use environment variables instead:
$env:UPTHOS_API_KEY='YOUR_KEY'; irm https://relay.upthos.com/auto-config/install.ps1 | iex
Without env vars, the script will prompt for API Key interactively.
Can it work without a proxy?
Yes. The script defaults to domestic mirrors first:
- Node.js downloads from npmmirror
- npm registry set to
https://registry.npmmirror.com
If mirrors fail, it falls back to official sources.
I only want to write config files, not install clients
Add --skip-client-install:
curl -fsSL https://relay.upthos.com/auto-config/install.sh | bash -s -- --api-key YOUR_KEY --skip-client-install
Useful when you already have claude or codex installed and just need to reconfigure.
My old config was overwritten
Check for .bak backup files in the same directory. The script creates backups before the first overwrite.
9. Next Steps
- Manual installation walkthrough: Claude Code Quick Start
- Getting started: Quick Start
- Other questions: FAQ