feat(coding-agent): Add built-in update command (#3680)

This commit is contained in:
Armin Ronacher
2026-04-25 13:09:33 +02:00
committed by GitHub
parent 0b271a2c4f
commit dcf2651631
7 changed files with 372 additions and 35 deletions

View File

@@ -27,8 +27,12 @@ pi install /absolute/path/to/package
pi install ./relative/path/to/package
pi remove npm:@foo/bar
pi list # show installed packages from settings
pi update # update all non-pinned packages
pi list # show installed packages from settings
pi update # update pi and all non-pinned packages
pi update --extensions # update all non-pinned packages only
pi update --self # update pi only
pi update npm:@foo/bar # update one package
pi update --extension npm:@foo/bar
```
By default, `install` and `remove` write to global settings (`~/.pi/agent/settings.json`). Use `-l` to write to project settings (`.pi/settings.json`) instead. Project settings can be shared with your team, and pi installs any missing packages automatically on startup.
@@ -51,7 +55,7 @@ npm:@scope/pkg@1.2.3
npm:pkg
```
- Versioned specs are pinned and skipped by `pi update`.
- Versioned specs are pinned and skipped by package updates (`pi update`, `pi update --extensions`).
- Global installs use `npm install -g`.
- Project installs go under `.pi/npm/`.
- Set `npmCommand` in `settings.json` to pin npm package lookup and install operations to a specific wrapper command such as `mise` or `asdf`.
@@ -78,7 +82,7 @@ ssh://git@github.com/user/repo@v1
- HTTPS and SSH URLs are both supported.
- SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`).
- For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast.
- Refs pin the package and skip `pi update`.
- Refs pin the package and skip package updates (`pi update`, `pi update --extensions`).
- Cloned to `~/.pi/agent/git/<host>/<path>` (global) or `.pi/git/<host>/<path>` (project).
- Runs `npm install` after clone or pull if `package.json` exists.