pi-lens

Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo

Packages

Package details

extensionskill

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

$ pi install npm:pi-lens
Package
pi-lens
Version
3.8.71
Published
Jul 20, 2026
Downloads
34.3K/mo · 9,636/wk
Author
apmantza
License
MIT
Types
extension, skill
Size
17 MB
Dependencies
8 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ],
  "skills": [
    "../../skills"
  ]
}

Security note

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

README

pi-lens

pi-lens gives AI coding agents fast, language-aware feedback while they write/edit.

What It Does

  • LSP diagnostics and navigation across supported languages
  • Impact cascade diagnostics that show which related files were affected and run LSP diagnostics on them
  • Language-specific linters, type-checkers, and scanners on every write/edit
  • Safe formatting/autofix where tools are configured or confidently detected
  • ast-grep and tree-sitter structural rules for correctness/security smells
  • Agent-facing tools for LSP navigation/diagnostics, AST search/replace, diagnostics state, and project intelligence
  • Review-graph intelligence for supported languages via bundled tree-sitter WASMs
  • Ranked identifier search (symbol_search) over an always-warm word index, feeding the discovery funnel (symbol_search → module_report → read_symbol)
  • Diagnostic triage (lens_diagnostic_mark): findings can be marked false-positive, suppressed in source, deferred, or flagged-to-fix — honored across all surfaces
  • /lens-map — interactive HTML dependency map of the project
  • Read-guard and edit-autopatch support to reduce bad edits
  • Background security/dependency scans for opted-in projects

Install

pi install npm:pi-lens

Or from git:

pi install git:github.com/apmantza/pi-lens

npm v12 users: dependency lifecycle scripts (e.g. @ast-grep/cli's postinstall) now require explicit approval — if npm install warns about unreviewed install scripts, review and allow them with npm approve-scripts, or trust the allowScripts entries already declared in this package's package.json. Installing from a git source (pi install git:... / pi update --extension git:...) may similarly prompt for git-dependency approval; accept it to let the prepare build step run.

Documentation

Contributing

See CONTRIBUTING.md for the development workflow, runner, LSP, formatter, and rule checklists, and issue/PR conventions.

Security issues should be reported privately; see SECURITY.md. pi-lens is released under the MIT License.

Contributors

Thanks goes to these wonderful people:

If you land a pull request or report an issue that gets fixed, we'll add you here.