OpenCode
Setup OpenCode to correctly generate Avo code based on your prompt.
Quick use
Paste the docs link in your prompt and ask OpenCode to read it before generating code.
bash
Read https://docs.avohq.io/3.0/docs-map.md and use it as a reference for Avo code.Permanent setup
OpenCode reads the AGENTS.md file from your repository. Add a line pointing to Avo's docs:
bash
When working with Avo, use the docs at https://docs.avohq.io/3.0/docs-map.md as a reference.Or save the docs in your repo and reference the file from AGENTS.md:
bash
curl -L https://docs.avohq.io/3.0/docs-map.md --create-dirs -o docs/avo-docs-map.mdMCP server
MCP (Model Context Protocol) connects coding agents to external tools and context. OpenCode can use MCP servers to look up documentation while working.
I suggest using Context7 MCP server which provides many libraries including Avo's docs.
Add this to your opencode.json config file:
json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"context7": {
"type": "local",
"command": ["npx", "-y", "@upstash/context7-mcp"]
}
}
}Now you can ask OpenCode anything about Avo, and write use context7 at the end of your prompt.
For example:
bash
create a new Avo resource for a product model. use context7
OpenCode