Skip to content

Route general CLI logging to stderr in the next major release #7412

Description

@coderabbitai

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

breakingBreaking change, requires major version bump

Type

Fields

Priority

Low

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions