pi-marketplace0.1.5
Pi extension for searching, auditing, and installing pi packages from npm — with security review and optional pi.dev enrichment
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
🛒 pi-marketplace
English | 简体中文
Pi extension for searching, auditing, and installing pi packages from npm — with built-in security review and optional pi.dev enrichment.
Developed and verified against Pi 1.8.0; the host Pi range is declared in peerDependencies.
Features
| Tool | What it does |
|---|---|
marketplace_search |
Search pi packages by keyword, filter by type (extension/skill/prompt/theme) |
marketplace_detail |
Full package info: version, author, license, pi manifest, dependencies, size |
marketplace_audit |
Security audit: metadata check + source code keyword scanning |
marketplace_install |
Audit → user confirmation → install (never auto-installs) |
Install
pi install npm:pi-marketplace
Reload if pi is already running:
/reload
Usage
Search packages
Ask pi to find packages:
Find me a Pi package for MCP
What theme packages are available?
Search for subagent-related extensions
View details
Show me details of pi-mcp-adapter
Security audit
Audit the package @some-user/some-pkg before installing
Install with review
Install pi-mcp-adapter (will run audit first)
How It Works
- Search: Queries npm registry with
keywords:pi-package, filters by your query - Type filtering: Fetches each result's
pimanifest to determine resource type locally - pi.dev enrichment (optional): Fetches pi.dev package cards to add author, human-readable downloads, relative publish time, and richer type display when available
- Security audit:
- Layer 1 — Metadata (zero cost): Resource types, dependency count, file count, package size, insecure flag
- Layer 2 — Source scan (downloads tarball): Scans published
.ts/.js/.mjs/.cjsfiles for dangerous patterns:- 🔴 Critical:
rm -rf,rimraf,fs.unlink,fs.rmdir - 🟠 High:
eval(),Function(),execSync(),spawn() - 🟡 Medium:
process.env,child_process, HTTP requests - 🟢 Low:
chmod,chown
- 🔴 Critical:
- Install: Shows audit report → requires explicit user confirmation → runs
pi install
Design Principles
- Registry-first: Search, detail, type filtering, and audit rely on npm registry metadata for correctness.
- Optional pi.dev enrichment: Search results can be enriched with pi.dev gallery metadata for better browsing and display.
- Never auto-installs: Always requires user confirmation after audit.
- Static scan disclaimer: Clearly states that keyword scanning cannot detect obfuscated code.
- Zero dependencies: Pure TypeScript, no runtime npm dependencies.
Development
git clone https://github.com/ssdiwu/pi-marketplace.git
cd pi-marketplace
npm install # peer deps
pi --no-extensions -e . # load only this extension for testing
Test
npm test
Type Check
npm run typecheck
Configuration
No configuration needed. All tools accept parameters at call time:
| Parameter | Tool | Description |
|---|---|---|
query |
search | Search keyword |
type |
search | Filter: extension / skill / prompt / theme |
limit |
search | Max results (default 20) |
name |
detail / audit / install | Package name |
deepScan |
audit / install | Download and scan source (default true) |
Documentation and Core Contracts
| Entry point | What it answers |
|---|---|
AGENTS.md |
Agent boundary: third-party package risk, audit and confirmation semantics, verification entry points, doc and Git rules |
src/README.md |
Source responsibilities and directory boundaries |
src/tools/README.md |
Which file owns which registered tool |
doc/README.md |
Documentation navigation: current bodies, decision archive, reference evidence |
doc/决策档案/ |
Hard-to-reverse decisions, one file per decision |
doc/references/ |
Source, impact assessment and historical proposals — not current authority |
CHANGELOG.md |
Released version history (English) |
The public tool contract (parameters, audit rules, confirmation semantics) lives in this README and the implementation; the security boundary lives in AGENTS.md.
Contributing
PRs and issues are welcome.
- This README has two language versions:
README.md(English) andREADME-zh.md(Chinese). Change both in the same commit; the two must stay semantically in sync. - The contribution and collaboration rules are in
AGENTS.mdanddoc/README.md. - Daily changelog entries are kept in Chinese in
CHANGELOG-zh.mdin this repository; the EnglishCHANGELOG.mdis updated per version at release time with the same user-perceivable facts. Both changelogs and both READMEs ship in the npm package. - Do not commit, push, tag or
npm publishwithout explicit approval from the maintainer.
License
MIT