@usepowerplant/cli 0.4.4 → 0.4.6
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 +108 -19
- package/dist/cli.js +1127 -560
- package/dist/menubar/Powerplant.app.zip +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,11 @@ re-run at any time — finished steps are skipped with a note:
|
|
|
24
24
|
ones in scope. If recent sessions name repositories under a macOS-protected
|
|
25
25
|
location such as Documents, init lists the location and asks before reading
|
|
26
26
|
Git metadata there; declining leaves those sessions local. The service
|
|
27
|
-
starts on login and keeps itself running.
|
|
27
|
+
starts on login and keeps itself running. On macOS, init also installs
|
|
28
|
+
the Powerplant menu bar app from this package into `~/Applications` and
|
|
29
|
+
launches it; the app registers itself to start at login (turn that off
|
|
30
|
+
from its More menu), and the background service keeps it on the same
|
|
31
|
+
version as the CLI after every update.
|
|
28
32
|
3. **Add MCP to your agents.** Init lists the agents it found — Claude Code,
|
|
29
33
|
Codex, and Cursor — as checked boxes. They all start selected; use the arrow
|
|
30
34
|
keys and Space to turn off any you want to skip, then press Enter (`--yes`,
|
|
@@ -98,6 +102,9 @@ day-to-day upload path on machines that can't run it; asked for explicitly, it
|
|
|
98
102
|
still runs while paused and says so. `disconnect` is the
|
|
99
103
|
inverse of `connect`: it removes each agent's Powerplant MCP entry and the
|
|
100
104
|
sign-in stored with it, and agents that were never connected just say so.
|
|
105
|
+
Use `powerplant disconnect --client claude` to remove only Claude's connection.
|
|
106
|
+
The `--client` option also accepts `codex` and `cursor`, and can be repeated.
|
|
107
|
+
Omitting it disconnects all detected agents.
|
|
101
108
|
|
|
102
109
|
## Updating
|
|
103
110
|
|
|
@@ -136,38 +143,120 @@ it is no longer tested or fixed, so update when you see it.
|
|
|
136
143
|
|
|
137
144
|
### How a release reaches production
|
|
138
145
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
The same CLI package serves every environment. Staging, development, and
|
|
147
|
+
agent installs follow npm's `next` tag; enrolled production installs follow
|
|
148
|
+
the exact version promoted through the production API. Fresh installs
|
|
149
|
+
without a tag resolve npm's `latest`. Use a separate staging install below
|
|
150
|
+
to test `next` while keeping your production install on its promoted version.
|
|
151
|
+
|
|
152
|
+
1. **Release.** The "Release CLI to next" workflow (GitHub Actions,
|
|
153
|
+
manual) builds the CLI, signs and notarizes the menu bar app into the
|
|
154
|
+
package, and publishes to the `next` tag. Staging, development, and
|
|
155
|
+
agent installs with automatic updates enabled check at boot and hourly
|
|
156
|
+
while the service is running. Sleeping machines, disabled updates, and
|
|
157
|
+
failed installs can leave a machine behind. Verify the installed staging
|
|
158
|
+
version and exercise sync and the menu actions you changed before
|
|
159
|
+
promoting; elapsed time alone is not evidence of testing.
|
|
160
|
+
2. **Promote.** From a repo checkout with npm package access and `gh`
|
|
161
|
+
signed in, name the version you tested:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
pnpm cli:promote:release 0.5.0
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Or, if `next` still points at that tested version:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
pnpm cli:promote:release
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Omitting the version resolves `next` when the command runs.
|
|
174
|
+
The script moves npm's `latest` from your terminal, with your security
|
|
175
|
+
key in the browser (npm requires a live second factor for every
|
|
176
|
+
dist-tag move, so no CI credential can do this half), then dispatches
|
|
177
|
+
the Promote CLI workflow, which verifies the tag and points production
|
|
178
|
+
machines at the same artifact. The script watches the workflow; confirm
|
|
179
|
+
the pointer write succeeded before calling the promotion complete.
|
|
180
|
+
If the tag moved but that write failed, fresh installs are ahead of
|
|
181
|
+
enrolled machines. Re-dispatch **the same version**, then check that run:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
gh workflow run promote-cli.yml -f version=0.5.0
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
A failed Slack announcement after a successful pointer write does not
|
|
188
|
+
undo promotion. Read the failed step before retrying.
|
|
189
|
+
3. **Adopt.** Running production services with automatic updates enabled
|
|
190
|
+
check for the promoted version at boot and hourly. Other users can
|
|
191
|
+
update from the menu bar or `powerplant update`; `powerplant status`
|
|
192
|
+
reports the available version. Until something is promoted, production
|
|
193
|
+
sees no update target, only the supported-version floor.
|
|
194
|
+
|
|
195
|
+
Promoting an older version is the brake: production holds there, `latest`
|
|
196
|
+
moves back for new installs, and no enrolled machine ever downgrades. A
|
|
197
|
+
bad release is undone by a new release and a new promotion.
|
|
151
198
|
|
|
152
199
|
### Staging beside production on one Mac
|
|
153
200
|
|
|
201
|
+
Use production for day-to-day team work. Staging is for testing enrollment,
|
|
202
|
+
onboarding, and releases. See the [internal machine setup guide](../../README.md#set-up-your-machine)
|
|
203
|
+
for access and data boundaries: running sync in both environments uploads
|
|
204
|
+
and processes eligible sessions twice.
|
|
205
|
+
|
|
154
206
|
A machine has one global `powerplant` by default, and the background sync
|
|
155
|
-
for each environment runs whatever copy `init` was run from. To
|
|
207
|
+
for each environment runs whatever copy `init` was run from. To try
|
|
156
208
|
releases on staging while production keeps the promoted version, give
|
|
157
209
|
staging its own copy under its own npm prefix and set it up from there:
|
|
158
210
|
|
|
159
211
|
```bash
|
|
160
|
-
npm install -g --prefix ~/.powerplant-staging @usepowerplant/cli
|
|
212
|
+
npm install -g --prefix ~/.powerplant-staging @usepowerplant/cli@next
|
|
161
213
|
~/.powerplant-staging/bin/powerplant init --env staging
|
|
162
214
|
```
|
|
163
215
|
|
|
216
|
+
`init --env staging` also points each selected agent's shared `powerplant`
|
|
217
|
+
MCP connection at staging. Separate npm prefixes do not isolate that entry.
|
|
218
|
+
After testing, run `powerplant connect` from your production install to
|
|
219
|
+
restore the agents' production connection; the staging sync service keeps
|
|
220
|
+
running. Include `--env staging` on every staging command.
|
|
221
|
+
|
|
222
|
+
The `@next` pin matters: a bare install resolves `latest`, the production
|
|
223
|
+
channel, so the new staging copy would start on the promoted release and
|
|
224
|
+
test nothing until its first update.
|
|
225
|
+
|
|
164
226
|
The staging daemon runs that copy and updates it in place (the updater
|
|
165
227
|
pins npm to the prefix the running copy lives under), so
|
|
166
|
-
`~/.powerplant-staging` follows
|
|
228
|
+
`~/.powerplant-staging` follows the `next` channel while the production
|
|
167
229
|
install follows the promoted one. Run staging commands through that path,
|
|
168
|
-
`~/.powerplant-staging/bin/powerplant status --env staging
|
|
169
|
-
|
|
170
|
-
|
|
230
|
+
`~/.powerplant-staging/bin/powerplant status --env staging`.
|
|
231
|
+
Use `~/.powerplant-staging/bin/powerplant update --env staging` to update
|
|
232
|
+
now, then `~/.powerplant-staging/bin/powerplant doctor --env staging` to
|
|
233
|
+
check the installed version, service, and install location.
|
|
234
|
+
|
|
235
|
+
### Menu bar apps during release testing
|
|
236
|
+
|
|
237
|
+
The npm package, including `@next`, contains **Powerplant.app**, the
|
|
238
|
+
production app. Only production `init` installs it and the production
|
|
239
|
+
service refreshes it after CLI updates. Staging `init` does neither.
|
|
240
|
+
|
|
241
|
+
Run **Powerplant Staging.app** separately, alongside production. Its icon
|
|
242
|
+
has an "S", and it uses the CLI at `~/.powerplant-staging/bin/powerplant`
|
|
243
|
+
when present. Follow the menu bar app's [local build instructions](../../apps/menubar/README.md#development)
|
|
244
|
+
or [signed release instructions](../../apps/menubar/README.md#release).
|
|
245
|
+
Rebuild or replace that staging app when testing native app changes;
|
|
246
|
+
updating the staging CLI does not update it. This tests the staging variant,
|
|
247
|
+
not the exact signed production bundle embedded in the npm package.
|
|
248
|
+
|
|
249
|
+
### Web and API promotion is separate
|
|
250
|
+
|
|
251
|
+
Merges to `main` deploy to staging automatically. The
|
|
252
|
+
[Promote to Production workflow](../../.github/workflows/promote.yml) can
|
|
253
|
+
promote the live staging API commit after its E2E check passes, with the
|
|
254
|
+
production schema and web build from that commit. Automatic runs happen
|
|
255
|
+
on CI completion and an hourly catch-up during weekdays, 09:00 to before
|
|
256
|
+
16:00 America/Vancouver, unless `AUTO_PROMOTE_PAUSED=true`. A manual
|
|
257
|
+
workflow dispatch can promote outside that window. Staging does not wait
|
|
258
|
+
indefinitely for manual QA. This workflow does not promote the CLI;
|
|
259
|
+
`pnpm cli:promote:release` does not deploy the web or API.
|
|
171
260
|
|
|
172
261
|
### Moving from @powerplant-sh/cli
|
|
173
262
|
|