Package Exports
- @atlascloudai/opencode
- @atlascloudai/opencode/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@atlascloudai/opencode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Atlas Cloud Plugin for OpenCode
An OpenCode plugin that integrates Atlas Cloud's OpenAI-compatible API, giving you access to 100+ AI models including GPT-4o, Claude, Gemini, DeepSeek, and more.
Quick Start
1. Install and register the plugin
npx @atlascloudai/opencodeThis downloads the plugin and registers it with OpenCode.
Alternative: Global install
npm install -g @atlascloudai/opencode
atlascloudai-opencode2. Start OpenCode and connect
opencodeThen connect to Atlas Cloud:
- Run
/connect - Select Atlas Cloud from the provider list
- Enter your API key when prompted
3. Restart OpenCode to load models
Exit and restart OpenCode. Your Atlas Cloud models will now be available via /models.
Commands
| Command | Description |
|---|---|
/connect |
Open provider selection to connect |
/models |
List available models |
Available Models
The plugin dynamically fetches all available models from Atlas Cloud. Popular models include:
- GPT-4o, GPT-4o Mini, GPT-4.1, O1, O3
- Claude Sonnet 4.5, Claude Opus 4.5
- Gemini 2.5 Flash, Gemini 2.5 Pro
- DeepSeek V3.2, DeepSeek R1
- Kimi K2.5
- GLM 4.7
- MiniMax M2.1
- Qwen 3 Max
- Grok 4
And many more...
Configuration
API Key Sources (in priority order)
- OpenCode auth.json -
~/.local/share/opencode/auth.json - Plugin config -
~/.atlascloud/config.json - Environment variable -
ATLASCLOUD_API_KEY
Manual Configuration
If you prefer not to use /connect, you can manually create the config:
Option 1: Environment variable
export ATLASCLOUD_API_KEY=your-api-keyOption 2: Config file (~/.atlascloud/config.json)
{
"version": "1.0.0",
"apiKey": "your-api-key"
}Development
Prerequisites
- Node.js >= 18.0.0
- npm or bun
- OpenCode installed
Local Development
# Clone the repository
git clone https://github.com/AtlasCloudAI/opencode-plugin.git
cd opencode-plugin
# Install dependencies
npm install
# Build
npm run build
# Register plugin locally
node bin/setup.cjs
# Start OpenCode
opencodeWatch Mode
npm run devTesting in Docker
For a clean, isolated test environment:
# Build Docker image
make build
# Run container
make run
# Inside container:
node bin/setup.cjs # Register plugin
opencode # Start OpenCodeTroubleshooting
Models not showing up
- Ensure you've run
/connectand selected Atlas Cloud with a valid key - Restart OpenCode after connecting (required to load models)
- Try
/modelsto see if Atlas Cloud models appear
Invalid API key error
- Verify your key at Atlas Cloud dashboard
- Run
/connectagain and re-enter your key
Plugin not loading
- Run
npx @atlascloudai/opencodeto re-register - Check
~/.config/opencode/opencode.jsonhas the plugin listed
Debug mode
Enable debug logging:
ATLASCLOUD_DEBUG=1 opencodeArchitecture
opencode-atlascloud-plugin/
├── bin/
│ └── setup.cjs # CLI setup script
├── src/
│ ├── index.ts # Plugin entry point
│ └── server/
│ ├── config.ts # Configuration management
│ └── models.ts # Model fetching & formatting
├── dist/ # Compiled output
├── package.json
└── tsconfig.jsonAPI Reference
Base URL: https://api.atlascloud.ai/v1
The plugin uses Atlas Cloud's OpenAI-compatible API via @ai-sdk/openai-compatible.
License
MIT