pi-markdown-preview-lean

pi-markdown-preview without the preview_export tool in the default context

Packages

Package details

extension

Install pi-markdown-preview-lean from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-markdown-preview-lean
Package
pi-markdown-preview-lean
Version
0.1.0
Published
Nov 5, 2026
Downloads
329/mo · 329/wk
Author
developer380
License
MIT
Types
extension
Size
3 KB
Dependencies
1 dependency · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

pi-markdown-preview-lean

A thin wrapper around pi-markdown-preview that keeps the default model context unchanged.

The upstream extension registers the preview_export tool (name, description, full JSON schema, prompt snippet and guidelines). This wrapper forwards all registration to upstream but marks that tool defaultActive: false, so it contributes nothing to the default context.

Everything else is unchanged:

  • /preview, /preview-browser, /preview-pdf, /preview-clear-cache work exactly as upstream (slash commands are not part of the model context).
  • The browser watchers, terminal preview, PDF export and cache clearing behave as upstream.

Enabling the export tool

The tool is still registered, just inactive. Opt in per project in ~/.pi/agent/settings.json:

{
  "defaultTools": ["+preview_export"]
}

or for one invocation:

pi --tools +preview_export

Once active, it returns to the upstream behavior and context footprint.

Install

pi install npm:pi-markdown-preview-lean

Then remove npm:pi-markdown-preview from your packages so only one copy is loaded.

For local development:

pi --extension ~/Code/pi-markdown-preview-lean/index.ts