@jmfederico/pi-web 1.202605.12 → 1.202605.14

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
@@ -123,32 +123,24 @@ See the full [Plugin API](docs/plugins.md) for contribution types, package metad
123
123
 
124
124
  ## Install
125
125
 
126
- Recommended install uses npm plus systemd user services:
126
+ Recommended install uses npm plus native per-user services.
127
127
 
128
128
  ```bash
129
129
  npm install -g @jmfederico/pi-web
130
-
131
- # Recommended on servers: keep user services running after logout/reboot.
132
- sudo loginctl enable-linger "$USER"
133
-
134
130
  pi-web install
135
131
  ```
136
132
 
137
- `loginctl enable-linger` is optional for local desktop use, but recommended on servers. It lets the user systemd manager start at boot and continue running after you log out, so PI WEB remains available without an active SSH/login session.
138
-
139
- This writes and starts:
140
-
141
- - `~/.config/systemd/user/pi-web-sessiond.service`
142
- - `~/.config/systemd/user/pi-web.service`
143
-
144
- The generated services run through `bash -lc` so they see a shell environment similar to running `pi` from your terminal.
145
-
146
- To check whether lingering is enabled:
133
+ On Linux servers, `loginctl enable-linger` is optional but recommended so the user systemd manager starts at boot and continues running after logout:
147
134
 
148
135
  ```bash
136
+ sudo loginctl enable-linger "$USER"
149
137
  loginctl show-user "$USER" -p Linger
150
138
  ```
151
139
 
140
+ This writes and starts PI WEB's session daemon and web/API user services. The native user-service backend is selected automatically.
141
+
142
+ The generated services run through your detected login shell (`bash`, `zsh`, or `fish` with `-lc`) so they see a shell environment similar to running `pi` from your terminal.
143
+
152
144
  Open <http://127.0.0.1:8504>.
153
145
 
154
146
  Useful commands:
@@ -183,7 +175,7 @@ Then in Pi:
183
175
  /pi-web doctor
184
176
  ```
185
177
 
186
- The Pi command is a convenience wrapper around the same service installer. When installed this way, the service installer can use PI WEB's package-local server entrypoints, so `pi-web-server` and `pi-web-sessiond` do not need to be on your shell `PATH`. `/pi-web logs` shows the last 100 journal lines; use `pi-web logs` in a shell when you want to follow logs continuously.
178
+ The Pi command is a convenience wrapper around the same service installer. When installed this way, the service installer can use PI WEB's package-local server entrypoints, so `pi-web-server` and `pi-web-sessiond` do not need to be on your shell `PATH`. `/pi-web logs` shows the last 100 service log lines; use `pi-web logs` in a shell when you want to follow logs continuously.
187
179
 
188
180
  Advanced users may run the binaries however they prefer:
189
181
 
@@ -211,6 +203,14 @@ npm run dev:web
211
203
  npm run dev:client
212
204
  ```
213
205
 
206
+ Or install the split development setup as native per-user services from the checkout:
207
+
208
+ ```bash
209
+ pi-web install --dev
210
+ ```
211
+
212
+ `pi-web install --dev` writes the session daemon plus a UI development service using the native user-service backend. `pi-web uninstall` removes both production and development service files; no uninstall flags are needed.
213
+
214
214
  `dev:web` also watches bundled plugin TypeScript and rebuilds the browser-loaded plugin JavaScript under `dist/pi-web-plugins/`. You can restart `dev:web` or `dev:client` without stopping active Pi sessions.
215
215
 
216
216
  ## Production-style run from a checkout
@@ -255,14 +255,14 @@ Environment variables:
255
255
  - `PI_WEB_SESSIOND_URL` — daemon URL used by the web process when connecting over TCP, for example `http://127.0.0.1:3001`. If you set `PI_WEB_SESSIOND_PORT`, set this for the web process too.
256
256
  - `PI_WEB_PROJECTS_FILE` — optional override for the projects storage JSON file. Defaults to `$PI_WEB_DATA_DIR/projects.json`.
257
257
 
258
- ## systemd user services
258
+ ## Development services
259
259
 
260
- A practical local or server setup is two user services:
260
+ `pi-web install --dev` creates a practical local setup with two native per-user services:
261
261
 
262
- - `pi-web-sessiond.service` runs `npm run start:sessiond` without autoreload.
263
- - `pi-web-ui-dev.service` runs `npm run dev:web` and `npm run dev:client` for API reloads, bundled plugin rebuilds, and Vite HMR.
262
+ - `pi-web-sessiond` runs `npm run start:sessiond` from the checkout without autoreload.
263
+ - `pi-web-ui-dev` runs `npm run dev:web` and `npm run dev:client` for API reloads, bundled plugin rebuilds, and Vite HMR.
264
264
 
265
- Example units:
265
+ Under the hood, the native backends are systemd user services and LaunchAgents. For reference, an equivalent systemd setup looks like:
266
266
 
267
267
  ```ini
268
268
  # ~/.config/systemd/user/pi-web-sessiond.service
@@ -296,32 +296,29 @@ Restart=no
296
296
  WantedBy=default.target
297
297
  ```
298
298
 
299
- On servers, enable persistent user services so the user systemd manager starts at boot and remains running after logout:
299
+ On Linux servers, enable persistent user services so the user systemd manager starts at boot and remains running after logout:
300
300
 
301
301
  ```bash
302
302
  sudo loginctl enable-linger "$USER"
303
303
  loginctl show-user "$USER" -p Linger
304
304
  ```
305
305
 
306
- After creating or changing units:
306
+ Install or refresh the development services with:
307
307
 
308
308
  ```bash
309
- systemctl --user daemon-reload
310
- systemctl --user enable --now pi-web-sessiond.service
311
- systemctl --user enable --now pi-web-ui-dev.service
309
+ pi-web install --dev
312
310
  ```
313
311
 
314
312
  Useful logs:
315
313
 
316
314
  ```bash
317
- journalctl --user -u pi-web-sessiond.service -f
318
- journalctl --user -u pi-web-ui-dev.service -f
315
+ pi-web logs
319
316
  ```
320
317
 
321
318
  If code affecting the session daemon changes, restart it manually:
322
319
 
323
320
  ```bash
324
- systemctl --user restart pi-web-sessiond.service
321
+ pi-web restart
325
322
  ```
326
323
 
327
324
  ## Current limitations