@plumpslabs/fennec-cli 1.14.2 → 1.14.3
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 +59 -7
- package/dist/index.js +771 -203
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -148,10 +148,11 @@ Fennec is both an MCP server **and** a CLI you can use directly in your terminal
|
|
|
148
148
|
| `fennec ps [options]` | List Fennec-tracked apps with live status. |
|
|
149
149
|
| `fennec status [name]` | System overview + top processes (tracked and system). |
|
|
150
150
|
| `fennec log <name\|pid> [options]` | Show (and follow) logs for a tracked app. |
|
|
151
|
-
| `fennec spawn [name] [--all]` | Re-spawn a stopped tracked app from its saved config. |
|
|
152
|
-
| `fennec stop <name\|--all
|
|
153
|
-
| `fennec restart <name\|pid
|
|
154
|
-
| `fennec kill <pid\|name\|all
|
|
151
|
+
| `fennec spawn [name] [name...] [--all]` | Re-spawn a stopped tracked app from its saved config. Accepts MULTIPLE names at once. |
|
|
152
|
+
| `fennec stop <name\|--all> [name...]` | Stop (pause) a tracked app but keep it in the registry. Accepts MULTIPLE names. Add `-y/--yes` to skip the confirmation prompt. |
|
|
153
|
+
| `fennec restart <name\|pid> [name...]` | Stop and re-spawn a tracked app from its saved config. Accepts MULTIPLE names at once. |
|
|
154
|
+
| `fennec kill <pid\|name\|all> [name...]` | Kill a process and remove it from the registry. Accepts MULTIPLE names at once. Add `-y/--yes` to skip the confirmation prompt. |
|
|
155
|
+
| `fennec group [name] [group]` | Assign a logical group to tracked apps (or list them). `--unset` to clear. |
|
|
155
156
|
| `fennec adopt <pid> [--name <name>] [--port <port>]` | Adopt an externally-started process into Fennec tracking. |
|
|
156
157
|
| `fennec supervisor <start\|stop\|restart\|status>` | Manage the background supervisor that keeps `--restart` apps alive. |
|
|
157
158
|
| `fennec persist <enable\|disable\|status>` | Survive reboots — auto-start tracked apps after login (systemd/launchd/Windows). |
|
|
@@ -160,9 +161,11 @@ Fennec is both an MCP server **and** a CLI you can use directly in your terminal
|
|
|
160
161
|
| `fennec info <name>` | Detailed info for a tracked app. |
|
|
161
162
|
| `fennec rename <old> <new>` | Rename a tracked app. |
|
|
162
163
|
|
|
163
|
-
**`start` / `run` options:** `--name <name>` (recommended), `--port <port>` (Fennec waits until it accepts connections), `--cwd <dir>`, `--restart` (auto-restart on crash / port-down, survives terminal close), `--jsonl` (structured JSON-lines logs).
|
|
164
|
+
**`start` / `run` options:** `--name <name>` (recommended), `--port <port>` (Fennec waits until it accepts connections), `--cwd <dir>`, `--restart` (auto-restart on crash / port-down, survives terminal close), `--group <group>` (tag for scoped bulk ops), `--jsonl` (structured JSON-lines logs).
|
|
164
165
|
|
|
165
|
-
**`ps` options:** `-w/--watch` (live refresh), `--system/-a/--all` (include non-Fennec system processes), `--json`, `--name <filter>`, `--sort <cpu|mem|pid|name>`.
|
|
166
|
+
**`ps` options:** `-w/--watch` (live refresh), `--system/-a/--all` (include non-Fennec system processes), `--json`, `--name <filter>`, `--group <g>` (show only apps in group `<g>`), `--sort <cpu|mem|pid|name>`. The `MEM` column shows each running app's resident memory (RSS) cross-platform, so you can spot leaks from long-lived apps.
|
|
167
|
+
|
|
168
|
+
**Logical groups + bulk (multiple names):** tag apps with `fennec start <cmd> --name <n> --group <g>`, or retroactively with `fennec group <name> <g>` (existing entries too — `fennec group <name> --unset` clears). Then scope bulk ops to just that group: `fennec kill --group <g>`, `fennec stop --group <g>`, `fennec spawn --group <g>`, `fennec restart --group <g>`, `fennec ps --group <g>`. A bare group name as the positional (e.g. `fennec kill <g>`) is also accepted as shorthand. You can ALSO pass MULTIPLE names at once for one-shot bulk ops: `fennec stop be-crm fe-crm`, `fennec kill be-crm fe-crm -y`, `fennec restart be-crm fe-crm -y`, `fennec spawn be-crm fe-crm`. Already-running entries in scope are reported as "already running" (never double-spawned); `--all` still targets **every** tracked app across all groups.
|
|
166
169
|
|
|
167
170
|
**`log` options:** `-f/--follow`, `--lines N`, `--since 10m|1h|2d`, `--level error|warn|info|debug`, `--json` (bounded, redacted, machine-readable for AI), `--no-redact`, `--clear`.
|
|
168
171
|
|
|
@@ -186,6 +189,19 @@ Fennec is both an MCP server **and** a CLI you can use directly in your terminal
|
|
|
186
189
|
| `fennec import <file>` | Import tracked apps from a file. |
|
|
187
190
|
| `fennec cleanup` | Remove dead/stale entries from the tracked registry. |
|
|
188
191
|
|
|
192
|
+
### Store & Doctor
|
|
193
|
+
|
|
194
|
+
Fennec persists everything — auth sessions, tracked processes, exports, plugin/workflow state — under **one global store**, by default `~/.fennec` (honors `FENNEC_HOME` / `FENNEC_DATA_DIR`), manageable from **any directory**. `--local` targets the per-project `.fennec` instead.
|
|
195
|
+
|
|
196
|
+
| Command | Description |
|
|
197
|
+
|---------|-------------|
|
|
198
|
+
| `fennec store` | Overview of everything in the global store (counts, size, age). |
|
|
199
|
+
| `fennec store --local` | Same, for the project `.fennec`. |
|
|
200
|
+
| `fennec store session` | List saved auth sessions. |
|
|
201
|
+
| `fennec store session info <name>` | Show a session — cookie/localStorage **values are masked**; add `--show-secrets` to reveal. |
|
|
202
|
+
| `fennec store session rm <name>` | Delete a session (confirm prompt). |
|
|
203
|
+
| `fennec doctor` | Health + secret-surface checks: store permissions, synced-home leakage, embedded secrets in launch commands. |
|
|
204
|
+
|
|
189
205
|
### Configuration & Misc
|
|
190
206
|
|
|
191
207
|
| Command | Description |
|
|
@@ -193,7 +209,9 @@ Fennec is both an MCP server **and** a CLI you can use directly in your terminal
|
|
|
193
209
|
| `fennec init` | Generate a `fennec.config.yaml` in the current directory. |
|
|
194
210
|
| `fennec setup` | Interactively configure your MCP client for Fennec. |
|
|
195
211
|
| `fennec install-browsers` | Install Playwright browser engines. |
|
|
196
|
-
| `fennec sessions` | List saved browser auth sessions. |
|
|
212
|
+
| `fennec sessions` | List saved browser auth sessions (alias of `fennec store session`). |
|
|
213
|
+
| `fennec store` | Unified view of everything Fennec persists (sessions, processes, exports). |
|
|
214
|
+
| `fennec doctor` | Health + secret-surface checks for the store. |
|
|
197
215
|
| `fennec health` | Health check of the Fennec environment. |
|
|
198
216
|
| `fennec help [command]` | Show help, or detailed help for a command. |
|
|
199
217
|
|
|
@@ -227,6 +245,28 @@ fennec dev restart web # restart just one app
|
|
|
227
245
|
fennec dev down # stop everything (keeps it in the registry)
|
|
228
246
|
```
|
|
229
247
|
|
|
248
|
+
### Bulk operations & groups
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Tag apps into groups when starting (or retroactively with `fennec group`)
|
|
252
|
+
fennec start "npm run dev-be" --name be-crm --group crm
|
|
253
|
+
fennec start "npm run dev-fe" --name fe-crm --group crm
|
|
254
|
+
|
|
255
|
+
# One-shot bulk: pass MULTIPLE names at once
|
|
256
|
+
fennec stop be-crm fe-crm # pause both, keep them in the registry
|
|
257
|
+
fennec spawn be-crm fe-crm # re-spawn both paused apps
|
|
258
|
+
fennec kill be-crm fe-crm -y # kill + forget both
|
|
259
|
+
fennec restart be-crm fe-crm -y # restart both from saved config
|
|
260
|
+
|
|
261
|
+
# Group-scoped bulk: only that group is touched (other groups safe)
|
|
262
|
+
fennec kill --group crm -y
|
|
263
|
+
fennec stop --group crm
|
|
264
|
+
fennec ps --group crm # MEM column shows each app's live RSS
|
|
265
|
+
|
|
266
|
+
# Global: --all still hits EVERY tracked app across all groups
|
|
267
|
+
fennec stop --all
|
|
268
|
+
```
|
|
269
|
+
|
|
230
270
|
### Adopt a process an AI agent started via raw bash
|
|
231
271
|
|
|
232
272
|
An AI agent (or you) sometimes launches a server with plain bash. Fennec can take
|
|
@@ -364,6 +404,18 @@ FENNEC_BROWSER_TYPE=webkit fennec start
|
|
|
364
404
|
- [Security Model](https://github.com/plumpslabs/fennec/blob/main/docs/security-model.md)
|
|
365
405
|
- [GitHub Repository](https://github.com/plumpslabs/fennec)
|
|
366
406
|
|
|
407
|
+
## Memory & Garbage Safety
|
|
408
|
+
|
|
409
|
+
Fennec is built to **not** leak memory or orphan processes on your machine:
|
|
410
|
+
|
|
411
|
+
- 🌳 **Process-tree kills** — `stop`/`kill`/`spawn`/`restart` tear down the *entire* process tree (npm → vite → esbuild on POSIX; `taskkill /T /F` on Windows), so no orphaned children are left "nyampah".
|
|
412
|
+
- 🧹 **Browser contexts are fully torn down** on session destroy (page **and** its `BrowserContext` — cookies, cache, service workers), not just the page.
|
|
413
|
+
- ⏳ **Idle-session GC** runs on a timer (not only when the session cap is hit): idle sessions and over-TTL sessions are destroyed automatically.
|
|
414
|
+
- 📑 **Tab caps** — opening many tabs (`tab_new` / `context_new`) auto-closes the oldest non-active page so contexts can't accumulate.
|
|
415
|
+
- ♻️ **Context rotation** — long-lived contexts are periodically recycled (`config.session.rotationIntervalSecs`, default 0 = off). The old `BrowserContext` is closed and a fresh one built with your cookies/localStorage preserved (via storageState) and the current URL reloaded, so a session that's open for hours can't grow unbounded in DOM/listeners/workers. Trigger on demand with the `context_rotate` tool too.
|
|
416
|
+
- 🪵 **Bounded logs** — app logs are rotated (10 MB × 3 files) so disk never fills.
|
|
417
|
+
- 🔌 **Graceful shutdown** — `SIGTERM`/`SIGINT` closes the browser and all tracked daemons; `ps` even shows a live **MEM** (RSS) column so you can spot leaks.
|
|
418
|
+
|
|
367
419
|
## License
|
|
368
420
|
|
|
369
421
|
MIT — see [LICENSE](https://github.com/plumpslabs/fennec/blob/main/LICENSE) for details.
|