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 @atlascloud/opencode-pluginThis downloads the plugin and registers it with OpenCode.
Alternative: Global install
npm install -g @atlascloud/opencode-plugin
atlascloud-opencode-plugin3. Start OpenCode and connect
opencodeThen connect with your Atlas Cloud API key:
/connect atlascloud YOUR_API_KEY4. Restart OpenCode to load models
Exit and restart OpenCode. Your Atlas Cloud models will now be available via /models.
Commands
| Command | Description |
|---|---|
/connect atlascloud <api_key> |
Connect with your API key |
/atlascloud status |
Check connection status |
/atlascloud disconnect |
Remove your API key |
Available Models
The plugin dynamically fetches all available models from Atlas Cloud. Popular models include:
OpenAI: GPT-4o, GPT-4o Mini, GPT-4.1, GPT-5, O1, O3, O3 Mini
Anthropic: Claude Sonnet 4.5, Claude Opus 4.5, Claude Haiku 4.5
Google: Gemini 2.5 Flash, Gemini 2.5 Pro, Gemini 3 Flash Preview
DeepSeek: DeepSeek V3.1, DeepSeek V3.2, DeepSeek R1
xAI: 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/atlascloud/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
/connect atlascloud <api_key>with a valid key - Restart OpenCode after connecting (required to load models)
- Check status with
/atlascloud status
Invalid API key error
- Verify your key at Atlas Cloud dashboard
- Reconnect with
/connect atlascloud <new_key>
Plugin not loading
- Run
npx @atlascloud/opencode-pluginto 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