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

v0.2.0

Published

Claude Code-style multi-question picker for pi. Tabbed picker with recommended answers, multi-select, and Other… text input.

Readme

pi-ask — Claude Code-style multi-question picker for pi

A small pi-coding-agent extension that registers one tool (ask_pro) for showing a tabbed, multi-question picker in pi's TUI. Inspired by Claude Code's AskUserQuestion.

Features

  • Multi-question — pass a list of questions; the user navigates between them with Tab / Shift+Tab or arrow keys
  • Numbered options14 instant-pick
  • Recommended answer — first option (or the one with recommended: true) is marked ⭐
  • Single-select (default) — Enter on an option auto-advances to the next question; on the last question, Enter submits
  • Multi-select — Enter toggles checkboxes; the last question shows a visible "Submit" row
  • Cancelled detectionEsc resolves {cancelled: true}

Usage from an LLM

ask_pro({
  questions: [
    {
      header: "Auth",                         // 1-2 word tab label
      question: "Which auth approach?",
      options: [
        { label: "JWT in httpOnly cookie", description: "Stateless, scales horizontally", recommended: true },
        { label: "JWT in localStorage",     description: "Simpler client, XSS risk" },
        { label: "Server sessions + Redis",  description: "Revocable, but extra dep" },
      ],
      multiSelect: false,
    },
    {
      header: "Tokens",
      question: "Token storage?",
      options: [
        { label: "httpOnly cookie" },
        { label: "Bearer in Authorization" },
      ],
    },
  ],
})

Result:

// user picked "JWT in httpOnly cookie" + "Bearer in Authorization":
{ answers: { 0: 0, 1: 1 } }

// user pressed Esc:
{ cancelled: true }

UX

┌─ pi-ask — 2 questions ────────────────────────────────────────┐
│ ◉ Auth    ○ Tokens                                              │
│                                                                 │
│ Q1 of 2: Which auth approach?                                  │
│                                                                 │
│   ❯ ⭐ JWT in httpOnly cookie                                   │
│       Stateless, scales horizontally                            │
│                                                                 │
│     JWT in localStorage                                         │
│     Simpler client, XSS risk                                    │
│                                                                 │
│     Server sessions + Redis                                     │
│     Revocable, but extra dependency                              │
│                                                                 │
│ ↑↓ navigate · 1-3 pick · tab/→ next · ⏎ next · esc cancel      │
└─────────────────────────────────────────────────────────────────┘

Keys

| Key | Action | |---|---| | / k | Move option up | | / j | Move option down | | 14 | Instant-pick that option | | Tab / | Next question | | Shift+Tab / / Backspace | Previous question | | Space | Multi-select only: toggle the current option. On "Other…", opens the input dialog. | | Enter | Single-select: confirm + advance (or submit on last). Multi-select: advance to next question (or submit on last + all answered). Does NOT toggle. | | Esc | Cancel (returns {cancelled: true}) |

Multi-select follows the Claude Code convention: Space toggles, Enter advances/submits. Single-select uses Enter as the universal action key (toggle/pick + advance). When you're on the last question and all questions are answered, the footer shows ⏎ submit in accent color.

Limits

  • 2–4 options per question (more is bad UX; the picker is meant for focused choices, not long lists)
  • 1–6 questions per call (more = tab-switching fatigue)
  • At most 1 recommended: true per question
  • TUI and RPC modes only (hasUI: true); print mode returns an error

Setup

Drop the directory in ~/.pi/agent/extensions/:

ls ~/.pi/agent/extensions/pi-ask/
# index.ts picker.ts tests/ package.json tsconfig.json README.md

pi auto-discovers and loads it on next start. The ask_pro tool is then available to the LLM. No config required.

Development

cd ~/.pi/agent/extensions/pi-ask
bun test              # runs tests/picker.test.ts
bun run typecheck     # tsc --noEmit

CI: not configured (this is a single-file TUI component, low risk). Add .github/workflows/ci.yml if you want green-tick PRs.

Why a separate extension?

The picker is generic — any pi extension (soly, your own tool, etc.) can use ask_pro to drive multi-question Q&A without re-implementing the TUI. Keeping it separate from soly means:

  • soly stays focused on the plan/execute/discuss workflow
  • other extensions can adopt the same UX pattern
  • the picker can evolve independently (new key bindings, themes, layouts)