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

prinfer

v1.0.0

Published

TypeScript type inference inspection tool

Readme

prinfer

Typehints for your AI agent.

Give AI coding assistant the ability to inspect TypeScript's inferred types mimicking the IDE's hover behavior. so they can write cleaner code without redundant type annotations.

Why?

AI agents write TypeScript, but they can't see what the compiler infers. This leads to:

  • Unnecessary explicit type annotations everywhere
  • Verbose code that fights against TypeScript's design
  • Missed opportunities to leverage type inference

prinfer solves this by exposing TypeScript's type inference to your agent via MCP.

Quick Start

npm i -g prinfer

or

bun add -g prinfer

On install, prinfer automatically configures itself for Claude Code. If auto-setup doesn't run (common with global installs), run:

prinfer setup

What Gets Installed

MCP Server (prinfer-mcp)

Your agent gets a hover tool to check what TypeScript infers at any position:

hover(file: "src/utils.ts", line: 75, column: 10)
hover(file: "src/utils.ts", line: 75, column: 10, include_docs: true)

The position-based API matches IDE behavior and returns instantiated generic types at call sites.

Claude Skill (~/.claude/skills/prefer-infer.md)

A coding guideline that encourages your agent to:

  • Rely on type inference instead of explicit annotations
  • Use prinfer to verify types before adding redundant hints
  • Write idiomatic TypeScript

Plus a /hover command for quick lookups.

Manual Setup

If prinfer setup doesn't work, configure manually:

1. Add MCP server using the Claude CLI:

claude mcp add prinfer node /path/to/node_modules/prinfer/dist/mcp.js

2. Create skill file at ~/.claude/skills/prefer-infer.md with content from prefer-infer.md

CLI Usage

prinfer also works as a standalone CLI:

prinfer src/utils.ts:75:10
prinfer src/utils.ts:75:10 --docs
prinfer src/utils.ts:75:10 --project ./tsconfig.json

Output:

(x: number, y: string) => boolean
returns: boolean
name: myFunction
kind: function
docs: Adds two numbers together.

Programmatic API

import { hover } from "prinfer";

const result = hover("./src/utils.ts", 75, 10);
// => { signature: "(x: number, y: string) => boolean", returnType: "boolean", line: 75, column: 10, kind: "function", name: "myFunction" }

// With documentation
const result2 = hover("./src/utils.ts", 75, 10, { include_docs: true });
// => { ..., documentation: "Adds two numbers together." }

// With custom tsconfig
const result3 = hover("./src/utils.ts", 75, 10, { project: "./tsconfig.json" });

Requirements

  • Node.js >= 18.0.0
  • TypeScript >= 4.7.0 (peer dependency)

License

MIT