Skip to content

plasmate-labs/cursor-plasmate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plasmate for Cursor

Browser engine for AI agents - Convert HTML to Semantic Object Model (SOM) with 10-100x token compression.

Features

  • Fetch Page: Fetch any URL and convert to SOM, text, or markdown
  • Extract Text: Extract readable text content from web pages
  • Extract Links: Extract all links from a page in structured JSON

Requirements

Install the Plasmate CLI:

# From source
git clone https://github.com/nickarino/plasmate
cd plasmate
cargo build --release
cp target/release/plasmate /usr/local/bin/

# Or add to PATH
export PATH="$PATH:/path/to/plasmate/target/release"

Installation in Cursor

From VSIX (Local Install)

  1. Build the extension:

    npm install
    npm run compile
    npx vsce package
  2. In Cursor, open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)

  3. Run "Extensions: Install from VSIX..."

  4. Select the generated .vsix file

From Cursor Marketplace

Search for "Plasmate" in the Cursor extensions marketplace.

Commands

Access via Command Palette (Cmd+Shift+P / Ctrl+Shift+P):

Command Description
Plasmate: Fetch Page Fetch a URL and display as SOM, text, or markdown
Plasmate: Extract Text Extract readable text from a URL
Plasmate: Extract Links Extract all links from a URL

Configuration

Open Settings (Cmd+, / Ctrl+,) and search for "Plasmate":

Setting Default Description
plasmate.path plasmate Path to the plasmate executable
plasmate.defaultFormat som Default output format (som, text, markdown)
plasmate.timeout 30000 Timeout in milliseconds

Output Formats

SOM (Semantic Object Model)

Structured JSON representation of web page content, optimized for AI consumption:

{
  "tag": "main",
  "children": [
    {
      "tag": "h1",
      "text": "Welcome"
    },
    {
      "tag": "p",
      "text": "Page content..."
    }
  ]
}

Text

Plain text extraction of readable content.

Markdown

Formatted markdown output preserving document structure.

Usage Examples

Fetch Documentation

  1. Open Command Palette
  2. Run "Plasmate: Fetch Page"
  3. Enter URL: https://docs.example.com/api
  4. Select format: SOM
  5. Result opens in new editor tab

Extract Links for Navigation

  1. Run "Plasmate: Extract Links"
  2. Enter URL of page with links
  3. Get JSON array of all links with text and href

Token Compression

Plasmate provides 10-100x token compression compared to raw HTML:

Page Type Raw HTML SOM Compression
Blog post 50K tokens 2K tokens 25x
Documentation 100K tokens 5K tokens 20x
Landing page 200K tokens 3K tokens 66x

Troubleshooting

"Plasmate CLI not found"

  1. Ensure plasmate is installed and in your PATH
  2. Or configure the full path in settings:
    {
      "plasmate.path": "/path/to/plasmate"
    }

Timeout errors

Increase the timeout in settings:

{
  "plasmate.timeout": 60000
}

View logs

Open Output panel (View > Output) and select "Plasmate" from the dropdown.

Development

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch mode
npm run watch

# Package extension
npx vsce package

License

MIT

Links

  • Plasmate - The browser engine for AI agents
  • Cursor - AI-first code editor

About

Cursor IDE extension for Plasmate - fetch web pages as structured SOM in your AI editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors