#OpenCode
First-party OpenCode plugin that adds curl.md support to the built-in webfetch tool as well as a specific curl_md tool.
#Quick Start
Install the plugin, launch OpenCode, and start curling.
Install plugin
Install the
@curl.md/opencodepackage with OpenCode:opencode plugin -g @curl.md/opencodeThis adds
@curl.md/opencodeto your OpenCode config so OpenCode installs it automatically at startup.Start OpenCode
Run OpenCode just like you normally do.
opencodeUse OpenCode
Now that OpenCode is running with the curl.md plugin, all you need to do is use OpenCode. To confirm everything is set up, try this out:
Read the curl.md OpenCode plugin docs and summarize how it works. https://curl.md/docs/plugins/opencodeOpenCode will automatically use curl.md to turn URLs (you give it or it decides to fetch on its own) into markdown.
Tip
Optionally, authenticate with the
curl_md_logincommand to unlock higher usage limits and features, like objective extraction.
#Install
Install the @curl.md/opencode npm package with OpenCode:
opencode plugin -g @curl.md/opencodeIf you want to install it only for the current project instead of your global OpenCode config, use:
opencode plugin @curl.md/opencodeIf you prefer to edit config manually, add the package to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@curl.md/opencode"]
}To update an existing install, rerun the plugin install command with --force.
opencode plugin -g @curl.md/opencode --force#Configuration
Note
By default, the plugin overrides the built-in webfetch tool to ensure maximum curl.md usage. If you want to keep curl_md, but disable the built-in webfetch override, pass a plugin option:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
[
"@curl.md/opencode",
{
"webfetch": false
}
]
]
}#Usage
Ask for a page, paste links, or let OpenCode figure out what it needs to fetch.
#Prompting
Inside OpenCode, prompt like you normally would, for example:
Read the Cloudflare Agents docs and summarize the core concepts.
https://developers.cloudflare.com/agentsIn this example, OpenCode will use curl.md to fetch the page and return markdown optimized for agents.
You can also tell OpenCode to use a specific objective, keywords, or let it decide what to use on its own (it’s really good at this).
#Authentication
Authenticate inside OpenCode to connect the plugin to your curl.md account or organization:
/curl_md_loginThe plugin uses the same auth model as the CLI so you can also use the auth login command.
curl.md auth loginFor non-interactive environments, set CURLMD_API_KEY.
#Commands
After installing, OpenCode registers the following commands:
#Tools
The plugin registers the following tools:
The curl_md tool accepts the following inputs:
The options object accepts the following inputs:
#Status/Debugging
Use the /curl_md_status command to confirm auth state, tool registration, and CLI availability.
/curl_md_status#Contributing
We welcome contributions to make the OpenCode plugin better. Feel free to create issues or pull requests on GitHub if there are issues or something could be improved.
Last updated: May 5 3:02 PM