Summary
In the next major release, route general Containerbase CLI logging to stderr instead of stdout.
Rationale
The current logger writes status messages to stdout. This prevents commands from providing machine-readable output on stdout because log messages can mix with the command output. containerbase-cli list tools --json is one affected command, but the logging behavior is general.
Changing the general logger stream from stdout to stderr is a breaking change. Defer this change to a major release.
Until then, users of containerbase-cli list tools --json must use --out <file> for parseable JSON output.
Affected areas
- General CLI logger output configuration
- CLI commands that write machine-readable output to stdout
src/cli/command/list-tools.ts
- CLI output-contract documentation
Required changes
- Route general status and diagnostic logging to stderr.
- Keep command result output on stdout.
- Preserve error reporting on stderr.
- Ensure JSON-producing commands can write one valid JSON document to stdout without log-message contamination.
- Define and document the stdout and stderr output contract.
Acceptance criteria
- General CLI logging writes to stderr instead of stdout.
containerbase-cli list tools --json writes one valid JSON document to stdout.
- Start, success, and error logs do not contaminate stdout command output.
- Text command output remains supported.
- Documentation describes the stdout and stderr output contract.
Backlinks
Summary
In the next major release, route general Containerbase CLI logging to stderr instead of stdout.
Rationale
The current logger writes status messages to stdout. This prevents commands from providing machine-readable output on stdout because log messages can mix with the command output.
containerbase-cli list tools --jsonis one affected command, but the logging behavior is general.Changing the general logger stream from stdout to stderr is a breaking change. Defer this change to a major release.
Until then, users of
containerbase-cli list tools --jsonmust use--out <file>for parseable JSON output.Affected areas
src/cli/command/list-tools.tsRequired changes
Acceptance criteria
containerbase-cli list tools --jsonwrites one valid JSON document to stdout.Backlinks
list toolscommand #7410list toolscommand #7410 (comment)@viceice