nexus-ai-cli
v2.6.7
Published
Nexus AI: The universal setup tool for configuring Claude Code, Codex, and OpenCode with any API endpoint
Maintainers
Readme
Nexus AI Setup Tool
Quick Start • Features • How It Works • Documentation • Support
🎯 Quick Start
npx nexus-ai-cli@latestThat's it! The interactive CLI will guide you through the entire setup process.
✨ Features
🔍 Smart Detection
- Auto-detects installed AI tools
- Identifies your OS and shell
- Checks existing configurations
🔧 Automated Setup
- Interactive configuration wizard
- API key creation guidance
- Environment variable management
🔐 Secure & Safe
- Automatic configuration backups
- Secure API key storage
- Project-level isolation support
🌍 Universal Support
- Works on macOS, Linux, Windows
- Supports bash, zsh, fish, PowerShell
- System or project-level configs
📊 How It Works
🔄 Setup Process Flow
┌──────────────────────────────────────────────────────┐
│ npx nexus-ai-cli │
└────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────┐
│ 🔍 Environment Detection │
├──────────────────────────────────────────────────────┤
│ • Operating System (Mac/Linux/Win) │
│ • Shell Type (bash/zsh/fish/PS) │
│ • Installed Tools (Claude/Codex/OpenCode) │
└────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────┐
│ 🌐 Endpoint Selection │
├──────────────────────────────────────────────────────┤
│ Select your API provider: │
│ • Anthropic Official │
│ • OpenAI Compatible │
│ • Custom Base URL │
└────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────┐
│ 🔑 API Key Setup │
├──────────────────────────────────────────────────────┤
│ Enter your API key for the selected provider │
└────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────┐
│ ⚙️ Configuration Choice │
├──────────────────────────────────────────────────────┤
│ Tool Selection: │
│ • Claude Code │
│ • Codex/Windsurf │
│ • OpenCode │
│ │
│ Setup Level: │
│ • System (Global) │
│ • Project (Local) │
└────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────┐
│ 📝 Apply Configuration │
├──────────────────────────────────────────────────────┤
│ • Create/update config files │
│ • Set environment variables │
│ • Backup existing configs │
│ • Reload shell if needed │
└────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────┐
│ ✅ Complete! │
└──────────────────────────────────────────────────────┘📦 Installation Options
# Latest version
npx nexus-ai-cli@latest
# Or specific version
npx [email protected]# Install globally
npm install -g nexus-ai-cli
# Run
# Run
nexus-ai-cli anywhere# Clear cache if needed
npm cache clean --force
# Run with explicit# PowerShell / CMD
npx nexus-ai-cli@latest
# If issues arise:
cmd /c "npx nexus-ai-cli"🔧 Configuration Details
Configuration Levels
| Level | Claude Code | Codex/Windsurf | OpenCode | Scope |
|-------|------------|----------------|----------|-------|
| System | ~/.claude/settings.json | ~/.codex/config.toml | ~/.opencode/config.json | All projects |
| Project | ./.claude/settings.json | N/A | ./.opencode/config.json | Current project only |
What Gets Configured
{
"env": {
"ANTHROPIC_BASE_URL": "Your Selected URL",
"ANTHROPIC_API_KEY": "your-key"
}
}[api]
base_url = "Your Selected URL/v1"
env_key = "AI_API_KEY"
provider = "custom"
[model_providers.custom]
name = "Custom AI Provider"
base_url = "Your Selected URL/v1"
env_key = "AI_API_KEY"🚦 Setup Flow
Step 1: Endpoint and API Key
The tool supports various AI providers. Select your provider and enter the corresponding API key.
Supported Endpoint Types:
- Anthropic Official:
https://api.anthropic.com - OpenAI Compatible: Use any custom OpenAI-compatible base URL.
- Custom: Enter any custom base URL for your AI provider.
📋 Quick Steps:
- Run: Start the tool with
npx nexus-ai-cli@latest. - Select: Choose your endpoint type.
- Key: Enter your API key when prompted.
- Done: The tool validates the format and saves your configuration.
Step 2: Choose Your Configuration
| Question | Options | Result | |----------|---------|--------| | Which tool? | Claude Code / Codex / Both | Configures selected tools | | Setup level? | System / Project | Determines config location | | Confirm? | Yes / No | Applies configuration |
📋 Prerequisites
Before running the setup tool, ensure you have installed:
Claude Code
Desktop AI coding assistant
Codex/Windsurf
AI-powered code editor
🛠️ Advanced Usage
Environment Variables
# Enable debug output
DEBUG=* npx nexus-ai-cli
# Skip welcome banner
NO_BANNER=1 npx nexus-ai-cli
# Combine options
DEBUG=* NO_BANNER=1 npx nexus-ai-cliManual Configuration
If you prefer manual setup, edit these files directly:
Location: ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "your-base-url",
"ANTHROPIC_API_KEY": "your-api-key-here"
},
"customApiKeyResponses": {
"approved": ["last-20-chars-of-key"],
"rejected": []
}
}Location: ~/.codex/config.toml
[api]
base_url = "your-base-url"
api_key = "your-api-key-here"
provider = "custom"
[auth]
provider = "custom"
endpoint = "your-base-url"
api_key = "your-api-key-here"🐛 Troubleshooting
- Ensure Claude Code or Codex is installed
- Check configuration directories exist:
- Claude:
~/.claude/ - Codex:
~/.codex/
- Claude:
- Try restarting your terminal
- Restart your terminal/shell
- For project configs, verify you're in the right directory
- Check file permissions:
ls -la ~/.claude/or~/.codex/
- Verify your API key and Base URL are correct
- Check for extra spaces in the API key
- Ensure your provider supports the selected endpoint format
- Try a
curlcommand to verify the endpoint is reachable
📚 Documentation
🤝 Contributing
We welcome contributions! Here's how to get started:
# Fork and clone
git clone https://github.com/yourusername/nexus-ai
cd nexus-ai
# Install dependencies
npm install
# Make changes and test
npm start
# Submit PR
git push origin feature/your-feature💬 Support
| Channel | Link | |---------|------ | 📧 Email | [email protected] | | 🐛 Issues | GitHub Issues | | 💬 Discord | Join Community | | 📚 Docs | Documentation |
📄 License
MIT License - see LICENSE file for details.
Built with ❤️ for the AI Community
⭐ Star us on GitHub
