numux 2.10.4 → 2.12.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 +136 -68
- package/dist/man/numux.1 +1134 -0
- package/dist/numux.js +774 -147
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -69,13 +69,16 @@ numux
|
|
|
69
69
|
|
|
70
70
|
### Subcommands
|
|
71
71
|
|
|
72
|
+
<!-- generated:subcommands -->
|
|
72
73
|
```sh
|
|
73
|
-
numux init # Create a starter
|
|
74
|
-
numux validate # Validate config and show process
|
|
75
|
-
numux exec <name> [--] <
|
|
76
|
-
numux logs [name] # Open log directory or
|
|
74
|
+
numux init # Create a starter config file
|
|
75
|
+
numux validate # Validate config and show process graph
|
|
76
|
+
numux exec <name> [--] <cmd> # Run a command in a process's environment
|
|
77
|
+
numux logs [name] # Open the log directory or a specific process log
|
|
77
78
|
numux completions <shell> # Generate shell completions (bash, zsh, fish)
|
|
79
|
+
numux help [topic] # Show help for a topic
|
|
78
80
|
```
|
|
81
|
+
<!-- /generated:subcommands -->
|
|
79
82
|
|
|
80
83
|
`validate` respects `--only`/`--exclude` filters and shows processes grouped by dependency tiers.
|
|
81
84
|
|
|
@@ -86,13 +89,6 @@ numux exec api -- npx prisma migrate
|
|
|
86
89
|
numux exec web npm run build
|
|
87
90
|
```
|
|
88
91
|
|
|
89
|
-
`logs` prints the log directory path, or a specific process's log contents:
|
|
90
|
-
|
|
91
|
-
```sh
|
|
92
|
-
numux logs # Print log directory path
|
|
93
|
-
numux logs api # Print the api process log
|
|
94
|
-
```
|
|
95
|
-
|
|
96
92
|
Set up completions for your shell:
|
|
97
93
|
|
|
98
94
|
```sh
|
|
@@ -144,11 +140,45 @@ numux 'dev:*' # all scripts matching dev:*
|
|
|
144
140
|
numux 'npm:*:dev' # explicit npm: prefix (same behavior)
|
|
145
141
|
```
|
|
146
142
|
|
|
147
|
-
|
|
143
|
+
<!-- generated:script-pattern-rules -->
|
|
144
|
+
## Script pattern rules
|
|
145
|
+
|
|
146
|
+
**Recognition:** A process name is treated as a script reference when it:
|
|
147
|
+
- starts with `npm:` (e.g. `npm:dev:*`)
|
|
148
|
+
- contains glob metacharacters (`*`, `?`, `[`)
|
|
149
|
+
- contains a colon AND has no explicit `command` (e.g. `lint:eslint: {}`)
|
|
150
|
+
|
|
151
|
+
**Glob matching:** Patterns are matched against `package.json` scripts using
|
|
152
|
+
`Bun.Glob`. The `*` wildcard does NOT match across `:` separators — `dev:*`
|
|
153
|
+
matches `dev:web` but not `dev:web:hmr`. Use `dev:*:*` for two levels deep.
|
|
154
|
+
|
|
155
|
+
**Leaf-only (`^`):** Append `^` to skip scripts that are group runners —
|
|
156
|
+
scripts that have sub-scripts beneath them. E.g. if `format:check` has
|
|
157
|
+
`format:check:store` and `format:check:odoo` below it, `format:*^` excludes
|
|
158
|
+
`format:check` but keeps the leaf scripts.
|
|
148
159
|
|
|
149
|
-
|
|
160
|
+
**Extra args:** Anything after the first space in the pattern is forwarded
|
|
161
|
+
as extra arguments to each matched command: `lint:* --fix` → `bun run lint:js -- --fix`.
|
|
150
162
|
|
|
151
|
-
|
|
163
|
+
**Template inheritance:** Config properties on a pattern entry (color, env,
|
|
164
|
+
dependsOn, etc.) are inherited by all expanded processes. Color arrays are
|
|
165
|
+
distributed round-robin across matches.
|
|
166
|
+
|
|
167
|
+
**Display names:** The glob's literal prefix and suffix are stripped from
|
|
168
|
+
matched script names: `dev:*` + `dev:web` → display name `web`.
|
|
169
|
+
|
|
170
|
+
## Auto-resolution
|
|
171
|
+
|
|
172
|
+
When a process has no `command` and its name matches a `package.json` script,
|
|
173
|
+
the command is auto-resolved to `<pm> run <name>`. This works for:
|
|
174
|
+
- `true` or `{}` shorthand: `lint: true` → `bun run lint`
|
|
175
|
+
- Objects without `command`: `typecheck: { dependsOn: ['db'] }` → `bun run typecheck`
|
|
176
|
+
|
|
177
|
+
## npm: prefix
|
|
178
|
+
|
|
179
|
+
Commands starting with `npm:` are rewritten to use the detected package
|
|
180
|
+
manager: `npm:dev` → `bun run dev` (if bun is detected).
|
|
181
|
+
<!-- /generated:script-pattern-rules -->
|
|
152
182
|
|
|
153
183
|
```sh
|
|
154
184
|
numux 'lint:* --fix' # → bun run lint:js --fix, bun run lint:ts --fix
|
|
@@ -165,9 +195,7 @@ export default defineConfig({
|
|
|
165
195
|
})
|
|
166
196
|
```
|
|
167
197
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
When a process has no command and its name matches a `package.json` script, the command is auto-resolved:
|
|
198
|
+
Auto-resolution example:
|
|
171
199
|
|
|
172
200
|
```ts
|
|
173
201
|
export default defineConfig({
|
|
@@ -181,24 +209,29 @@ export default defineConfig({
|
|
|
181
209
|
|
|
182
210
|
### Options
|
|
183
211
|
|
|
212
|
+
<!-- generated:options -->
|
|
184
213
|
| Flag | Description |
|
|
185
214
|
|------|-------------|
|
|
186
|
-
| `-
|
|
187
|
-
| `-
|
|
188
|
-
| `-n
|
|
189
|
-
| `-
|
|
190
|
-
| `--
|
|
191
|
-
| `--
|
|
215
|
+
| `-s,` `--sort` `<config|alphabetical|topological>` | Tab display order |
|
|
216
|
+
| `-w,` `--workspace` `<script>` | Run a package.json script across all workspaces |
|
|
217
|
+
| `-n,` `--name` `<name=command>` | Add a named process |
|
|
218
|
+
| `-c,` `--color` `<colors>` | Comma-separated colors (hex or names: black, red, green, yellow, blue, magenta, cyan, white, gray, orange, purple) |
|
|
219
|
+
| `--colors` | Auto-assign colors to processes based on their name |
|
|
220
|
+
| `-e,` `--env-file` `<path|false>` | Env file path, or "false" to disable env file loading |
|
|
221
|
+
| `--config` `<path>` | Config file path (default: auto-detect) |
|
|
222
|
+
| `-p,` `--prefix` | Prefixed output mode (no TUI, for CI/scripts) |
|
|
223
|
+
| `--only` `<a,b,...>` | Only run these processes (+ their dependencies) |
|
|
224
|
+
| `--exclude` `<a,b,...>` | Exclude these processes |
|
|
192
225
|
| `--kill-others` | Kill all processes when any exits (regardless of exit code) |
|
|
193
|
-
| `--kill-others-on-fail` | Kill all processes when any exits with
|
|
194
|
-
| `--max-restarts
|
|
195
|
-
|
|
|
196
|
-
| `--
|
|
197
|
-
|
|
|
198
|
-
| `--
|
|
199
|
-
| `--
|
|
200
|
-
| `-
|
|
201
|
-
|
|
226
|
+
| `--kill-others-on-fail` | Kill all processes when any exits with non-zero code |
|
|
227
|
+
| `--max-restarts` `<n>` | Max auto-restarts for crashed processes |
|
|
228
|
+
| `--no-watch` | Disable file watching even if config has watch patterns |
|
|
229
|
+
| `-t,` `--timestamps` `[<format>]` | Add timestamps to output (default HH:mm:ss, or pass a format string) |
|
|
230
|
+
| `--log-dir` `<path>` | Write per-process logs to directory |
|
|
231
|
+
| `--debug` | Enable debug logging to .numux/debug.log |
|
|
232
|
+
| `-h,` `--help` | Show this help |
|
|
233
|
+
| `-v,` `--version` | Show version |
|
|
234
|
+
<!-- /generated:options -->
|
|
202
235
|
|
|
203
236
|
### Prefix mode
|
|
204
237
|
|
|
@@ -210,24 +243,46 @@ numux --prefix
|
|
|
210
243
|
|
|
211
244
|
Auto-exits when all processes finish. Exit code 1 if any process failed.
|
|
212
245
|
|
|
246
|
+
## Logging
|
|
247
|
+
|
|
248
|
+
numux writes per-process log files (ANSI-stripped) when `--log-dir` is set or `logDir` is configured. Each session creates a timestamped subdirectory with a `latest` symlink pointing to the most recent run.
|
|
249
|
+
|
|
250
|
+
<!-- generated:logging-usage -->
|
|
251
|
+
```sh
|
|
252
|
+
numux logs # Print log directory path
|
|
253
|
+
numux logs api # Pipe the api process log to stdout
|
|
254
|
+
numux logs api | grep "ERROR" # Search process logs
|
|
255
|
+
numux logs api | tail -f # Follow process log output
|
|
256
|
+
```
|
|
257
|
+
<!-- /generated:logging-usage -->
|
|
258
|
+
|
|
259
|
+
|
|
213
260
|
## Config reference
|
|
214
261
|
|
|
215
262
|
### Global options
|
|
216
263
|
|
|
217
264
|
Top-level options apply to all processes (process-level settings override):
|
|
218
265
|
|
|
266
|
+
<!-- generated:config-global -->
|
|
219
267
|
| Field | Type | Description |
|
|
220
268
|
|-------|------|-------------|
|
|
221
|
-
| `cwd` | `string` |
|
|
222
|
-
| `env` | `Record<string, string>` |
|
|
223
|
-
| `envFile` | `string \| string[] \| false` |
|
|
224
|
-
| `showCommand` | `boolean` |
|
|
225
|
-
| `maxRestarts` | `number` |
|
|
226
|
-
| `readyTimeout` | `number` |
|
|
227
|
-
| `stopSignal` | `'SIGTERM' \| 'SIGINT' \| 'SIGHUP'` |
|
|
228
|
-
| `errorMatcher` | `boolean \| string` |
|
|
229
|
-
| `watch` | `string \| string[]` |
|
|
230
|
-
| `sort` | `'config' \| 'alphabetical' \| 'topological'` | Tab display order
|
|
269
|
+
| `cwd` | `string` | Global working directory, inherited by all processes |
|
|
270
|
+
| `env` | `Record<string, string>` | Global env vars, merged into each process (process-level overrides) |
|
|
271
|
+
| `envFile` | `string \| string[] \| false` | Global .env file(s), inherited by processes without their own envFile; `false` disables |
|
|
272
|
+
| `showCommand` | `boolean` | Global showCommand flag, inherited by all processes |
|
|
273
|
+
| `maxRestarts` | `number` | Global restart limit, inherited by all processes (only restarts on non-zero exit) |
|
|
274
|
+
| `readyTimeout` | `number` | Global ready timeout (ms), inherited by all processes |
|
|
275
|
+
| `stopSignal` | `'SIGTERM' \| 'SIGINT' \| 'SIGHUP'` | Global stop signal, inherited by all processes |
|
|
276
|
+
| `errorMatcher` | `boolean \| string` | Global error matcher, inherited by all processes. `true` = detect ANSI red output, string = regex |
|
|
277
|
+
| `watch` | `string \| string[]` | Global watch patterns, inherited by processes without their own watch |
|
|
278
|
+
| `sort` | `'config' \| 'alphabetical' \| 'topological'` | Tab display order. `'config'` preserves definition order (package.json script order for wildcards), `'alphabetical'` sorts by process name, `'topological'` sorts by dependency tiers. |
|
|
279
|
+
| `prefix` | `boolean` | Use prefixed output mode instead of TUI (for CI/scripts) |
|
|
280
|
+
| `timestamps` | `boolean \| string` | Add timestamps to output lines. `true` uses default `HH:mm:ss` format, or pass a format string (e.g. `"HH:mm:ss.SSS"`) |
|
|
281
|
+
| `killOthers` | `boolean` | Kill all processes when any one exits (regardless of exit code) |
|
|
282
|
+
| `killOthersOnFail` | `boolean` | Kill all processes when any one exits with a non-zero exit code |
|
|
283
|
+
| `noWatch` | `boolean` | Disable file watching even if processes have watch patterns |
|
|
284
|
+
| `logDir` | `string` | Directory to write per-process log files |
|
|
285
|
+
<!-- /generated:config-global -->
|
|
231
286
|
|
|
232
287
|
```ts
|
|
233
288
|
export default defineConfig({
|
|
@@ -245,27 +300,29 @@ export default defineConfig({
|
|
|
245
300
|
|
|
246
301
|
Each process accepts:
|
|
247
302
|
|
|
303
|
+
<!-- generated:config-process -->
|
|
248
304
|
| Field | Type | Default | Description |
|
|
249
305
|
|-------|------|---------|-------------|
|
|
250
306
|
| `command` | `string` | *required* | Shell command to run. Supports `$dep.group` references from dependency capture groups |
|
|
251
|
-
| `cwd` | `string` |
|
|
252
|
-
| `env` | `Record<string, string>` | — | Extra environment variables. Values support `$dep.group` references from dependency capture groups |
|
|
253
|
-
| `envFile` | `string \| string[] \| false` | — |
|
|
254
|
-
| `dependsOn` | `string[]` | — | Processes that must be ready
|
|
255
|
-
| `readyPattern` | `string \| RegExp` | — | Regex matched against stdout to signal readiness. Use `RegExp` to capture groups
|
|
256
|
-
| `
|
|
257
|
-
| `
|
|
307
|
+
| `cwd` | `string` | — | Working directory for the process |
|
|
308
|
+
| `env` | `Record<string, string>` | — | Extra environment variables. Values support `$dep.group` references from dependency capture groups. |
|
|
309
|
+
| `envFile` | `string \| string[] \| false` | — | .env file path(s) to load, or `false` to disable |
|
|
310
|
+
| `dependsOn` | `string \| string[]` | — | Processes that must be ready before this one starts |
|
|
311
|
+
| `readyPattern` | `string \| RegExp` | — | Regex matched against stdout to signal readiness. Use `RegExp` to capture groups for `$dep.group` expansion |
|
|
312
|
+
| `maxRestarts` | `number` | `0` | Limit auto-restart attempts (only restarts on non-zero exit) |
|
|
313
|
+
| `readyTimeout` | `number` | — | Milliseconds to wait for readyPattern before failing |
|
|
258
314
|
| `delay` | `number` | — | Milliseconds to wait before starting the process |
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
263
|
-
| `color` | `string \| string[]` | auto | Hex (e.g. `"#ff6600"`) or basic name: black, red, green, yellow, blue, magenta, cyan, white, gray, orange, purple |
|
|
315
|
+
| `condition` | `string` | — | Env var name (prefix with `!` to negate); process skipped if condition is falsy |
|
|
316
|
+
| `platform` | `string \| string[]` | — | OS(es) this process runs on (e.g. `'darwin'`, `'linux'`). Non-matching processes are removed, their dependents still start |
|
|
317
|
+
| `stopSignal` | `'SIGTERM' \| 'SIGINT' \| 'SIGHUP'` | `'SIGTERM'` | Signal for graceful stop |
|
|
318
|
+
| `color` | `string \| string[]` | — | Hex color (e.g. `"#ff6600"`) or color name. Array for round-robin in script patterns |
|
|
264
319
|
| `watch` | `string \| string[]` | — | Glob patterns — restart process when matching files change |
|
|
265
|
-
| `interactive` | `boolean` | `false` | When
|
|
266
|
-
| `
|
|
320
|
+
| `interactive` | `boolean` | `false` | When true, keyboard input is forwarded to the process |
|
|
321
|
+
| `optional` | `boolean` | — | Process is visible but not started automatically. Use Alt+S to start manually |
|
|
322
|
+
| `errorMatcher` | `boolean \| string` | — | `true` = detect ANSI red output, string = regex pattern |
|
|
323
|
+
| `workspaces` | `boolean \| string \| string[]` | — | Run command in monorepo workspaces. `true` = all workspaces, string = specific workspace by name/path, string[] = multiple workspaces |
|
|
267
324
|
| `showCommand` | `boolean` | `true` | Print the command being run as the first line of output |
|
|
268
|
-
|
|
325
|
+
<!-- /generated:config-process -->
|
|
269
326
|
|
|
270
327
|
### Workspace expansion
|
|
271
328
|
|
|
@@ -417,25 +474,34 @@ Unmatched references are left as-is (the shell will expand `$db` as empty + `.po
|
|
|
417
474
|
|
|
418
475
|
Keybindings are shown in the status bar at the bottom of the app. Panes are readonly by default — keyboard input is not forwarded to processes. Set `interactive: true` on processes that need stdin (REPLs, shells, etc.).
|
|
419
476
|
|
|
477
|
+
<!-- generated:keybindings -->
|
|
420
478
|
| Key | Action |
|
|
421
479
|
|-----|--------|
|
|
422
|
-
| `←`/`→` or `1`-`9` |
|
|
423
|
-
| `
|
|
424
|
-
| `
|
|
480
|
+
| `←`/`→` or `1`-`9` | Tabs |
|
|
481
|
+
| `G/Shift+G` | Top/bottom |
|
|
482
|
+
| `R` | Restart |
|
|
483
|
+
| `S` | Stop/start |
|
|
484
|
+
| `F` | Search |
|
|
485
|
+
| `Y` | Copy all |
|
|
486
|
+
| `L` | Clear |
|
|
487
|
+
| `T` | Timestamps |
|
|
488
|
+
| `O` | Open logs |
|
|
489
|
+
| `Ctrl+Click` | Open link |
|
|
490
|
+
| `Ctrl+C` | Quit |
|
|
491
|
+
<!-- /generated:keybindings -->
|
|
492
|
+
|
|
493
|
+
Search mode (after pressing `F`):
|
|
494
|
+
|
|
495
|
+
| Key | Action |
|
|
496
|
+
|-----|--------|
|
|
497
|
+
| `Tab` | Toggle between single-pane and all-process search |
|
|
425
498
|
| `Enter`/`Shift+Enter` | Next/previous match |
|
|
426
499
|
| `Esc` | Exit search |
|
|
427
|
-
| `R` | Restart current process |
|
|
428
|
-
| `Shift+R` | Restart all processes |
|
|
429
|
-
| `S` | Stop/start current process |
|
|
430
|
-
| `Y` | Copy all output |
|
|
431
|
-
| `L` | Clear pane |
|
|
432
|
-
| `G`/`Shift+G` | Scroll to top/bottom |
|
|
433
500
|
| `PageUp`/`PageDown` | Scroll by page |
|
|
434
|
-
| `Ctrl+Click` | Open link |
|
|
435
|
-
| `Ctrl+C` | Quit |
|
|
436
501
|
|
|
437
502
|
## Tab icons
|
|
438
503
|
|
|
504
|
+
<!-- generated:tab-icons -->
|
|
439
505
|
| Icon | Status |
|
|
440
506
|
|------|--------|
|
|
441
507
|
| ○ | Pending |
|
|
@@ -444,8 +510,10 @@ Keybindings are shown in the status bar at the bottom of the app. Panes are read
|
|
|
444
510
|
| ● | Ready |
|
|
445
511
|
| ◑ | Stopping |
|
|
446
512
|
| ■ | Stopped |
|
|
513
|
+
| ✓ | Finished |
|
|
447
514
|
| ✖ | Failed |
|
|
448
515
|
| ⊘ | Skipped |
|
|
516
|
+
<!-- /generated:tab-icons -->
|
|
449
517
|
|
|
450
518
|
## Dependencies
|
|
451
519
|
|