|
| 1 | +# Render OpenCode Plugin |
| 2 | + |
| 3 | +Use Render from OpenCode to deploy apps, validate Blueprints, debug failed deploys, monitor services, and work through common platform workflows. |
| 4 | + |
| 5 | +## What you get |
| 6 | + |
| 7 | +- An npm-installable OpenCode plugin with a `render_validate_blueprint` tool |
| 8 | +- Automatic validation when an agent edits `render.yaml` or `render.yml` |
| 9 | +- Bundled Render skills for deploys, debugging, monitoring, migrations, and service configuration |
| 10 | +- OpenCode commands for `/deploy-to-render` and `/check-render-status` |
| 11 | +- A Render-focused `@render` subagent |
| 12 | +- Optional Render MCP server configuration |
| 13 | + |
| 14 | +## Installing the plugin |
| 15 | + |
| 16 | +Add the npm package to your OpenCode config: |
| 17 | + |
| 18 | +```json |
| 19 | +{ |
| 20 | + "$schema": "https://opencode.ai/config.json", |
| 21 | + "plugin": ["@render/opencode-plugin"] |
| 22 | +} |
| 23 | +``` |
| 24 | + |
| 25 | +OpenCode installs npm plugins with Bun at startup and caches them in `~/.cache/opencode/node_modules/`. |
| 26 | + |
| 27 | +## Installing skills, commands, and the agent |
| 28 | + |
| 29 | +OpenCode npm plugins can provide tools and hooks, but they don't automatically register bundled skills, commands, or agents. OpenCode discovers those files from your OpenCode config directory. |
| 30 | + |
| 31 | +Run the explicit setup command after adding the plugin: |
| 32 | + |
| 33 | +```bash |
| 34 | +npx @render/opencode-plugin setup |
| 35 | +``` |
| 36 | + |
| 37 | +This opt-in step writes files to `~/.config/opencode/`: |
| 38 | + |
| 39 | +- `skills/render-*/SKILL.md` |
| 40 | +- `commands/deploy-to-render.md` |
| 41 | +- `commands/check-render-status.md` |
| 42 | +- `agents/render.md` |
| 43 | + |
| 44 | +The setup command doesn't overwrite existing files unless you pass `--force`. |
| 45 | + |
| 46 | +```bash |
| 47 | +npx @render/opencode-plugin setup --force |
| 48 | +``` |
| 49 | + |
| 50 | +To preview changes without writing files: |
| 51 | + |
| 52 | +```bash |
| 53 | +npx @render/opencode-plugin setup --dry-run |
| 54 | +``` |
| 55 | + |
| 56 | +To install into a different OpenCode config directory: |
| 57 | + |
| 58 | +```bash |
| 59 | +npx @render/opencode-plugin setup --config-dir ./tmp-opencode |
| 60 | +``` |
| 61 | + |
| 62 | +## Configuring Render MCP |
| 63 | + |
| 64 | +If you want OpenCode to use Render MCP tools, run setup with `--enable-mcp`: |
| 65 | + |
| 66 | +```bash |
| 67 | +npx @render/opencode-plugin setup --enable-mcp |
| 68 | +``` |
| 69 | + |
| 70 | +This merges the following server into `opencode.json`: |
| 71 | + |
| 72 | +```json |
| 73 | +{ |
| 74 | + "mcp": { |
| 75 | + "render": { |
| 76 | + "type": "remote", |
| 77 | + "url": "https://mcp.render.com/mcp", |
| 78 | + "enabled": true, |
| 79 | + "oauth": false, |
| 80 | + "headers": { |
| 81 | + "Authorization": "Bearer {env:RENDER_API_KEY}" |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | +} |
| 86 | +``` |
| 87 | + |
| 88 | +Set `RENDER_API_KEY` in your environment before using Render MCP. |
| 89 | + |
| 90 | +## Setting up the Render CLI |
| 91 | + |
| 92 | +The plugin can validate Blueprints with the Render CLI. |
| 93 | + |
| 94 | +1. Install the Render CLI: |
| 95 | + |
| 96 | +```bash |
| 97 | +brew install render |
| 98 | +``` |
| 99 | + |
| 100 | +2. Authenticate: |
| 101 | + |
| 102 | +```bash |
| 103 | +render login |
| 104 | +``` |
| 105 | + |
| 106 | +3. Verify access: |
| 107 | + |
| 108 | +```bash |
| 109 | +render whoami -o json |
| 110 | +``` |
| 111 | + |
| 112 | +If `render whoami -o json` fails, fix authentication before relying on live Render workflows in OpenCode. |
| 113 | + |
| 114 | +## Using the plugin |
| 115 | + |
| 116 | +Good first prompts: |
| 117 | + |
| 118 | +- `Help me deploy this project to Render.` |
| 119 | +- `Validate my render.yaml for Render.` |
| 120 | +- `Debug a failed Render deployment.` |
| 121 | +- `How are my Render services doing?` |
| 122 | + |
| 123 | +You can also run: |
| 124 | + |
| 125 | +```text |
| 126 | +/deploy-to-render |
| 127 | +/check-render-status |
| 128 | +``` |
| 129 | + |
| 130 | +## Maintainer workflow |
| 131 | + |
| 132 | +Refresh bundled skills from `render-oss/skills`: |
| 133 | + |
| 134 | +```bash |
| 135 | +./scripts/sync-skills.sh |
| 136 | +``` |
| 137 | + |
| 138 | +Use a different source repo or subdirectory: |
| 139 | + |
| 140 | +```bash |
| 141 | +./scripts/sync-skills.sh --repo https://github.com/render-oss/skills --subdir skills |
| 142 | +``` |
| 143 | + |
| 144 | +Verify the package before publishing: |
| 145 | + |
| 146 | +```bash |
| 147 | +npm run check |
| 148 | +``` |
| 149 | + |
| 150 | +## License |
| 151 | + |
| 152 | +MIT. See [LICENSE](LICENSE). |
0 commit comments