A Lightpanda browser plugin/tool for OpenCode. It is like WebFetch tool on steroids.
- Headless
- 10x faster than headless Chrome, 16x less memory
- Returns markdown pages without ads or clutter
- Can also extract JSON data
- Handles JS-heavy websites like a pro
- OpenCode
- Lightpanda
- Bun for development and tests
Install Lightpanda, then install the plugin globally:
opencode plugin -g opencode-lightpanda@latestTo update an existing installation:
opencode plugin -g -f opencode-lightpanda@latestQuit and restart OpenCode.
If OpenCode cannot find Lightpanda, start it with LIGHTPANDA_BIN set to the executable's absolute path.
Starts a fresh Lightpanda process for every call, so cookies and browser state are not retained.
lightpanda({
url: "https://example.com",
format: "markdown",
timeout: 30,
})Available formats are markdown, json, and semantic_tree.
bun install
bun run check
bun testLoad the checkout directly by adding it to ~/.config/opencode/opencode.json:
{
"plugin": ["file:///absolute/path/to/opencode-lightpanda/lightpanda.ts"]
}The tools can be controlled independently:
{
"permission": {
"webfetch": "deny",
"lightpanda": "allow"
}
}