Expand description
Prepare finite tasks, then execute shell commands in managed process groups.
Modules§
- dotenv
- Dotenv files as Nx reads them, with npm’s
dotenvanddotenv-expand: every file of a set is parsed first, then$VARand${VAR}references are expanded once across all of them. - readiness
- A continuous target’s
readyWhen, as Nx 24 checks it: a url to request, a port to connect to, a command that must succeed, or text to find in the output. Tasks that depend on the target withwaitFor: "ready"start once the check passes. - report
- Where a run’s progress, warnings and task output go. The runner and the
cache report events; the CLI installs a sink that renders them for the
output style. Without one, events print as
qk:status lines on stderr. - tokens
- The placeholder syntax Nx 24 shares between run-commands arguments,
readyWhenand cache outputs:{name}or{name.path}, with??fallbacks.
Macros§
- status
- Reports a
qk:warning to the installed sink; by default it is written to stderr in one write, so task processes sharing stderr cannot split it.
Structs§
- Capture
- Framed stdout/stderr chunks, optionally stored on disk without buffering the task’s log, and shown as the task’s display asks.
- Decoration
- Nx’s per-command
prefix,prefixColor,colorandbgColor. - Node
Path - The runner’s Node selection, resolved only when a command starts.
- Prepared
Task - Recorded
Log - Ordered, stream-tagged frames retained for run history.
- Recording
- An external syscall recorder wrapping each command, with separate trace files.
Enums§
- Confinement
- How a sandboxed task’s commands are held to what it declares.
- Display
- How a task’s output reaches the terminal, after Nx’s output styles. Where
a task is named, it is as Nx prints it after
nx run: seeprintable. - Outcome
- Output
Style - The output styles qk renders.
- Shown
- How a task ended, for the header of held output.
Constants§
- INVOCATIONS
- The variable naming the tasks a task runs inside, one invocation a line.
- MAX_
LOG_ BYTES - Maximum framed bytes retained for an execution, independent of result caching.
- ROOT_
DOTENV_ FILES - The root dotenv files Nx loads into its own process at startup, in the order they take precedence.
Functions§
- collapsed
- enclosing_
invocations - The tasks this process runs inside, from
INVOCATIONS. - environment
- The process environment with the root dotenv files loaded into it, as
Nx loads them into its own process at startup, unless
NX_LOAD_DOT_ENV_FILES=false. Variables already set win. - execute
- execute_
captured - force_
colour - What
FORCE_COLORasks of qk’s own output: colour when it is set, none when it is0orfalse, and nothing when it is unset. Tasks receive the variable as it is. - invocation
- A task as an invocation: its id and arguments, which a task running inside it repeats only by recursing, as Nx’s task invocation tracker tells it.
- is_ci
- Whether this runs in CI, as Nx’s
isCIdecides it:CIset to anything butfalse(0included), or a variable a known CI provider sets. - is_
ci_ with is_ci, reading variables throughvariable.- prepare
- printable
- A task as Nx names it after
nx run:project:target, the target quoted when it has a colon, then:configurationand the task’s arguments. - read_
capture - replay
- Shows a recorded log as a cache hit.
- shell
- A command running
textin the shell tasks run in:/bin/shon Unix,cmd.exeon Windows.