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

@ssweens/pi-huddle

v1.0.0

Published

Huddle mode for pi - safe exploration and structured elicitation before execution

Readme

pi-huddle

Huddle mode — permission-gated exploration

ask_user — structured multi-question elicitation

pi install @ssweens/pi-huddle

Huddle mode for pi. Safe exploration with permission gates, plus a powerful ask_user tool for structured multi-question elicitation. Toggle with /huddle, /holup, /plan, or Alt+H.

Features

  • Huddle mode — read-only by default; writes require your approval
  • ask_user tool — rich TUI dialog for structured elicitation (available in all modes)
  • Permission gates — approve or deny individual edit/write operations inline
  • Bash allowlist — safe commands execute freely, destructive ones prompt first
  • Three commands/huddle (primary), /holup, /plan all toggle the mode
  • Alt+H shortcut — Option+H on Mac
  • CLI flagpi --plan to start in huddle mode
  • Session persistence — huddle state survives session resume

Installation

pi install /path/to/pi-huddle

# Or project-local
pi install -l /path/to/pi-huddle

Usage

Toggle Huddle Mode

/huddle              # primary command
/holup               # alias
/plan                # alias (backward compat)
Alt+H (Option+H)     # keyboard shortcut

Start in Huddle Mode

pi --huddle          # start pi directly in huddle mode
pi --plan            # alias (backward compat)

Workflow

  1. Enter huddle mode/huddle or Alt+H
  2. Use ask_user — gather requirements and clarify before acting
  3. Explore safely — read, search, and analyze freely
  4. Approve edits on demand — each write operation requires approval
  5. Exit when ready — toggle off to restore full access

ask_user Tool

The ask_user tool is available in all modes — not just huddle. It presents a rich TUI dialog with one tab per question, numbered options, freeform text input, and a submit/review view.

Dialog UX

← □ Auth method  □ Library  ✓ Submit →

Which auth approach should I use?

  1. JWT tokens
     Stateless, scales well, standard choice.
  2. Session cookies
     Simpler for server-rendered apps.
  3. OAuth2 / OIDC
     Best for third-party login integration.
  4. API keys
     Simplest for machine-to-machine auth.
  5. |ype something.      ← freeform field, type immediately
  ────────────────────────────────────────
  6. Chat about this

Enter to select · Tab/↑↓ to navigate · Esc to cancel
  • Tab bar/ or Tab/Shift+Tab to navigate between questions and Submit
  • Options/ to move, Enter to select
  • Freeform — navigate to row 5, start typing immediately; Enter to confirm
  • Chat about this — tells the agent the user wants to discuss before deciding
  • Submit view — recap of all answers before final submission
  • multiSelect: trueSpace or Enter to toggle, multiple selections allowed

Tool Call Example

{
  "questions": [
    {
      "question": "Which auth approach should I use?",
      "header": "Auth method",
      "options": [
        {
          "label": "JWT tokens (Recommended)",
          "description": "Stateless, scales well, standard choice",
          "markdown": "Authorization: Bearer <token>"
        },
        {
          "label": "Session cookies",
          "description": "Simpler for server-rendered apps"
        },
        {
          "label": "OAuth2 / OIDC",
          "description": "Best for third-party login integration"
        }
      ],
      "multiSelect": false
    },
    {
      "question": "Which features do you want to enable?",
      "header": "Features",
      "options": [
        { "label": "Logging", "description": "Structured JSON logs" },
        { "label": "Metrics", "description": "Prometheus /metrics endpoint" },
        { "label": "Tracing", "description": "OpenTelemetry spans" },
        { "label": "Alerts", "description": "PagerDuty integration" }
      ],
      "multiSelect": true
    }
  ]
}

Return Value

{
  "answers": {
    "Which auth approach should I use?": "JWT tokens (Recommended)",
    "Which features do you want to enable?": "Logging, Tracing"
  },
  "annotations": {},
  "metadata": {}
}

Usage Notes

  • 1–4 questions per call
  • 2–4 options per question
  • markdown field shows a code preview when an option is focused
  • multiSelect: true for feature flags, configuration choices, etc.
  • Put "(Recommended)" at end of preferred option label
  • If user selects "Chat about this", agent should respond conversationally

Permission Gates

✅ Always Allowed

| Tool | Description | |------|-------------| | read | Read file contents | | bash | Allowlisted safe commands | | grep | Search within files | | find | Find files | | ls | List directories | | ask_user | Structured elicitation |

⚠️ Requires Permission

  • edit — file modifications
  • write — file creation/overwriting
  • Non-allowlisted bash commands

Permission Dialog

⚠ Huddle Mode — edit: /path/to/file.ts
[Allow]  [Deny]  [Deny with feedback]

Deny with feedback sends the reason to the agent so it can adjust.

Safe Bash Commands (No Prompt)

cat, head, tail, grep, find, rg, fd, ls, pwd, tree, git status, git log, git diff, git branch, npm list, curl, jq

Blocked Bash Commands (Prompt Required)

rm, mv, cp, mkdir, touch, git add, git commit, git push, npm install, yarn add, pip install, sudo, >, >>


Architecture

pi-huddle/
├── package.json          # Package manifest
├── extensions/
│   ├── index.ts          # Commands, shortcuts, ask_user tool, permission gates
│   └── lib/
│       ├── ask-user-dialog.ts  # TUI dialog component
│       └── utils.ts            # Bash command classification
├── skills/
│   └── huddle/
│       └── SKILL.md      # Teaches the agent huddle mode behaviour
├── LICENSE
└── README.md

Two pi primitives:

  • Extension — registers /huddle, /holup, /plan commands, Alt+H shortcut, ask_user tool, permission gates, and context injection
  • Skill — documents huddle mode and ask_user behaviour so the agent knows how to use them

Development

/reload    # Hot-reload after editing
/huddle    # Test huddle mode

License

MIT