Plasmate - Web Browser for AI
April 11, 2026 ยท View on GitHub
Fetch and view web pages as Semantic Object Model (SOM) directly in VS Code. Plasmate is the browser engine for AI agents - it transforms HTML into structured, token-efficient JSON that's perfect for AI consumption.
Features
- Fetch Page as SOM - Convert any web page to structured JSON with semantic information
- Fetch as Text - Extract readable text content from web pages
- Fetch as Markdown - Convert web pages to clean Markdown format
- Fetch from Selection - Select a URL in your code and fetch it instantly
- Interactive SOM Viewer - Custom webview with syntax highlighting, collapsible regions, and statistics
- Copy Element IDs - Click any element ID in the SOM viewer to copy it


Requirements
- Plasmate CLI must be installed and available in your PATH
- VS Code 1.85.0 or higher
Installing Plasmate
# Using cargo
cargo install plasmate
# Or build from source
git clone https://github.com/nicholasberlin/plasmate
cd plasmate
cargo build --release
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Plasmate"
- Click Install
From VSIX
- Download the
.vsixfile from Releases - In VS Code, go to Extensions
- Click the "..." menu and select "Install from VSIX..."
- Select the downloaded file
Usage
Commands
Access commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command | Description |
|---|---|
Plasmate: Fetch Page as SOM | Prompt for URL and display as structured JSON |
Plasmate: Fetch Page as Text | Prompt for URL and display as plain text |
Plasmate: Fetch Page as Markdown | Prompt for URL and display as Markdown |
Plasmate: Fetch URL from Selection | Fetch the URL currently selected in the editor |
Keyboard Shortcuts
| Shortcut | Command |
|---|---|
Ctrl+Shift+F / Cmd+Shift+F | Fetch Page as SOM |
Ctrl+Shift+U / Cmd+Shift+U | Fetch URL from Selection |
Context Menu
Right-click on selected text containing a URL to see "Plasmate: Fetch URL from Selection" in the context menu.
Configuration
Configure Plasmate in VS Code Settings (Ctrl+, / Cmd+,):
| Setting | Description | Default |
|---|---|---|
plasmate.executablePath | Path to the plasmate executable | "plasmate" |
plasmate.timeout | Timeout in milliseconds for fetching pages | 30000 |
plasmate.defaultFormat | Default output format (som, text, markdown) | "som" |
plasmate.showStatsBar | Show statistics bar in SOM viewer | true |
plasmate.customHeaders | Custom HTTP headers to send with requests | {} |
Example Configuration
{
"plasmate.executablePath": "/usr/local/bin/plasmate",
"plasmate.timeout": 60000,
"plasmate.defaultFormat": "som",
"plasmate.customHeaders": {
"Authorization": "Bearer your-token"
}
}
SOM Viewer Features
The custom SOM viewer provides:
- Syntax Highlighting - JSON keys, strings, numbers, and booleans are color-coded
- Collapsible Regions - Click the arrow to collapse/expand objects and arrays
- Search - Filter and highlight content with the search box
- Statistics Bar - View element count, text nodes, interactive elements, and data size
- Copy Element IDs - Click any element ID to copy it to clipboard
- Open in Editor - Open the raw JSON in a standard VS Code editor
What is SOM?
The Semantic Object Model (SOM) is a structured JSON representation of web pages designed for AI agents. It:
- Reduces token usage by up to 16x compared to raw HTML
- Preserves semantic information about page structure
- Identifies interactive elements (links, buttons, forms)
- Provides stable element IDs for agent interactions
Troubleshooting
"Plasmate executable not found"
Make sure plasmate is installed and in your PATH:
which plasmate
Or configure the full path in settings:
{
"plasmate.executablePath": "/path/to/plasmate"
}
Timeout errors
Increase the timeout setting:
{
"plasmate.timeout": 60000
}
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub.
Publishing
The extension auto-publishes to VS Code Marketplace when a GitHub Release is created.
Setup (one-time):
- Create publisher "plasmate" at https://marketplace.visualstudio.com/manage/publishers/
- Create a PAT at https://dev.azure.com/ with Marketplace (Publish) scope
- Add
VSCE_PATsecret to GitHub repo settings
To release:
# Bump version in package.json, then:
git tag v0.1.1
git push --tags
gh release create v0.1.1 --generate-notes
License
MIT License - see LICENSE for details.