Opencode is an interactive CLI tool that helps developers with software engineering tasks. It provides an AI-powered coding assistant directly in your terminal, enabling you to build, debug, and maintain code with intelligent support. For installation instructions, see the official Opencode documentation.Documentation Index
Fetch the complete documentation index at: https://docs.zylon.ai/llms.txt
Use this file to discover all available pages before exploring further.
Setup Steps
Create a Gateway Token
Before configuring Opencode, you need a Gateway Token from Zylon.See Token Management for detailed instructions on creating Gateway tokens.
Set Environment Variables
Add the following to your shell configuration file (Replace
~/.zshrc or ~/.bashrc):your-host with your Zylon instance URL and your-gateway-token with your actual Gateway token. The model defaults to default.Confirm the variables are set correctly:Configure Opencode
Create the Opencode configuration directory:Create the configuration file at For more details on Opencode configuration options, see the official Opencode documentation.
~/.config/opencode/opencode.json:Run Opencode
Test your configuration by running:On first launch, you’ll need to switch to the Zylon model:
- Press
Ctrl+Pto open the command palette - Select “Switch Model”
- Search for and select “Zylon - Default”
Limitations
- Images are not supported
Troubleshooting
Connection Errors
- Verify
ZYLON_BASE_URLis correct and accessible - Ensure your Gateway token is valid and not expired
- Check network connectivity to your Zylon instance
Authentication Failures
- Confirm the token is copied correctly without extra whitespace
- Regenerate the token if it may have been compromised
- Verify the token has appropriate permissions