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

@d3ara1n/pi-command-palette

v0.7.0

Published

Global command palette for pi — press Ctrl+Shift+P to search and run commands from anywhere

Readme

pi-command-palette

npm version npm downloads license

Global command palette for Pi Coding Agent — press Ctrl+Shift+P to search and run commands from anywhere.

Why?

Pi's slash commands (/model, /compact, extension commands, etc.) only work when the editor is empty. If you've typed something and want to switch models or run a command, you're stuck. This extension opens a floating command palette via keyboard shortcut, regardless of editor state.

Dependencies

Installation

pi install npm:@d3ara1n/pi-command-palette

Or add to ~/.pi/agent/settings.json:

{
  "extensions": [
    "/absolute/path/to/pi-extensions/packages/pi-command-palette"
  ]
}

Usage

| Shortcut | Action | |----------|--------| | Ctrl+Shift+P (default, configurable) | Open command palette |

The palette opens as a single macOS-launcher-style overlay with nested pages. The root page mixes leaves and sub-pages: built-in actions and the model selector sit directly on the root, while the remaining categories open as sub-pages — selecting one with Enter replaces the current list in the same overlay instead of opening a second overlay. Press Backspace with an empty search field to return to the parent page; press Esc to close the palette immediately.

The root page lists:

  • Built-in actions — curated shortcuts for common operations, shown directly on the root page so urgent entries like Restore never hide behind a sub-page (detailed below)
  • Models — a sub-page listing every model with a configured API key (see below)
  • Extension Actions — a sub-page of entries registered by other extensions that run a callback directly (see below)
  • Commands / Skills / Templates — sub-pages for all registered /command entries, installed skills, and prompt templates; entries are labeled with their bare /name since the breadcrumb already names the category

Use ↑/↓ to move through entries and ←/→ to edit the search cursor. Search is fuzzy within the current page and updates as you type; searching the root page also matches entries from every sub-page, with each match's category shown next to its description. Backspace uses the normal text-editing behavior while the query is non-empty.

Built-in actions

Built-in actions are grouped by how they run:

Run immediately — they call pi's API directly, no editor round-trip:

| Action | What it does | |--------|--------------| | Session: Compact | Compact the conversation right away | | Editor: Copy Content | Copy current editor text to the clipboard | | Editor: Clear Content | Clear the editor, saving the current text to the restore buffer | | Restore: Previous Editor Text | Bring back text saved before the last command (appears only when available) |

Fill the editor — they insert the matching /command for you to submit, just like any extension command:

| Action | Inserts | |--------|---------| | Session: New | /new | | Session: Reload | /reload | | Session: Fork | /fork | | Session: Tree | /tree | | Session: Resume | /resume |

Pi ships with more built-in slash commands (e.g. /export, /share, /name, /settings). This palette only surfaces a curated subset above — for the rest, type them directly into the editor.

Native commands from other extensions

Extensions built on @d3ara1n/pi-command-palette-core can register palette entries backed by a direct callback instead of a /command editor fill. They appear above the extension-command entries, and selecting one runs the callback in place — your editor text is never touched, saved, or restored:

import { paletteCommandRegistry } from "@d3ara1n/pi-command-palette-core";

paletteCommandRegistry.register({
  id: "my-plugin:do-thing",
  label: "My Plugin: Do the Thing",
  description: "Runs immediately, without touching the editor",
  run: (pi, ctx) => { /* ... */ },
});

The registry is read every time the palette opens, so commands can be registered and unregistered at any time. Failures inside run are caught and surfaced as an error notification. See the core package for the full API.

Editor text preservation

When a command replaces your editor text, or you run Editor: Clear Content, the original content is saved and a Restore: Previous Editor Text entry appears at the top of the palette. Select it to get your text back.

Model selector

The "Models" entry opens a model page inside the same overlay. Models are loaded when the page is first entered, then can be searched and selected without stacking another overlay.

Scoped models float to the top, marked with a ★ (favorite) prefix. "Scoped" here means the same set pi uses for its built-in selector's scoped tab and Ctrl+P cycling — the enabledModels patterns in your settings.json (project .pi/settings.json overrides global ~/.pi/agent/settings.json). Everything else follows alphabetically. Filtering preserves that boundary too — scoped matches stay above the rest while you type, rather than collapsing into one score-ordered list. If no scope is configured, the list is a plain alphabetical roster — nothing breaks.

Configuration

The default shortcut is Ctrl+Shift+P, matching VS Code's Command Palette for familiar muscle memory. If it conflicts with your terminal or other shortcuts, override it via either of the following (evaluated in order, first match wins).

1. Environment variable

Useful for terminals that intercept Ctrl+Shift+<key> before it reaches the session (e.g. Termius on Windows/WSL2):

export PI_COMMAND_PALETTE_KEY=ctrl+shift+p

Add it to your shell profile to persist (~/.zshrc on macOS, ~/.bashrc on bash).

2. settings.json

Set commandPalette.shortcut in ~/.pi/agent/settings.json (global) or .pi/settings.json in your project. A present project commandPalette block replaces the global block:

{
  "commandPalette": {
    "shortcut": "ctrl+shift+p"
  }
}

Any valid pi keybinding string works (e.g. ctrl+shift+p, ctrl+shift+k, ctrl+alt+k, ctrl+k). Restart pi (or run /reload) after changing the shortcut.