Skip to content

Commit 158b949

Browse files
authored
docs: document first-publish workflow, add npm: prefix to install commands (#11)
- Document that new packages need a manual `npm publish` before OIDC trusted publishing works - Add step-by-step for configuring trusted publishing on npmjs.com - Add `npm:` prefix to all `pi install` commands across READMEs Co-authored-by: mgabor3141 <@mgabor3141>
1 parent 2f8afd6 commit 158b949

5 files changed

Lines changed: 24 additions & 10 deletions

File tree

DEVELOPMENT.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,28 @@ Multiple PRs with changesets accumulate — the Version Packages PR collects the
7070

7171
Review the version bumps and changelog entries, then merge. The workflow runs again and publishes new versions to npm via OIDC using `yarn npm publish`.
7272

73-
### Trusted publishing
73+
### New packages — first publish
7474

75-
The release workflow uses GitHub Actions OIDC (`id-token: write` permission) to authenticate with npm. No `NPM_TOKEN` secret is needed. Each package must have a trusted publisher configured on npmjs.com:
75+
OIDC trusted publishing only works for packages that already exist on npm. The very first version of a new package must be published manually:
7676

77-
- **Owner:** `mgabor3141`
78-
- **Repository:** `yapp`
79-
- **Workflow:** `release.yml`
80-
- **Environment:** (blank)
77+
```bash
78+
npm login # one-time, if not already logged in
79+
cd packages/<new-package>
80+
npm publish --access public
81+
cd ../..
82+
```
83+
84+
Then configure trusted publishing on npmjs.com so CI can handle subsequent releases:
85+
86+
1. Go to **npmjs.com → package → Settings → Publishing access**
87+
2. Under **Trusted publishers**, add:
88+
- **Owner:** `mgabor3141`
89+
- **Repository:** `yapp`
90+
- **Workflow:** `release.yml`
91+
- **Environment:** (blank)
92+
3. Set `Require two-factor authentication and disallow tokens`
93+
94+
After this, the changeset workflow handles all future versions.
8195

8296
### Notes
8397

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Utilities for running [pi](https://pi.dev) agents with less babysitting: auto-re
99
Install the extensions together, or pick only the ones you want. Defaults are tuned for good behavior out of the box.
1010

1111
```bash
12-
pi install pi-safeguard pi-bash-trim pi-desktop-notify pi-no-soft-cursor
12+
pi install npm:pi-safeguard npm:pi-bash-trim npm:pi-desktop-notify npm:pi-no-soft-cursor
1313
```
1414

1515
### [pi-safeguard](packages/safeguard/)

packages/bash-trim/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Smart bash output trimming for [pi](https://pi.dev). Keeps context lean so the agent spends tokens on thinking, not on scrolling past 2000 lines of build output.
66

77
```bash
8-
pi install pi-bash-trim
8+
pi install npm:pi-bash-trim
99
```
1010

1111
No configuration needed.

packages/desktop-notify/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Desktop notifications for terminal applications. Focus-aware — suppresses noti
1515

1616
As a pi extension:
1717
```bash
18-
pi install pi-desktop-notify
18+
pi install npm:pi-desktop-notify
1919
```
2020

2121
As a library:

packages/safeguard/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Security guardrail for [pi](https://pi.dev). Catches destructive commands, secret leaks, and overeager agents — without interrupting normal dev work.
66

77
```bash
8-
pi install pi-safeguard
8+
pi install npm:pi-safeguard
99
```
1010

1111
No API keys, no config files. The judge model is auto-selected from your active provider.

0 commit comments

Comments
 (0)