Skip to content

Pretty output (and other options) should work for all commands #2

Open

Description

@neoromantic

Every command should honour --format (json, pretty, quiet) and --quiet.

Today only tg status has a real pretty view (src/commands/status/pretty.ts). Everywhere else, pretty prints the same JSON without the outer wrapper (src/utils/output.ts), and errors are always JSON.

Human text that breaks JSON on stdout:

  • tg auth login-qr prints the QR code and its instructions to stdout;
  • tg sql --output csv and tg sql print-schema print even with --quiet;
  • citty's own argument errors (for example a missing required argument) print usage text instead of the JSON error schema;
  • (tg daemon stop is fixed in fix: live smoke suite, dependency update and the bugs it found #14.)

To do:

  • Pretty: a table for lists and key/value lines for single objects, plus readable errors.
  • Quiet: nothing on success.
  • In json and quiet modes nothing human-readable goes to stdout; prompts, the QR code and progress lines go to stderr.

Done when an e2e test runs every offline command in all three formats and checks that stdout parses as JSON in json mode.

Activity

  1. added
    enhancement
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions