Skip to content

topmark.cli.emitters package index

topmark / cli / emitters

CLI rendering and emission helpers for TopMark.

This module contains helpers used by concrete CLI commands to emit output, both human-readable and machine-readable, to explicit console objects passed in by the CLI layer.

Responsibilities are intentionally split as follows:

Human-oriented output (TEXT format): - banners and section headers, - per-file summary lines and guidance, - colored diagnostics and hints, - unified diffs, - TOML blocks for config-related commands.

Machine-oriented output (JSON / NDJSON): - thin CLI-level emitters that print already-serialized JSON/NDJSON strings or streams produced elsewhere using an explicit console, - no data shaping, schema decisions, or serialization logic lives here.

Architecture overview for machine-readable formats: - topmark.core.machine: shared machine-readable output schemas, keys, meta payloads, and low-level normalization utilities. - topmark.config.machine: machine payloads/shapes/serializers for configuration inspection and validation commands. - topmark.pipeline.machine: machine payloads/shapes/serializers for processing results (check, strip). - topmark.registry.machine: machine payloads/shapes/serializers for registry inspection commands (filetypes, processors).

This module deliberately does not define machine schemas or JSON/NDJSON serialization logic. Its role is limited to selecting the appropriate serializer based on CLI options and emitting the resulting text to the console.

All printing goes through explicit console objects passed in by CLI commands or shared CLI helpers, keeping Click-style concerns isolated from core logic.

Immediate children in this package

topmark.cli.emitters.machine
CLI helpers for emitting machine-readable output.