@tifan/pi-mermaid-open

Extract and open Mermaid diagrams from pi agent responses.

Packages

Package details

extension

Install @tifan/pi-mermaid-open from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@tifan/pi-mermaid-open
Package
@tifan/pi-mermaid-open
Version
0.1.2
Published
Jun 5, 2026
Downloads
214/mo · 9/wk
Author
tifan
License
MIT
Types
extension
Size
10.1 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@tifan/pi-mermaid-open

Extract Mermaid diagrams from recent pi assistant messages, render them to SVG, and open them in the system viewer.

The command scans the last 50 assistant messages for ```mermaid or ```mmd fences. If it finds more than one diagram, pi shows a picker with the message offset, diagram type, and title. Rendering uses @mermaid-js/mermaid-cli via bunx. SVGs are written under <agent-dir>/artifacts/mermaid/ and opened with open on macOS, xdg-open on Linux, or start on Windows.

Install

pi install npm:@tifan/pi-mermaid-open

Commands

  • /mermaid-open: Pick a Mermaid diagram from recent assistant messages, render it, and open the SVG.

Release notes

See CHANGELOG.md

License

MIT