Output, Errors, and Color
Nodeup supports human output for operators and JSON output for automation.
Human Output
Human output is the default:
Management commands write a concise human result to stdout. Human errors are written to stderr with this shape:
JSON Output
Use JSON mode for scripts:
Successful command payloads are pretty-printed JSON on stdout. Handled failures are JSON envelopes on stderr:
Stable envelope fields:
kindmessageexit_code
kind values include internal, invalid-input, unsupported-platform, network, not-found, conflict, and not-implemented.
ANSI styling is never injected into JSON stdout or stderr payloads.
Delegated Commands in JSON Mode
nodeup run --output json ... keeps stdout reserved for the final Nodeup response. Delegated command stdout is routed to stderr in JSON mode.
The final payload is:
The Nodeup process exits with the delegated command's exit code.
Completion Output
nodeup completions always writes raw shell script text to stdout. It does not wrap output in JSON, even when --output json is supplied.
Human Color Precedence
Human stdout and stderr color controls use this precedence:
--color auto|always|neverNODEUP_COLOR=auto|always|neverNO_COLOR- stream-aware
auto
auto enables ANSI styles only when the relevant stream is a terminal. Invalid NODEUP_COLOR values are ignored.
Examples:
Log Color
Logs use NODEUP_LOG_COLOR=always|auto|never. The default is colored logs unless NO_COLOR disables color. NODEUP_LOG_COLOR=always overrides NO_COLOR.
Logging Defaults
Default filters depend on context:
- Managed alias dispatch:
nodeup=warn - Human management commands:
nodeup=info - JSON management commands:
nodeup=off
Set RUST_LOG to override logging:
Keep RUST_LOG unset or off when a script needs clean JSON output.