npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@realvendex/pi-lint

v1.0.0

Published

Pi-native extension linter that checks for pi-specific API anti-patterns — deterministic, no LLM calls, catches runtime bugs before npm publish

Readme

pi-lint

Pi-native extension linter that checks for pi-specific API anti-patterns — deterministic, no LLM calls, catches runtime bugs before npm publish.

Installation

pi install npm:pi-lint

What It Does

pi-lint scans your pi.dev extension source code for common anti-patterns that cause runtime bugs. Unlike general code quality tools, pi-lint understands pi.dev-specific APIs and conventions.

Key features:

  • 8 rules covering enum handling, tool naming, UI guards, exports, error handling, partial results, blocking, and output truncation
  • Deterministic pattern matching — no LLM calls, instant results
  • Auto-fix for simple patterns (kebab-to-snake names, StringEnum imports)
  • Structured output with file, line, column, rule, severity, and fix suggestions
  • Text and markdown report formats

Tools

lint_extension

Scan a pi.dev extension source directory for API anti-patterns.

Parameters:

  • path (string, required) — Path to the extension source directory
  • rules (string[], optional) — Specific rules to check (default: all)
  • severity (string, optional) — Filter by severity: "error" or "warning"
  • exclude (string[], optional) — File path patterns to exclude

Example:

Use the lint_extension tool with path="./extensions"

lint_report

Generate a formatted markdown lint report from scan results.

Parameters:

  • path (string, required) — Path to the extension source directory
  • rules (string[], optional) — Specific rules to check
  • format (string, optional) — Output format: "text" or "markdown"

Example:

Use the lint_report tool with path="./extensions" format="markdown"

lint_fix

Auto-fix simple anti-patterns. Currently supports:

  • Converting kebab-case tool names to snake_case
  • Adding StringEnum import when Union/Literal enum pattern detected

Parameters:

  • path (string, required) — Path to the extension source directory
  • rules (string[], optional) — Rules to auto-fix
  • dryRun (boolean, optional) — Show what would be fixed without making changes

Example:

Use the lint_fix tool with path="./extensions" dryRun=true

Rules

| Rule | Severity | Description | |------|----------|-------------| | no-union-enum | error | Type.Union/Type.Literal instead of StringEnum (breaks Google API enum handling) | | kebab-tool-name | error | Tool names in kebab-case instead of snake_case (pi.dev requires snake_case) | | missing-hasui-guard | error | Missing ctx.hasUI guard before UI operations in tool execute | | missing-default-export | error | Missing export default function in extension.ts | | return-not-throw | warning | Returning error objects instead of throwing Error (pi.dev convention: throw) | | unhandled-partial | warning | Not handling isPartial/expanded in renderResult | | unconditional-block | warning | block: true set unconditionally (should be conditional on context) | | missing-output-truncation | warning | Tool output not truncated (large outputs cause UI issues) |

Resources

License

MIT