About this mod
terminal-browser claude code plugin
This plugin is experimental and does have some known limitations
https://github.com/user-attachments/assets/a79e7667-6fcb-49a4-9967-44d0f942102c
Installation
Install terminal-browser
curl -fsSL https://terminal-browser.sh/install | bash # or brew install terminal-browser
Ensure you are on the latest version of claude code
claude update
Enable claude code UI plugins by adding this to ~/.claude/settings.json:
{
"env": { "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" }
}
Install the terminal-browser plugin
# set the marketplace
claude plugin marketplace add zenbu-labs/terminal-browser
# install the plugin
claude plugin install terminal-browser@terminal-browser
Now you can run "/browser" inside claude code to open the browser
Updating
Update the claude code plugin
claude plugin update terminal-browser@terminal-browser
Update terminal-browser
terminal-browser upgrade
Configuration
You can configure the terminal-browser plugin to include a tool that claude can use to open the browser. This is by default off, since claude can already use the terminal-browser CLI to open the browser inside the terminal through a split pane. You can enable the tool by adding the following to your ~/.claude/settings.json:
{
"pluginConfigs": {
"terminal-browser@terminal-browser": {
"options": {
"agentTool": true
}
}
}
}
terminal-browser plugin API
The terminal-browser plugin comes with an API you can use within another claude code plugin to programatically open the browser and load a URL. Some examples of useful plugins you can build with this are:
/tldrawslash command that opens tldraw in the claude code split pane/open-prslash command that opens the PR associated with the branch you are working on
export type BrowserOpenInput = { url?: string }
export type BrowserOpenResult =
| { ok: true; url: string }
| { ok: false; error: string }
export type Browser = {
open: (input: BrowserOpenInput) => Promise<BrowserOpenResult>
close: (input?: Record<string, never>) => Promise<boolean>
}
// usage: in your plugin's hooks module
on('command.run', { command: 'tldraw' }, async ($) => {
const result = await $.browser.open({ url: 'https://www.tldraw.com/' })
return { text: result.ok ? 'Opened tldraw' : result.error }
})
How does it work?
terminal-browser uses t
