@usepowerplant/cli 0.3.0

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 ADDED
@@ -0,0 +1,169 @@
1
+ # @usepowerplant/cli
2
+
3
+ Set up a machine for [Powerplant](https://powerplant.sh): enroll it into
4
+ your org, run the session sync service in the background, and connect your
5
+ coding agents so they can read your team's work.
6
+
7
+ Requires Node 20 or newer.
8
+
9
+ ## Get started
10
+
11
+ ```bash
12
+ npm install -g @usepowerplant/cli
13
+ powerplant init
14
+ ```
15
+
16
+ `powerplant init` is one setup pass with three steps, and it is safe to
17
+ re-run at any time — finished steps are skipped with a note:
18
+
19
+ 1. **Enroll this machine.** Your browser opens so you can approve the
20
+ machine into your org. The machine's credential is stored in the macOS
21
+ keychain; on other platforms, in a file only your user can read.
22
+ 2. **Install the background service.** The sync service watches your local
23
+ coding-agent sessions (Claude Code, Codex, and Cursor) and uploads the
24
+ ones in scope. If recent sessions name repositories under a macOS-protected
25
+ location such as Documents, init lists the location and asks before reading
26
+ Git metadata there; declining leaves those sessions local. The service
27
+ starts on login and keeps itself running.
28
+ 3. **Add MCP to your agents.** Init lists the agents it found — Claude Code,
29
+ Codex, and Cursor — as checked boxes. They all start selected; use the arrow
30
+ keys and Space to turn off any you want to skip, then press Enter (`--yes`,
31
+ or running without a terminal, adds MCP to everything without asking).
32
+ Each selected agent is pointed at the Powerplant MCP server and signed in:
33
+ for Claude Code and Codex the sign-in opens a browser window; for Cursor,
34
+ the Cursor app opens so you can approve the Powerplant server and sign in
35
+ there. This is how your agents read
36
+ the team's sessions, review rooms, and search. If you skip or cancel
37
+ a sign-in, nothing breaks: finish later with `powerplant connect`
38
+ (add `--client claude|codex|cursor` for just those — repeatable). Each
39
+ agent's own sign-in output prints as it runs.
40
+
41
+ The background service is macOS-only today. On other platforms, init still
42
+ enrolls the machine and adds MCP to your agents, and points you at running
43
+ `powerplant sync` on a schedule instead.
44
+
45
+ ## What gets uploaded
46
+
47
+ By default, only sessions in repos your org's sync policy allows (the
48
+ repos it chose in Settings, or its GitHub-owned repos until it chooses) are
49
+ uploaded; everything else stays on your machine. Transcripts are redacted
50
+ on your machine before upload. To narrow further, enroll with
51
+ `--scope <path>` (repeatable) to sync only sessions under given
52
+ directories; `powerplant folders add <path>` opts in extra folders later.
53
+ Allowing Git metadata discovery in a macOS-protected location does not opt
54
+ the folder into syncing; the org's repo policy still applies. There is no
55
+ sync-everything option.
56
+
57
+ ## Error reporting
58
+
59
+ When the CLI itself hits a bug — a crash or an unexpected error — it sends
60
+ an error report to [Sentry](https://sentry.io) so we can fix the problem
61
+ without asking you to dig through logs. This is on by default, and there
62
+ is no setting to turn it off today. A report contains the error and its
63
+ stack trace, the CLI version and environment, which enrolled machine and
64
+ org the background service belongs to, and diagnostic details such as ids
65
+ and counts. It never contains session transcripts, code, or file contents,
66
+ and secret-shaped values (tokens, keys, passwords) are removed on your
67
+ machine before the report is sent. Errors whose fix is printed on screen
68
+ (like "run `powerplant enroll` first") are not reported at all.
69
+
70
+ If sending error reports is a problem for your machine or org, email
71
+ [support@forestwalk.ai](mailto:support@forestwalk.ai) and we'll work
72
+ something out.
73
+
74
+ ## Day to day
75
+
76
+ ```bash
77
+ powerplant status # what the sync service is doing (add --json for tools)
78
+ powerplant doctor # a diagnostics summary to paste into a support email
79
+ powerplant pause # stop uploads without uninstalling
80
+ powerplant resume # start again — a catch-up pass covers the pause
81
+ powerplant restart # restart the background service
82
+ powerplant connect # connect agents installed after setup, or re-sign-in
83
+ powerplant disconnect # remove the Powerplant MCP (and its sign-in) from your agents
84
+ powerplant sync # run one upload pass now, in the foreground
85
+ ```
86
+
87
+ `status` tells you whether the machine is enrolled, whether the service is
88
+ running, when it last uploaded, and what (if anything) is failing — with the
89
+ command that fixes it. `pause` is safe for as long as you need: nothing
90
+ uploads while paused, and `resume` goes back and covers everything the pause
91
+ skipped. `sync` is the manual alternative to the background service — the
92
+ day-to-day upload path on machines that can't run it. `disconnect` is the
93
+ inverse of `connect`: it removes each agent's Powerplant MCP entry and the
94
+ sign-in stored with it, and agents that were never connected just say so.
95
+
96
+ ## Updating
97
+
98
+ ```bash
99
+ powerplant update
100
+ ```
101
+
102
+ That runs `npm install -g @usepowerplant/cli` for you (running it yourself
103
+ works too). Either way, the background service notices the new version on
104
+ disk and restarts itself onto it within moments. `powerplant status` tells
105
+ you when a newer version is available.
106
+
107
+ Powerplant also publishes the oldest version it still supports. When yours
108
+ is older, `powerplant status`, `powerplant doctor`, the menu bar app, and
109
+ the sync service log all say so and point you at `powerplant update`. Nothing
110
+ stops working on that notice — an unsupported version keeps syncing, but
111
+ it is no longer tested or fixed, so update when you see it.
112
+
113
+ ### Moving from @powerplant-sh/cli
114
+
115
+ Releases up to 0.2.1 were published as `@powerplant-sh/cli`. That package
116
+ cannot update itself onto this one, so switch by hand:
117
+
118
+ ```bash
119
+ npm uninstall -g @powerplant-sh/cli
120
+ npm install -g @usepowerplant/cli
121
+ powerplant init
122
+ ```
123
+
124
+ The uninstall comes first: both packages provide the `powerplant` command,
125
+ and npm refuses to install a second package over an existing one. Enrollment,
126
+ connections, and settings are untouched — `powerplant init` only sees that
127
+ the sync service points at the removed bundle and reinstalls it onto the new
128
+ one.
129
+
130
+ ## Uninstalling
131
+
132
+ ```bash
133
+ powerplant disconnect # disconnect your coding agents from Powerplant
134
+ powerplant uninstall # remove the background service
135
+ powerplant uninstall --forget # also delete this machine's stored credentials
136
+ ```
137
+
138
+ `uninstall` removes the background service only — your coding agents keep
139
+ their Powerplant MCP connection until you run `powerplant disconnect` (and
140
+ uninstall reminds you when that's the case). Disconnecting is local to this
141
+ machine: the access you granted the agents stays on your Powerplant account
142
+ until you revoke it from your Profile page in the web app.
143
+
144
+ ## Troubleshooting
145
+
146
+ - **`status` says "not enrolled"** — run `powerplant init` (or
147
+ `powerplant enroll` to redo just the enrollment).
148
+ - **`status` says the service is installed but not loaded, or a daemon is
149
+ stalled** — run `powerplant restart`.
150
+ - **An agent's sign-in was cancelled or expired** — run
151
+ `powerplant connect`; it skips agents that are already signed in and only
152
+ finishes what's missing.
153
+ - **A deprecation warning prints on every command under Node 20** — it
154
+ comes from a dependency and is harmless; Node 22 or newer doesn't print
155
+ it.
156
+ - **None of that fixed it** — run `powerplant doctor` and paste its output
157
+ into an email to [support@forestwalk.ai](mailto:support@forestwalk.ai).
158
+ It prints a diagnostics summary (status plus the tail of the sync service's
159
+ log with credentials redacted) and uploads nothing — you choose what to
160
+ share.
161
+
162
+ The CLI is Powerplant's connector and installer only; agents read Powerplant
163
+ through its MCP server, never through this command.
164
+
165
+ ## About this package
166
+
167
+ Powerplant's source code is private today, so this package carries no
168
+ repository link — it ships the compiled CLI only. Questions or problems:
169
+ [support@forestwalk.ai](mailto:support@forestwalk.ai).