User Guide & Documentation
Learn how to use AI CLI Config Studio to connect OpenAI-compatible gateways, discover authorized models, and configure AI coding CLIs with automatic backups.
📖 How to Use AI CLI Config Studio
Setting up your AI coding assistant with a custom gateway takes less than 30 seconds using the 3-step workflow:
Choose one of the quick presets (9Router, OpenRouter, DeepSeek, Groq, Together AI) or type your custom gateway URL into the Base URL input.
Enter your gateway API key into the API Key input and click Fetch Models.
/models endpoint and injected directly into your local clipboard command. It is never stored or transmitted to any third-party server.
- Target Assistant: Choose from Claude Code, Codex CLI, Aider, or OpenCode.
- Target Model: Select your preferred model from the dropdown populated by your gateway.
- Operating System: Choose macOS / Linux (zsh/bash) or Windows (PowerShell).
Click Copy Terminal Command on the right panel. Then open your terminal application and paste the command.
The command will automatically:
- Create a timestamped backup of any existing configuration (e.g.
~/.claude/settings.json.bak-YYYYMMDD-HHMMSS). - Safely merge the gateway URL, authentication key, and model directly into your config file.
- Preserve all of your other custom preferences, tools, and hooks.
💻 CLI Usage & Verification Guides
After running the generated command in your terminal, verify that your assistant is connected to your gateway:
🟣 1. Claude Code (`claude`)
Launch Claude Code and check its active configuration status:
# Start Claude Code in any project
claude
# Inside Claude Code session, check gateway status:
/status
You can also specify models on launch: claude --model <model-name>.
🟢 2. OpenAI Codex CLI (`codex`)
Your settings are saved to ~/.config/codex/config.json. Launch Codex to start generating code:
# Run Codex CLI
codex
# Or pass a single prompt
codex "Refactor the database queries in db.ts to use connection pooling"
🔵 3. Aider (`aider`)
Aider pairs with you in your terminal. Since settings are saved in ~/.aider.conf.yml, simply run:
# Navigate to your git repository and run aider
cd my-project
aider
🟠 4. OpenCode (`opencode`)
OpenCode reads from ~/.config/opencode/opencode.json. Launch it with:
# Start OpenCode TUI
opencode
⏪ Restoring Previous Backups
Every time you generate and run a command, an automatic timestamped backup is made before modifying any files.
To revert to your previous configuration:
- Go to the Studio page.
- Expand the Restore Previous Config accordion below the terminal preview.
- Click Copy Restore Command.
- Paste and run the command in your terminal. It will automatically detect and reinstate your most recent
.bak-*file.
📁 Configuration File Locations & Schema
Below are the persistent configuration paths and schemas managed by AI CLI Config Studio:
| CLI Tool | macOS / Linux Path | Windows Path | Key Attributes Configured |
|---|---|---|---|
| Claude Code | ~/.claude/settings.json |
$HOME\.claude\settings.json |
env.ANTHROPIC_BASE_URL, env.ANTHROPIC_AUTH_TOKEN, env.ANTHROPIC_MODEL |
| Codex CLI | ~/.config/codex/config.json |
$HOME\.config\codex\config.json |
baseUrl, apiKey, model |
| Aider | ~/.aider.conf.yml |
$HOME\.aider.conf.yml |
openai-api-base, openai-api-key, model |
| OpenCode | ~/.config/opencode/opencode.json |
$HOME\.config\opencode\opencode.json |
model, provider.openai.baseUrl, provider.openai.apiKey |
🌐 Supported Gateways & Presets
AI CLI Config Studio works with any provider that exposes an OpenAI-compliant GET /models endpoint. Built-in presets include:
- 9Router:
https://api.9router.com/v1 - OpenRouter:
https://openrouter.ai/api/v1 - DeepSeek:
https://api.deepseek.com/v1 - Groq:
https://api.groq.com/openai/v1 - Together AI:
https://api.together.xyz/v1
🛡️ Privacy & Security Guarantees
- In-Memory Only: API keys are never stored on disk, never logged to terminal history on the server, and never sent to remote analytics.
- Zero Telemetry: No tracking cookies, external analytics, or remote logging.
- SSRF Hardening: Built-in server proxy blocks any requests targeting internal LANs,
localhost, or loopback interfaces.
🐳 Running Locally or with Docker
Local Bun Server
bun install
bun run dev
Docker Compose
docker compose up -d
Run Directly from GitHub (No Clone Needed)
docker compose -f docker-compose.git.yml up -d