Nexa Setup CLI
Connect Codex CLI, Codex App / IDE, Claude Code, Claude Desktop, and OpenCode to Nexa with one interactive command. No manual JSON editing or secret exposure required.
Quick Run
Run directly with npx without prior installation:
npx --yes https://api.nexabase.xyz/downloads/nexa-setup-latest.tgznpx.cmd --yes https://api.nexabase.xyz/downloads/nexa-setup-latest.tgzRequirements
- Node.js 20+ (LTS recommended).
- A Nexa API key from Dashboard → API keys.
- The AI client tool you want to connect (Codex, Claude, etc.) installed on your machine.
Supported Clients
| Client | Identifier | What Gets Configured |
|---|---|---|
| Codex CLI | codex-cli | Configures ~/.codex/config.json, preserves existing auth.json. |
| Codex App / IDE | codex-app | Configures Codex IDE / desktop extensions with Nexa provider. |
| Claude Code | claude-code | Configures Claude CLI provider endpoints and environment. |
| Claude Desktop | claude-desktop | Updates claude_desktop_config.json with Nexa provider settings. |
| OpenCode | opencode | Configures ~/.config/opencode/config.json for openai-compatible gateway. |
How It Works
Before modifying any tool config file, a timestamped backup is created. If anything fails or you cancel, your original configuration remains untouched.
On launch, nexa automatically inspects available frontier models and updates tool catalogs with latest context limits and pricing weights.
Keys are masked in the terminal during entry and stored strictly in private user-restricted local files (0600 permissions on Unix).
Detects running client instances and offers to gracefully restart them so new provider credentials take effect immediately.
Managing Settings: nexa set
After the initial run, the nexa command is available in any terminal window. Type:
nexa setThis opens an interactive menu allowing you to:
- Update or rotate your Nexa API key
- Toggle automatic model list synchronization
- Toggle automatic self-updating
- Select default coding tools
CLI Flags & Non-interactive Mode
| Flag | Description |
|---|---|
--clients <list> | Comma-separated list of clients to configure (e.g. --clients codex-cli,claude-code). |
--no-update | Skip the online version and model check for offline or air-gapped environments. |
--help | Display help and version information. |