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-leetcode-practice

v0.1.0

Published

Guided LeetCode practice workflow for Pi: start problems, learn with notes, and open LeetCode for manual Run/Submit.

Readme

Pi LeetCode Practice

A guided LeetCode practice workflow for Pi: start problems, learn with notes, edit locally, and open LeetCode for manual Run/Submit.

The main idea: only learn 5 commands. Everything else happens through a numbered /lc-next menu.

Why this exists

Most LeetCode helpers either expose too many commands, depend on brittle LeetCode judge APIs, or try to automate the browser. This extension is intentionally calmer:

  • Fetches public problem data.
  • Creates local problem.md, solution.<ext>, and notes.md files.
  • Guides practice through a dashboard and numbered action menu.
  • Tracks what you learned across problems.
  • Opens the LeetCode URL for manual Run/Submit in your normal browser.
  • Does not require LeetCode cookies for the default workflow.
  • Does not send your code, notes, cookies, or telemetry anywhere by default.

Features

  • Native Pi extension; no web server required.
  • Only 5 user-facing /lc- commands.
  • Language selection: TypeScript, JavaScript, Python3, C++, Java, Go, Rust.
  • Practice dashboard with status, confidence, last action, files, and notes.
  • Numbered actions: understand, hint, co-code, edit, debug, run, submit prep, review, solve, learning history.
  • notes.md per problem with highlights, approach, mistakes, edge cases, and complexity.
  • Learning review across past notes and tracked topics.
  • Privacy-safe local usage counters in .pi/leetcode/usage.json.

Install

Try locally from this repo

npm install
pi -e ./src/leetcode.ts

Project-local install

mkdir -p .pi/extensions/pi-leetcode
cp src/leetcode.ts .pi/extensions/pi-leetcode/index.ts
/reload

Once published as a Pi package

pi install npm:pi-leetcode-practice

or try without installing:

pi -e npm:pi-leetcode-practice

Commands

| Command | Purpose | | --- | --- | | /lc-start [titleSlug] | Start a problem. With no slug, continue current, pick recent, review history, search, or random top-50 | | /lc-next | Show the numbered “What next?” menu for the active problem | | /lc-lang | Choose your LeetCode solution language | | /lc-list [search] | Search/select a problem, then continue with /lc-start | | /lc-help | Show help inside Pi |

Typical flow

/lc-lang
/lc-start 3sum
# choose an action from the numbered menu
/lc-next
# use /lc-next anytime to continue practicing

Or start without a slug:

/lc-start

You can then choose:

  • Continue current problem
  • Recent problem
  • Review learning history
  • Search new problem
  • Random top-50 problem

Files created per problem

leetcode/<titleSlug>/problem.md
leetcode/<titleSlug>/solution.<ext>
leetcode/<titleSlug>/notes.md

State and local usage counters:

.pi/leetcode/state.json
.pi/leetcode/usage.json

Learning review

Use /lc-start with no slug or /lc-next and choose learning history. It scans tracked problems and notes.md files to summarize:

  • skills practiced
  • key lessons
  • mistakes to remember
  • missing notes files

If you delete leetcode/, the review may still know which problems were tracked, but detailed notes are gone unless backed up.

Privacy

Default behavior is local and privacy-safe:

  • No telemetry is sent.
  • No code is uploaded by this extension.
  • No LeetCode cookies are required.
  • Local usage counters stay in .pi/leetcode/usage.json.
  • Run/Submit opens LeetCode in your normal browser for manual action.

If you publish or fork this project, keep telemetry opt-in only.

Usage tracking

The extension writes local counters only:

{
  "commands": {
    "lc-start": 3,
    "lc-next": 8
  },
  "actions": {
    "1. Understand": 2,
    "6. Run": 1
  },
  "languages": {
    "javascript": 4
  },
  "difficulties": {
    "Medium": 3
  }
}

For public adoption after publishing, use npm downloads and GitHub stars/issues. Do not collect user code or notes.

Packaging for public release

This repo is configured as a Pi package via package.json:

{
  "keywords": ["pi-package", "pi-extension", "leetcode"],
  "pi": {
    "extensions": ["./src/leetcode.ts"]
  }
}

To publish to npm you need an npm account:

npm login
npm publish --access public

If you do not have npm login, publish to GitHub first and install via git:

git tag v0.1.0
git push origin main --tags
pi install git:github.com/YOUR_USER/[email protected]

Quality checks

npm run typecheck
npm run lint:namespaces

lint:namespaces verifies every command registered through pi.registerCommand starts with lc-.

Legacy live smoke tests

npm run smoke:live and npm run smoke:live:prompt are legacy API/auth smoke tests. They are not part of the default workflow, which avoids LeetCode judge APIs and opens LeetCode for manual Run/Submit instead.

License

MIT