JSPM

@atlascloudai/opencode

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q51776F
  • License MIT

OpenCode plugin for Atlas Cloud - Access 100+ AI models including GPT-4o, Claude, Gemini, DeepSeek via OpenAI-compatible API

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/opencode

This downloads the plugin and registers it with OpenCode.

Alternative: Global install

npm install -g @atlascloudai/opencode
atlascloudai-opencode

3. Start OpenCode and connect

opencode

Then connect with your Atlas Cloud API key:

/connect atlascloud YOUR_API_KEY

4. 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)

  1. OpenCode auth.json - ~/.local/share/opencode/auth.json
  2. Plugin config - ~/.atlascloud/config.json
  3. 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-key

Option 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
opencode

Watch Mode

npm run dev

Testing 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 OpenCode

Troubleshooting

Models not showing up

  1. Ensure you've run /connect atlascloud <api_key> with a valid key
  2. Restart OpenCode after connecting (required to load models)
  3. Check status with /atlascloud status

Invalid API key error

  1. Verify your key at Atlas Cloud dashboard
  2. Reconnect with /connect atlascloud <new_key>

Plugin not loading

  1. Run npx @atlascloudai/opencode to re-register
  2. Check ~/.config/opencode/opencode.json has the plugin listed

Debug mode

Enable debug logging:

ATLASCLOUD_DEBUG=1 opencode

Architecture

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.json

API Reference

Base URL: https://api.atlascloud.ai/v1

The plugin uses Atlas Cloud's OpenAI-compatible API via @ai-sdk/openai-compatible.

License

MIT