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

pi-bib

v0.1.0

Published

A pi extension for bibliography and BibTeX review workflows.

Readme

pi-bib

A pi extension for checking bibliography / BibTeX files against CrossRef and Semantic Scholar.

Based on Bibtex-Verifier

This project is based on Bibtex-Verifier. The original project provides a browser-based UI for uploading or pasting BibTeX and reviewing suggested metadata changes interactively.

pi-bib adapts the core idea for pi as a local command-line-style extension.

Improvements / differences:

  • Runs directly inside pi via /review:bib.
  • Recursively finds .bib files in a project folder.
  • Produces a local Markdown report instead of requiring browser interaction.
  • Uses @retorquere/bibtex-parser, the parser behind Better BibTeX for Zotero, instead of regex-based BibTeX parsing.
  • Reports BibTeX parse issues alongside metadata checks.
  • Keeps API lookup logic for CrossRef and Semantic Scholar.
  • Uses DOI-first lookup when an entry has a doi field, then falls back to title lookup.
  • Writes suggested BibTeX files under pi-bib-suggested/ instead of modifying original .bib files.
  • Applies only safe updated field suggestions to generated files; needs_review, not_found, and duplicates remain unchanged for manual review.
  • Uses the active pi model as an extra suspicious-match check before applying non-DOI metadata suggestions.
  • Adds citation-review guidance to pi's system prompt so the LLM behaves like a skeptical bibliography reviewer when helping with citations.

Install

Once published to npm:

pi install npm:pi-bib

For local development from this folder:

npm install
pi -e .

Commands

/review:bib [path]

Recursively searches for .bib files under path or the current working directory, parses them with @retorquere/bibtex-parser, checks entries against CrossRef and Semantic Scholar, detects duplicate titles, writes a Markdown report, and creates safe suggested BibTeX files.

Lookup order per entry:

  1. If a doi field exists, look up the DOI directly in CrossRef and Semantic Scholar.
  2. If DOI lookup fails or no DOI is present, fall back to title-based lookup.
  3. Compare the found metadata with the local BibTeX entry and report field differences.
  4. For non-DOI matches that would otherwise be auto-updated, ask the active pi model whether the local entry and candidate metadata appear to describe the same paper. different or uncertain verdicts are kept as needs_review instead of being applied to suggested files.

Outputs:

pi-bib-report.md
pi-bib-suggested/<same relative path as each checked .bib file>

The suggested files apply safe updated metadata suggestions only. Entries marked needs_review, not_found, or duplicate are kept unchanged so you can inspect them manually.

Ignored folders: node_modules, .git, .pi, dist, pi-bib-suggested.

LLM citation-review guidance

When the extension is loaded, it appends bibliography-review instructions to pi's system prompt. The guidance tells the LLM to:

  • treat citations as unverified until validated against reliable metadata
  • prefer DOI-based evidence over title-only matches
  • avoid inventing missing metadata
  • flag suspicious author, title, year, venue, DOI, and duplicate mismatches
  • treat updated as a safe suggestion, needs_review as uncertain, and not_found as unvalidated
  • inspect pi-bib-report.md first for broad bibliography reviews
  • avoid overwriting original .bib files unless explicitly asked

Development

Typecheck:

npm run typecheck

Check what would be published:

npm run pack:dry