@nice-code/commander 0.91.0 → 0.93.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 +46 -2
- package/build/cli.cjs +447 -16
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +448 -19
- package/build/cli.mjs.map +1 -1
- package/build/client/assets/index-BbXO3YnY.js +23 -0
- package/build/client/assets/index-BbXO3YnY.js.map +1 -0
- package/build/client/index.html +1 -1
- package/build/{main-Cf9OmhIY.cjs → main-B7EwREFQ.cjs} +10 -3
- package/build/main-B7EwREFQ.cjs.map +1 -0
- package/build/{main-O9jpzqPH.mjs → main-BlAdEbVt.mjs} +11 -4
- package/build/main-BlAdEbVt.mjs.map +1 -0
- package/package.json +7 -6
- package/build/client/assets/index-Caho-x2i.js +0 -23
- package/build/client/assets/index-Caho-x2i.js.map +0 -1
- package/build/main-Cf9OmhIY.cjs.map +0 -1
- package/build/main-O9jpzqPH.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -47,14 +47,19 @@ bunx nice-commander down dev
|
|
|
47
47
|
Every acting command takes the same selector — ids, group names, or `tag=value` terms (AND across
|
|
48
48
|
terms). `up --dry-run` and `explain` show exactly what would be touched, without touching it.
|
|
49
49
|
|
|
50
|
+
The GUI’s **shutdown daemon** button stops every task and service managed by that daemon,
|
|
51
|
+
including processes hidden by filters or groups, then exits the daemon. Confirm the dialog to
|
|
52
|
+
proceed. Run `nice-commander ui` to start it again.
|
|
53
|
+
|
|
50
54
|
## What it does that a script does not
|
|
51
55
|
|
|
52
56
|
- **`dependsOn` waits for *ready*, not for *spawned*** — a real readiness contract (port, HTTP,
|
|
53
57
|
log marker), so `web` never starts against an API that is still compiling.
|
|
54
58
|
- **Stopping ends the tree.** Killing `npm run dev`'s pid leaves the actual server holding the
|
|
55
59
|
port; a POSIX process group / Windows Job Object does not.
|
|
56
|
-
- **
|
|
57
|
-
|
|
60
|
+
- **Starts never kill an unknown port owner.** An occupied exclusive port blocks startup.
|
|
61
|
+
Inspect its owner and explicitly confirm a stop using `ports` or the UI; automatic orphan
|
|
62
|
+
reaping remains limited to verified ledger entries.
|
|
58
63
|
- **A broken config keeps the last good one live.** Nothing restarts silently; changed processes
|
|
59
64
|
are marked stale until you restart them.
|
|
60
65
|
- **Merged logs that actually order.** The daemon stamps every line at receipt, so the timeline is
|
|
@@ -64,6 +69,45 @@ terms). `up --dry-run` and `explain` show exactly what would be touched, without
|
|
|
64
69
|
Node ≥ 22 or Bun. The web UI is pre-built into the package; Vite and React are not installed on
|
|
65
70
|
your machine. Built on [`@nice-code/process`](https://www.npmjs.com/package/@nice-code/process).
|
|
66
71
|
|
|
72
|
+
`bunx nice-commander` follows the executable's Node shebang, so it still needs Node ≥ 22.
|
|
73
|
+
Use `bunx --bun nice-commander` to explicitly run with Bun. An older Node can serve the UI
|
|
74
|
+
but fail its authenticated WebSocket handshake, leaving the CLI and browser waiting for the
|
|
75
|
+
status realm. After upgrading your runtime, run `nice-commander shutdown` (this stops managed
|
|
76
|
+
processes), then retry, so an existing daemon is replaced too. No extra environment variables
|
|
77
|
+
are needed.
|
|
78
|
+
|
|
79
|
+
## Finding and stopping port owners
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
nice-commander doctor # includes PIDs for occupied, inactive endpoints
|
|
83
|
+
nice-commander ports # inspect all configured exclusive TCP endpoints
|
|
84
|
+
nice-commander ports journey-backend journey-web
|
|
85
|
+
nice-commander ports journey-backend --kill 12345 # review and confirm this PID
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Inspection shows each listener's PID, executable, parent PID, working directory and process-start
|
|
89
|
+
identity. It does not prove that a listener is a duplicate: another application may use the same
|
|
90
|
+
port. Command arguments and environment variables are not collected.
|
|
91
|
+
|
|
92
|
+
`--kill PID` sends SIGTERM after confirmation; `--yes` supplies explicit noninteractive consent.
|
|
93
|
+
If the listener will not stop, inspect again and use `--kill PID --force` to choose SIGKILL.
|
|
94
|
+
Only the selected listener is signalled, not its parent or process tree. A watcher may restart it;
|
|
95
|
+
inspect again to see the replacement. Multiple listeners are listed individually.
|
|
96
|
+
|
|
97
|
+
In the UI, **inspect ports** appears on inactive process rows (including failed starts), and in
|
|
98
|
+
expanded details for active rows. Review the owner, choose **stop PID** or **force kill PID**,
|
|
99
|
+
and confirm. Once the port is free, **retry start** runs the normal startup checks again.
|
|
100
|
+
|
|
101
|
+
The identity and endpoint are rechecked before termination. Inspection tokens expire after five
|
|
102
|
+
minutes and can be used once. Active configured port owners must be stopped with their ordinary
|
|
103
|
+
stop control first; Commander and its ancestors are protected. `ports` works without starting a
|
|
104
|
+
daemon, and `doctor` remains read-only unless `--reap` is explicitly requested.
|
|
105
|
+
|
|
106
|
+
Owner inspection currently supports macOS and Linux with `lsof` and `ps` available. Visibility
|
|
107
|
+
is limited by OS permissions. Remote, shared and observed endpoints are never termination
|
|
108
|
+
targets. A missing tool or unknown identity produces a diagnostic instead of authorizing a kill.
|
|
109
|
+
Windows owner inspection is not supported yet.
|
|
110
|
+
|
|
67
111
|
## Developing the web UI (`bun run dev`)
|
|
68
112
|
|
|
69
113
|
Editing the UI needs a fast loop, so the package ships a dev harness: `bun run dev` (from
|