Search npm for installable Pi packages, then install the right one without leaving Pi.
pi-package-search adds package discovery to Pi with two tools and a matching skill:
search_pi_packagessearches npm for packages tagged withpi-packageinstall_pi_packageinstalls the package the user chooses/skill:pi-package-searchguides Pi to use the right workflow
It uses the same npm registry search endpoint behind the Pi package gallery, then formats results as ready-to-run pi install commands.
Discovering Pi packages is easier when Pi can do the searching for you.
This package helps Pi:
- find relevant packages from npm
- stay focused on packages intended for Pi
- return short descriptions with copy-pasteable install commands
- install a selected package in global or project scope
| Component | Name | Purpose |
|---|---|---|
| Tool | search_pi_packages |
Search npm for packages tagged with pi-package |
| Tool | install_pi_package |
Run pi install for a chosen package |
| Skill | /skill:pi-package-search |
Prompt Pi to use the package discovery workflow |
pi install /absolute/path/to/pi-package-searchpi install npm:pi-package-searchFind pi packages for session searchSearch for pi packages related to browser automationShow me pi packages for git workflows
/skill:pi-package-search browser automation
Found 3 pi packages for "browser automation"
1. @scope/package-name@1.2.3
Short description here.
Install: pi install npm:@scope/package-name
npm: https://www.npmjs.com/package/@scope/package-name
If the user already knows what they want, install_pi_package can install it directly:
- global scope:
pi install npm:@scope/package-name - project scope:
pi install -l npm:@scope/package-name - it also tolerates the user or model passing the full command back in, like
pi install npm:@scope/package-name
search_pi_packages calls the npm registry search API and automatically adds the keywords:pi-package filter.
Each result is normalized into:
- package name and version
- short description
- npm package URL
- homepage URL when available
- a copy-pasteable
pi installcommand
install_pi_package accepts either:
- a bare package name like
@scope/pkg - a full npm source like
npm:@scope/pkg@1.2.3 - a full command like
pi install npm:@scope/pkgorpi install -l @scope/pkg
npm install
npm run checkUseful commands:
npm run test
npm run lint
npm run format
npm run typecheck
npm run e2e
npm run publish:dry-runextensions/index.ts # Registers the tools with Pi
src/search-pi-packages.ts # npm search client + result formatting
src/install-pi-package.ts # pi install wrapper
skills/pi-package-search/ # matching discovery skill
tests/ # Vitest coverage for tools and extension wiring
Run the real Pi flow locally with your configured Pi model credentials:
npm run e2eWhat it does:
- creates a temporary git repo
- installs this package into that repo
- runs
/skill:pi-package-search session search - verifies
search_pi_packageswas called - runs
Install @kaiserlich-dev/pi-session-search in this project. - verifies
install_pi_packagewas called and updated.pi/settings.json
Useful environment variables:
PI_PACKAGE_SEARCH_SOURCE— override the package source, for examplenpm:pi-package-searchPI_E2E_TEST_INSTALL_PACKAGE— package installed during the smoke testPI_E2E_MODEL— override the Pi model used during the runPI_E2E_KEEP_TMPDIR=1— keep the temp directory for debuggingPI_E2E_ISOLATE_AGENT_DIR=1— use a clean Pi config directory instead of your current auth/config
Local publish sanity check:
npm run publish:dry-runOne-time npm setup after the first manual publish:
- open the
pi-package-searchpackage settings on npmjs.com - add a trusted publisher for the GitHub repo
forjd/pi-package-search - select the workflow file
.github/workflows/release.yml
GitHub Actions workflows included in this repo:
CI— lint, typecheck, unit tests, andnpm pack --dry-runConventional Commits— enforces a semantic pull request titleE2E— installs the package into a temp repo and exercises the real Pi flowRelease Please— opens release PRs, bumps semver versions, and publishes to npm with trusted publishing when a release is created
Note
npm publishing now uses npm trusted publishing via GitHub Actions OIDC, so the release workflow does not need NPM_TOKEN or any model provider key.
This repository uses Conventional Commits for release automation.
Local enforcement:
simple-git-hooksrunscommitlintin thecommit-msghookpre-commitstill runs lint + typecheckpre-pushstill runs tests
GitHub enforcement:
- the
Conventional Commitsworkflow checks pull request titles Release Pleasereads conventional commit history to decide whether the next release is a patch, minor, or major bump- when Release Please creates a release, the same workflow publishes the package to npm automatically with trusted publishing
- model-backed Pi smoke tests stay in the separate
E2Eworkflow, not in the release path
- Vitest covers URL building, result mapping, formatting, install behavior, and extension registration
- Biome handles formatting and linting
- GitHub Actions runs CI plus a real Pi E2E smoke test workflow
- commitlint and semantic PR checks enforce conventional commits
- release-please is bootstrapped from the manually published
0.1.0release via.release-please-manifest.json
MIT © Dan