zuke.tools.console

← Python API reference

@zuke/console 1.5.0: @zuke/console — task-shaped console output for Zuke builds, so a build never reaches for console.log.

Symbols

#

ConsoleTasks

class
class ConsoleTasks

Task-shaped console output. A single namespaced object (like FileTasks) rather than loose helpers: logging methods, structural primitives, and configuration all hang off ConsoleTasks.

  • static async info(ctx: ServiceContext, message: str) -> None

    Log an informational message (markup-aware).

  • static async log(ctx: ServiceContext, message: str) -> None

    Alias for ConsoleTasksApi.info.

  • static async success(ctx: ServiceContext, message: str) -> None

    Log a success/completion message.

  • static async warn(ctx: ServiceContext, message: str) -> None

    Log a warning (a ::warning:: annotation under GitHub Actions).

  • static async error(ctx: ServiceContext, message: str, options: Mapping[str, object] | None=None) -> None

    Log an error, optionally appending a thrown value's message.

  • static async debug(ctx: ServiceContext, message: str) -> None

    Log a debug diagnostic (shown only at debug/trace level).

  • static async trace(ctx: ServiceContext, message: str) -> None

    Log the most verbose trace output (shown only at trace level).

  • static async escape(ctx: ServiceContext, text: str) -> object

    Escape [/] in text so it renders literally rather than as markup — for embedding arbitrary or untrusted strings in a message.

  • static async line(ctx: ServiceContext, options: object | None=None) -> None

    Print a horizontal rule spanning the width.

  • static async rule(ctx: ServiceContext, title: str | None=None, options: Mapping[str, object] | None=None) -> None

    Print a rule, optionally with a centred title.

  • static async box(ctx: ServiceContext, content: str | Sequence[str], options: object | None=None) -> None

    Print a bordered panel around content (markup-aware).

  • static async table(ctx: ServiceContext, columns: Sequence[object], rows: Sequence[Sequence[str]], options: object | None=None) -> None

    Print an aligned table; header and cell text may contain markup.

  • static async header(ctx: ServiceContext, name: str) -> None

    Print the ruled banner Zuke opens a target's section with.

  • static async logo(ctx: ServiceContext, options: Mapping[str, object] | None=None) -> None

    Print the Zuke ASCII logo, two-tone when colour is on.

  • static async summary(ctx: ServiceContext, reports: Sequence[object], total_ms: float, ok: bool) -> None

    Print the end-of-build summary table and closing verdict.

  • static async group(ctx: ServiceContext, name: str) -> None

    Open a collapsible group; close it with ConsoleTasksApi.endGroup.

  • static async end_group(ctx: ServiceContext) -> None

    Close the group opened by ConsoleTasksApi.group.

  • static async configure(ctx: ServiceContext, options: Mapping[str, object]) -> None

    Reconfigure logging (level, sink, theme, colour, width, Actions mode).

  • static async level(ctx: ServiceContext) -> object

    The active minimum severity.

  • static async reset(ctx: ServiceContext) -> None

    Reset all configuration to defaults (level re-seeded from the env).