Skill Tracer
Skills › Scientific Agent Skills › pi-agent › packages.md

packages.md

105 lines · skills/pi-agent/references/packages.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Pi Packages
2
3Source: https://pi.dev/docs/latest/packages
4
5Reviewed against Pi 0.99.2 and the package versions listed in `../SKILL.md` on 2026-09-30.
6
7Pi packages bundle extensions, skills, prompt templates, and themes for sharing through npm, git, URL, or local paths. Packages run with full system access — extensions execute arbitrary code and skills can instruct the model to run executables. Review third-party source before installing.
8

Pi Packages

Source: https://pi.dev/docs/latest/packages

Reviewed against Pi 0.99.2 and the package versions listed in ../SKILL.md on 2026-09-30.

Pi packages bundle extensions, skills, prompt templates, and themes for sharing through npm, git, URL, or local paths. Packages run with full system access — extensions execute arbitrary code and skills can instruct the model to run executables. Review third-party source before installing.

Raw lines 1 to 8
9## Install and Manage
11```bash
12pi install npm:@foo/bar@1.0.0
13pi install git:github.com/user/repo@v1
14pi install https://github.com/user/repo
15pi install /absolute/path/to/package
16pi install ./relative/path/to/package
18pi remove npm:@foo/bar
19pi list # installed packages from settings
20pi update # update pi only
21pi update --all # pi + packages; reconcile pinned git refs
22pi update --extensions # packages only; reconcile pinned git refs
23pi update --models # refresh model catalogs only
24pi update --self # update pi only
25pi update --self --force # reinstall pi even if current
26pi update npm:@foo/bar # update one package
27pi update --extension npm:@foo/bar
28pi config # enable/disable package resources
29```
31`install`/`remove` write to user settings by default; `-l` writes to project settings (`.pi/settings.json`), which can be shared with a team — Pi installs missing project packages automatically on startup after the project is trusted. To try a package for one run without installing, use `-e`/`--extension` (installs to a temporary directory):
33```bash
34pi -e npm:@foo/bar
35pi -e git:github.com/user/repo
36```

Install and Manage

pi install npm:@foo/bar@1.0.0
pi install git:github.com/user/repo@v1
pi install https://github.com/user/repo
pi install /absolute/path/to/package
pi install ./relative/path/to/package

pi remove npm:@foo/bar
pi list                     # installed packages from settings
pi update                   # update pi only
pi update --all             # pi + packages; reconcile pinned git refs
pi update --extensions      # packages only; reconcile pinned git refs
pi update --models          # refresh model catalogs only
pi update --self            # update pi only
pi update --self --force    # reinstall pi even if current
pi update npm:@foo/bar      # update one package
pi update --extension npm:@foo/bar
pi config                   # enable/disable package resources

install/remove write to user settings by default; -l writes to project settings (.pi/settings.json), which can be shared with a team — Pi installs missing project packages automatically on startup after the project is trusted. To try a package for one run without installing, use -e/--extension (installs to a temporary directory):

pi -e npm:@foo/bar
pi -e git:github.com/user/repo
Raw lines 9 to 37
38## Sources
40**npm** — `npm:@scope/pkg@1.2.3` or `npm:pkg`. Versioned specs are pinned and skipped by package updates. User installs go under `~/.pi/agent/npm/`, project installs under `.pi/npm/`. `npmCommand` in settings pins npm operations to a wrapper such as `mise`.
42**git** — `git:github.com/user/repo@v1`, `git:git@github.com:user/repo@v1`, `https://github.com/user/repo@v1`, `ssh://git@github.com/user/repo@v1`. Without the `git:` prefix only protocol URLs are accepted (`https://`, `http://`, `ssh://`, `git://`); with it, shorthand forms work. SSH URLs use your configured keys and respect `~/.ssh/config`. For CI, set `GIT_TERMINAL_PROMPT=0` and `GIT_SSH_COMMAND` (e.g. `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast. Refs are pinned tags or commits — updates reconcile an existing clone to the configured ref but never move it to a newer ref; use `pi install git:host/user/repo@new-ref` to move it. Clones live in `~/.pi/agent/git/<host>/<path>` or `.pi/git/<host>/<path>`. Reconciliation resets and cleans the clone, then runs `npm install` when `package.json` exists.
44**Local paths** — absolute or relative, added to settings without copying. Relative paths resolve against the settings file. A file loads as a single extension; a directory loads using package rules.

Sources

npm — npm:@scope/pkg@1.2.3 or npm:pkg. Versioned specs are pinned and skipped by package updates. User installs go under ~/.pi/agent/npm/, project installs under .pi/npm/. npmCommand in settings pins npm operations to a wrapper such as mise.

git — git:github.com/user/repo@v1, git:git@github.com:user/repo@v1, https://github.com/user/repo@v1, ssh://git@github.com/user/repo@v1. Without the git: prefix only protocol URLs are accepted (https://, http://, ssh://, git://); with it, shorthand forms work. SSH URLs use your configured keys and respect ~/.ssh/config. For CI, set GIT_TERMINAL_PROMPT=0 and GIT_SSH_COMMAND (e.g. ssh -o BatchMode=yes -o ConnectTimeout=5) to fail fast. Refs are pinned tags or commits — updates reconcile an existing clone to the configured ref but never move it to a newer ref; use pi install git:host/user/repo@new-ref to move it. Clones live in ~/.pi/agent/git/<host>/<path> or .pi/git/<host>/<path>. Reconciliation resets and cleans the clone, then runs npm install when package.json exists.

Local paths — absolute or relative, added to settings without copying. Relative paths resolve against the settings file. A file loads as a single extension; a directory loads using package rules.

Raw lines 38 to 45
46## Package Manifest
48```json
50 "name": "my-package",
51 "keywords": ["pi-package"],
52 "pi": {
53 "extensions": ["./extensions"],
54 "skills": ["./skills"],
55 "prompts": ["./prompts"],
56 "themes": ["./themes"]
57 }
59```
61Paths are relative to the package root and support glob patterns and `!exclusions`. The `pi-package` keyword makes the package visible in the [gallery](https://pi.dev/packages); add `pi.video` (MP4 only, autoplays on hover) or `pi.image` (PNG/JPEG/GIF/WebP) for a preview — video wins if both are set.
63Without a manifest, Pi auto-discovers convention directories: `extensions/` (`.ts` and `.js`), `skills/` (recursive `SKILL.md` folders plus top-level `.md` files), `prompts/` (`.md`), `themes/` (`.json`).

Package Manifest

{
  "name": "my-package",
  "keywords": ["pi-package"],
  "pi": {
    "extensions": ["./extensions"],
    "skills": ["./skills"],
    "prompts": ["./prompts"],
    "themes": ["./themes"]
  }
}

Paths are relative to the package root and support glob patterns and !exclusions. The pi-package keyword makes the package visible in the gallery; add pi.video (MP4 only, autoplays on hover) or pi.image (PNG/JPEG/GIF/WebP) for a preview — video wins if both are set.

Without a manifest, Pi auto-discovers convention directories: extensions/ (.ts and .js), skills/ (recursive SKILL.md folders plus top-level .md files), prompts/ (.md), themes/ (.json).

Raw lines 46 to 64
65## Dependencies
67Third-party runtime dependencies belong in `dependencies`; Pi runs `npm install` when installing from npm or git.
69Pi bundles core packages for extensions and skills. If you import `@earendil-works/pi-ai`, `@earendil-works/pi-agent-core`, `@earendil-works/pi-coding-agent`, `@earendil-works/pi-tui`, or `typebox`, list them in `peerDependencies` with `"*"` and do not bundle them or add physical runtime copies in `dependencies`. Managed installs suppress automatic peer installation; local packages retain the author's dependency tree. A duplicate host package can create separate classes and registries in compiled ESM.
71Other Pi packages must be bundled: add them to `dependencies` **and** `bundledDependencies`, then reference their resources through `node_modules/` paths. Pi loads packages with separate module roots, so separate installs neither collide nor share modules.

Dependencies

Third-party runtime dependencies belong in dependencies; Pi runs npm install when installing from npm or git.

Pi bundles core packages for extensions and skills. If you import @earendil-works/pi-ai, @earendil-works/pi-agent-core, @earendil-works/pi-coding-agent, @earendil-works/pi-tui, or typebox, list them in peerDependencies with "*" and do not bundle them or add physical runtime copies in dependencies. Managed installs suppress automatic peer installation; local packages retain the author's dependency tree. A duplicate host package can create separate classes and registries in compiled ESM.

Other Pi packages must be bundled: add them to dependencies and bundledDependencies, then reference their resources through node_modules/ paths. Pi loads packages with separate module roots, so separate installs neither collide nor share modules.

Raw lines 65 to 72
73## Filtering
75```json
77 "packages": [
78 "npm:simple-pkg",
79 {
80 "source": "npm:my-package",
81 "extensions": ["extensions/*.ts", "!extensions/legacy.ts"],
82 "skills": [],
83 "prompts": ["prompts/review.md"],
84 "themes": ["+themes/legacy.json"]
85 }
86 ]
88```
90Omit a key to load all of that type, `[]` to load none, `!pattern` to exclude matches, `+path` to force-include an exact path, `-path` to force-exclude. `+`/`-` paths are exact and relative to the package root. Filters narrow what the manifest already allows.

Filtering

{
  "packages": [
    "npm:simple-pkg",
    {
      "source": "npm:my-package",
      "extensions": ["extensions/*.ts", "!extensions/legacy.ts"],
      "skills": [],
      "prompts": ["prompts/review.md"],
      "themes": ["+themes/legacy.json"]
    }
  ]
}

Omit a key to load all of that type, [] to load none, !pattern to exclude matches, +path to force-include an exact path, -path to force-exclude. +/- paths are exact and relative to the package root. Filters narrow what the manifest already allows.

Raw lines 73 to 91
92## Enable/Disable and Scope
94`pi config` toggles extensions, skills, prompt templates, and themes from installed packages and local directories. It starts in global settings; Tab switches between global and project-local, and `pi config -l` starts in project overrides with inherited global resources dimmed.
96A package can appear in both global and project settings. The project entry wins unless it sets `autoload: false`, in which case it applies as a delta over the global entry. Identity: npm package name, git repository URL without ref, or resolved absolute path for local packages.

Enable/Disable and Scope

pi config toggles extensions, skills, prompt templates, and themes from installed packages and local directories. It starts in global settings; Tab switches between global and project-local, and pi config -l starts in project overrides with inherited global resources dimmed.

A package can appear in both global and project settings. The project entry wins unless it sets autoload: false, in which case it applies as a delta over the global entry. Identity: npm package name, git repository URL without ref, or resolved absolute path for local packages.

Raw lines 92 to 97
98## Notable Ecosystem Packages
100- `pi install npm:pi-subagents` — delegation, chains, parallel runs: `references/pi-subagents.md`
101- `pi install npm:pi-mcp-adapter` — token-efficient MCP server access: `references/pi-mcp-adapter.md`
102- `pi install npm:pi-web-access` — web search, URL/PDF/repo fetching, video understanding: `references/pi-web-access.md`
103- `pi install npm:pi-interview` — interactive interview forms: `references/pi-interview.md`
104- `pi install npm:glimpseui` — native macOS WebView windows used by several packages
105- `pi install npm:@gotgenes/pi-permission-system` — runtime allow/ask/deny policy, composes with pi-subagents

Notable Ecosystem Packages

  • pi install npm:pi-subagents — delegation, chains, parallel runs: references/pi-subagents.md
  • pi install npm:pi-mcp-adapter — token-efficient MCP server access: references/pi-mcp-adapter.md
  • pi install npm:pi-web-access — web search, URL/PDF/repo fetching, video understanding: references/pi-web-access.md
  • pi install npm:pi-interview — interactive interview forms: references/pi-interview.md
  • pi install npm:glimpseui — native macOS WebView windows used by several packages
  • pi install npm:@gotgenes/pi-permission-system — runtime allow/ask/deny policy, composes with pi-subagents
Raw lines 98 to 105
Starts an agent subagents :100
Uses an outside tool MCP :101