pi-lens plugin

An extension that gives the Pi agent LSP, linters, formatters and structural search on every code edit, plus an experimental MCP.

  • 529 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • The extension runs linters, formatters and autofixes that change project files.
All reasons and checks

apmantza/pi-lens

Install

Works in

Manual install

pi install npm:pi-lens

The command from the README Install section for the Pi agent.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The extension runs linters, formatters and autofixes that change project files.

This is third-party code. Review the repository files before installing.

What it does

pi-lens gives the Pi agent fast language feedback while it writes and edits files. After each change it runs LSP diagnostics, linters, type checkers and scanners, then safe formatting where tools are configured or confidently detected. The agent gets LSP navigation tools, AST search and replace, ranked identifier search via `symbol_search` and a dependency map at `/lens-map`. Findings can be marked false positive, suppressed or deferred. An experimental MCP server exposes the same set to clients such as Claude Code.

Who it is for. Pi and Claude Code users whose agent often breaks types or style and should see errors right after an edit.

Good fit when

  • The agent edits a file and diagnostics for related files are wanted at once.
  • The project spans several languages and each needs its own linter.
  • A symbol must be found by a word without reading the whole tree.
  • A recurring false positive must be marked so it stops returning.

Not a fit when

  • The agent is not Pi and there is no MCP client.
  • A clean run without background scanners and network checks is wanted.
  • The project uses no supported languages or linters.

Example request

Edit the file and after each change show diagnostics for affected files, marking false positives in the log.

Limitations

The extension is built mainly for the Pi agent, and the MCP server for Claude Code is marked experimental. Lifecycle scripts in an npm install need explicit approval, and when npm warns about unreviewed scripts you must review them. Background security and dependency scans run only for projects that opted in. The repository is large and has many settings, so start from the agent guide at `docs/agent-guide.md`.

How to disable. Remove the package from Pi (`pi remove` or edit the package list) and drop the MCP entry in the client. Delete caches and the project `.pi-lens.json` by hand.

FAQ

How do I install it?

With `pi install npm:pi-lens`. The git option is `pi install git:github.com/apmantza/pi-lens`.

What does `/lens-map` do?

Builds an interactive HTML dependency map of the project.

What is `lens_diagnostic_mark` for?

It marks a finding false positive, suppresses it in source, defers it or flags it to fix. The mark is honoured everywhere.

Does it work with Claude Code?

Through the experimental MCP server, which exposes the same diagnostics and read tools.

What is `symbol_search`?

A ranked identifier search over an always-warm word index, the first step of the discovery funnel.

Discussion

No questions or reviews yet.

Plugins

A Pi agent package: code search, LSP, web search, desktop control and confirmations for risky commands.

PluginExtended access58Repository stars

More than thirty separately installed extensions for the Pi Coding Agent: goals, plan mode, LSP and subscription limits

PluginBroad access777Repository stars

An extension stack for the Pi agent: code navigation through LSP and Tree-sitter, reviews, web access and library documentation.

PluginExtended access103Repository stars

An extension for the Pi coding agent that folds tool calls into compact lines and renders file edits as readable diffs

PluginExtended access307Repository stars

The agent-lsp MCP server orchestrates language servers into agent workflows: callers, safe edits, renames and diagnostics.

MCP serverBroad access178Repository stars

An extension for the Pi agent that connects MCP servers through one proxy tool without flooding the context with tool definitions

PluginExtended access1.6KRepository stars

README in short

The README lists capabilities, the event-handling architecture, installation into Pi and npm script approval rules.

README badge

Report a problem