@usepowerplant/cli 0.4.11 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ <!--
2
+ This file is the public npm page of @usepowerplant/cli. Write only what a
3
+ customer needs. Team procedures go in RELEASING.md, which npm does not publish.
4
+ Rule: docs/client-engineering-rules.md, "Releases".
5
+ -->
6
+
1
7
  # @usepowerplant/cli
2
8
 
3
9
  Set up a machine for [Powerplant](https://powerplant.sh): enroll it into
@@ -19,7 +25,7 @@ re-run at any time — finished steps are skipped with a note:
19
25
  1. **Enroll this machine.** Your browser opens so you can approve the
20
26
  machine into your org. On macOS, the credential is encrypted in a local
21
27
  file with its key in Keychain; other platforms use a file only your user
22
- can read. See [credential storage and reset](../../README.md#quick-staging-reset).
28
+ can read.
23
29
  2. **Install the background service.** The sync service watches your local
24
30
  coding-agent sessions (Claude Code, Codex, and Cursor) and uploads the
25
31
  ones in scope. If recent sessions name repositories under a macOS-protected
@@ -119,8 +125,10 @@ powerplant update
119
125
  That reinstalls `@usepowerplant/cli` with whichever package manager put it
120
126
  on this machine (npm, pnpm, bun, or yarn), so the copy that is running is the
121
127
  copy that gets replaced, then restarts the background sync onto the new
122
- version. Running the manager's own global install yourself works too: the
123
- service notices the new version on disk and restarts itself within moments.
128
+ version. When this machine already has the newest version available to it,
129
+ `update` says so and changes nothing. Running the manager's own global
130
+ install yourself works too: the service notices the new version on disk and
131
+ restarts itself within moments.
124
132
  When the install can't be replaced this way (a folder only an administrator
125
133
  can write, or a layout the CLI doesn't recognise), `update` says why and
126
134
  prints the command to run instead. `powerplant status` tells you when a
@@ -144,133 +152,17 @@ The one exception is a registry that does not serve the release yet (npm's
144
152
  cache can lag a publish by a few minutes): the sync tries that release
145
153
  again on its next hourly checks, up to three times, and the menu says so.
146
154
 
155
+ Powerplant offers your machine a release only after the team has tested
156
+ it, so the version it offers can be older than the newest version listed on
157
+ npm. Powerplant never offers or automatically installs a version older
158
+ than the one you have.
159
+
147
160
  Powerplant also publishes the oldest version it still supports. When yours
148
161
  is older, `powerplant status`, `powerplant doctor`, the menu bar app, and
149
162
  the sync service log all say so and point you at `powerplant update`. Nothing
150
163
  stops working on that notice — an unsupported version keeps syncing, but
151
164
  it is no longer tested or fixed, so update when you see it.
152
165
 
153
- ### How a release reaches production
154
-
155
- The same CLI package serves every environment. Staging, development, and
156
- agent installs follow npm's `next` tag; enrolled production installs follow
157
- the exact version promoted through the production API. Fresh installs
158
- without a tag resolve npm's `latest`. Use a separate staging install below
159
- to test `next` while keeping your production install on its promoted version.
160
-
161
- 1. **Release.** The "Release CLI to next" workflow (GitHub Actions,
162
- manual) builds the CLI, signs and notarizes the menu bar app into the
163
- package, and publishes to the `next` tag. Staging, development, and
164
- agent installs with automatic updates enabled check at boot and hourly
165
- while the service is running. Sleeping machines, disabled updates, and
166
- failed installs can leave a machine behind. Verify the installed staging
167
- version and exercise sync and the menu actions you changed before
168
- promoting; elapsed time alone is not evidence of testing. Promote only
169
- after the workflow's "Wait until npm serves the release" step is green:
170
- npm's CDN caches the package document for about five minutes after a
171
- publish, and a production machine that checks inside that window gets
172
- "no matching version" and waits an hour to try again.
173
- 2. **Promote.** From a repo checkout with npm package access and `gh`
174
- signed in, name the version you tested:
175
-
176
- ```bash
177
- pnpm cli:promote:release 0.5.0
178
- ```
179
-
180
- Or, if `next` still points at that tested version:
181
-
182
- ```bash
183
- pnpm cli:promote:release
184
- ```
185
-
186
- Omitting the version resolves `next` when the command runs.
187
- The script moves npm's `latest` from your terminal, with your security
188
- key in the browser (npm requires a live second factor for every
189
- dist-tag move, so no CI credential can do this half), then dispatches
190
- the Promote CLI workflow, which verifies the tag and points production
191
- machines at the same artifact. The script watches the workflow; confirm
192
- the pointer write succeeded before calling the promotion complete.
193
- If the tag moved but that write failed, fresh installs are ahead of
194
- enrolled machines. Re-dispatch **the same version**, then check that run:
195
-
196
- ```bash
197
- gh workflow run promote-cli.yml -f version=0.5.0
198
- ```
199
-
200
- A failed Slack announcement after a successful pointer write does not
201
- undo promotion. Read the failed step before retrying.
202
- 3. **Adopt.** Running production services with automatic updates enabled
203
- check for the promoted version at boot and hourly. Other users can
204
- update from the menu bar or `powerplant update`; `powerplant status`
205
- reports the available version. Until something is promoted, production
206
- sees no update target, only the supported-version floor.
207
-
208
- Promoting an older version is the brake: production holds there, `latest`
209
- moves back for new installs, and no enrolled machine ever downgrades. A
210
- bad release is undone by a new release and a new promotion.
211
-
212
- ### Staging beside production on one Mac
213
-
214
- Use production for day-to-day team work. Staging is for testing enrollment,
215
- onboarding, and releases. See the [internal machine setup guide](../../README.md#set-up-your-machine)
216
- for access and data boundaries: running sync in both environments uploads
217
- and processes eligible sessions twice.
218
-
219
- A machine has one global `powerplant` by default, and the background sync
220
- for each environment runs whatever copy `init` was run from. To try
221
- releases on staging while production keeps the promoted version, give
222
- staging its own copy under its own npm prefix and set it up from there:
223
-
224
- ```bash
225
- npm install -g --prefix ~/.powerplant-staging @usepowerplant/cli@next
226
- ~/.powerplant-staging/bin/powerplant init --env staging
227
- ```
228
-
229
- `init --env staging` also points each selected agent's shared `powerplant`
230
- MCP connection at staging. Separate npm prefixes do not isolate that entry.
231
- After testing, run `powerplant connect` from your production install to
232
- restore the agents' production connection; the staging sync service keeps
233
- running. Include `--env staging` on every staging command.
234
-
235
- The `@next` pin matters: a bare install resolves `latest`, the production
236
- channel, so the new staging copy would start on the promoted release and
237
- test nothing until its first update.
238
-
239
- The staging daemon runs that copy and updates it in place (the updater
240
- pins npm to the prefix the running copy lives under), so
241
- `~/.powerplant-staging` follows the `next` channel while the production
242
- install follows the promoted one. Run staging commands through that path,
243
- `~/.powerplant-staging/bin/powerplant status --env staging`.
244
- Use `~/.powerplant-staging/bin/powerplant update --env staging` to update
245
- now, then `~/.powerplant-staging/bin/powerplant doctor --env staging` to
246
- check the installed version, service, and install location.
247
-
248
- ### Menu bar apps during release testing
249
-
250
- The npm package, including `@next`, contains **Powerplant.app**, the
251
- production app. Only production `init` installs it and the production
252
- service refreshes it after CLI updates. Staging `init` does neither.
253
-
254
- Run **Powerplant Staging.app** separately, alongside production. Its icon
255
- has an "S", and it uses the CLI at `~/.powerplant-staging/bin/powerplant`
256
- when present. Follow the menu bar app's [local build instructions](../../apps/menubar/README.md#development)
257
- or [signed release instructions](../../apps/menubar/README.md#release).
258
- Rebuild or replace that staging app when testing native app changes;
259
- updating the staging CLI does not update it. This tests the staging variant,
260
- not the exact signed production bundle embedded in the npm package.
261
-
262
- ### Web and API promotion is separate
263
-
264
- Merges to `main` deploy to staging automatically. The
265
- [Promote to Production workflow](../../.github/workflows/promote.yml) can
266
- promote the live staging API commit after its E2E check passes, with the
267
- production schema and web build from that commit. Automatic runs happen
268
- on CI completion and an hourly catch-up during weekdays, 09:00 to before
269
- 16:00 America/Vancouver, unless `AUTO_PROMOTE_PAUSED=true`. A manual
270
- workflow dispatch can promote outside that window. Staging does not wait
271
- indefinitely for manual QA. This workflow does not promote the CLI;
272
- `pnpm cli:promote:release` does not deploy the web or API.
273
-
274
166
  ### Moving from @powerplant-sh/cli
275
167
 
276
168
  Releases up to 0.2.1 were published as `@powerplant-sh/cli`. That package