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-semantic

v0.1.1

Published

Semantic density modes + workflow helpers for Pi (toggle via /sem).

Downloads

220

Readme

pi-semantic

GitHub stars npm License

Semantic-density modes + workflow helpers for Pi.

If this saves you tokens/time, please star the repo — it’s how this stays maintained.

  • Single command surface: /sem (no command-menu pollution)
  • Modes: off | prose | terse | dense | ooga | wenyan
  • Workflows: /sem commit, /sem review, /sem compress
  • Safety: preserves identifiers verbatim + Auto-Clarity for destructive/security steps

Demo

pi-semantic demo

Why this is worth starring

  • One command: /sem
  • Immediate win: compact answers without losing correctness
  • Safe: never rewrites code/tool output; Auto-Clarity for destructive/security steps
  • Practical workflows: /sem commit + /sem review use your git diff (no paste)

Measured compression (transparent + reproducible)

Same underlying answer, different modes (character count / rough word count):

| mode | sample badge | chars | words | Δ chars vs prose | |---|---:|---:|---:|---:| | prose | ○pr | 191 | 31 | baseline | | dense | ◑de | 151 | 23 | -20.9% | | ooga | ◕oo | 93 | 15 | -51.3% | | wenyan | ●文言 | 54 | 6 | -71.7% |

Reproduce:

cd public/pi-semantic
python docs/readme_metrics.py

Notes: these are simple counts (not tokenized). Code/identifiers remain verbatim by design.

Quick start

  1. Install (see below)
  2. In Pi: /reload
  3. Toggle on/off:
/sem

Then try:

/sem ooga
/sem wenyan
/sem off

Copy/paste examples (what you’ll actually use)

1) Dense answers (daily driver)

/sem
Why does my React component re-render?

Example output (◑de):

New object ref each render → props change → re-render.
Fix: hoist object, or `useMemo(() => ({…}), [...])`.
Verify: React DevTools “highlight updates”.

2) One-line PR review (no paste)

/sem review

Example output:

Summary: 3 findings (1 bug, 1 risk, 1 nit).
src/auth.ts:L42: bug: null user deref. Guard before `.email`.
src/api.ts:L23: risk: no retry on 429. Add backoff(3).
src/ui.ts:L88-140: nit: 50-line fn does 4 things. Extract validate/normalize/persist.

3) Conventional Commit message from staged diff

/sem commit

Example output:

feat(api): add GET /users/:id/profile

Mobile client needs profile data without the full user payload
on cold launch.

Status badge (always visible)

When UI/status is available, pi-semantic shows a compact one-liner badge:

  • ×of = off (red + bold)
  • ○pr = prose (yellow)
  • ◔te = terse (green)
  • ◑de = dense (green)
  • ◕oo = ooga (green)
  • ●文言 = wenyan (green)

If your terminal doesn’t like ANSI styling:

PI_SEMANTIC_STATUS_ANSI=0

Troubleshooting

  • Badge looks like weird squares / missing glyphs

    • Your font may not support ○◔◑◕●. (This is cosmetic.)
    • Future work: ASCII fallback badge.
  • I see \x1b[...m escape codes

    • Disable ANSI styling:
      PI_SEMANTIC_STATUS_ANSI=0
  • /sem commit says “Nothing staged”

    • Stage changes first: git add -A.
  • /sem review outputs nothing

    • No diff to review. Make changes (or stage them) and try again.
  • Git commands fail

    • Ensure you’re inside a git repo and git is on PATH.
  • Still stuck?

    • Run:
      /sem doctor
    • Paste the one-line output into an issue.

Design guarantees (why this is safe)

Borrowed from (and improving on) the best ideas in caveman:

  • Technical substance exact. Only fluff die.
  • Identifiers verbatim: code blocks, inline code, paths, flags, env vars.
  • Tool-output boundary: never rewrite tool output; quote it verbatim.
  • Auto-Clarity: for destructive/irreversible/security/migrations/order-sensitive procedures, temporarily write clear structured steps + warnings, then resume the chosen level.
  • No surprise activation: v1 does not auto-enable from natural language; only /sem … changes state.

Install

Option A: Pi package install (recommended)

Pi has first-class package support:

pi install npm:pi-semantic

Update later:

pi update

Project-local:

pi install -l npm:pi-semantic

Option B: Installer (curl/irm)

If you don’t want npm (or want to vendor a single file), use the installer.

macOS/Linux (bash):

curl -fsSL https://raw.githubusercontent.com/jerryfan/pi/main/public/pi-semantic/install/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/jerryfan/pi/main/public/pi-semantic/install/install.ps1 | iex

Then in Pi: /reload.

Option C: Manual

Copy index.ts to one of:

  • Global: ~/.pi/agent/extensions/pi-semantic/index.ts
  • Project: .pi/extensions/pi-semantic/index.ts

Benchmarks

See evals/ for a small benchmark harness:

  • generate snapshots (optional): python evals/run_openai.py --all
  • measure: python evals/measure.py

The OpenAI runner is optional and requires OPENAI_API_KEY.

Spec

The implementation follows ../../SPEC.md (repo root).

License

MIT (see LICENSE).