Code Plan
OpenCode Integration
Complete OpenCode setup with sharing, IDE extensions, GitHub workflow, and OneInfer-compatible configuration.
This guide follows the full OpenCode flow from the reference and adapts provider configuration for OneInfer.
Step 1: Install OpenCode
The easiest installation method is the install script:
bash
curl -fsSL https://opencode.ai/install | bashYou can also install via npm:
bash
npm install -g opencode-ai
cd your-project-directory
opencodeStep 2: Getting Started
- Get your API key from OneInfer dashboard.
- Run
opencode auth loginand choose OpenAI-compatible/custom provider. - Enter your OneInfer API key.
- Run
opencodeto launch OpenCode. - Use
/modelsto choose your target model.
bash
$ opencode auth login
┌ Add credential
│
◆ Select provider
│ ● OpenAI-compatible
│ ...
└json
{
"env": {
"OPENAI_BASE_URL": "https://api.oneinfer.ai/v1",
"OPENAI_API_KEY": "<ONEINFER_API_KEY>"
}
}Optional: configure Vision/Search/Web Reader MCP servers in your environment if you want tool-augmented responses.
Share
OpenCode can create shareable conversation links for collaboration.
How it works
- Create a unique public URL for your session.
- Sync conversation history to share infrastructure.
- Expose link as
opencode.ai/s/<share-id>.
Share / Un-share
bash
/share
/unshareIDE Extensions
Works with VS Code, Cursor, Windsurf, and similar IDEs that support terminals.
- Open IDE terminal.
- Run
opencodeto trigger extension install.
- Quick Launch:
Cmd+Esc(Mac) orCtrl+Esc(Windows/Linux) - New Session:
Cmd+Shift+EscorCtrl+Shift+Esc - File references:
@File#L37-42
GitHub Workflow
OpenCode can execute tasks from GitHub issue/PR comments using your GitHub Actions runner.
Install
bash
opencode github installExamples
bash
/opencode explain this issue
/opencode fix this
Delete the attachment from S3 when the note is removed /ocTroubleshooting
- Restart your terminal after changing environment variables.
- Confirm
OPENAI_BASE_URLishttps://api.oneinfer.ai/v1. - Verify your OneInfer API key and active credit balance before retrying.
- If auth fails in login flow, remove stale credentials and run
opencode auth loginagain.
Resources
- OpenCode docs:
opencode.ai/docs - OpenCode issues:
github.com/sst/opencode/issues - OpenCode Discord:
opencode.ai/discord - OneInfer docs:
oneinfer.ai/docs