Skip to content

feat: add global quiet flag for CLI output#19

Merged
fmueller merged 1 commit intomainfrom
codex/add-quiet-flag-to-cli
Feb 3, 2026
Merged

feat: add global quiet flag for CLI output#19
fmueller merged 1 commit intomainfrom
codex/add-quiet-flag-to-cli

Conversation

@fmueller
Copy link
Owner

Motivation

  • Provide a global --quiet option so the CLI can be used in scripts/CI without progress/status noise.
  • Ensure status and warning messages can be suppressed while preserving primary stdout responses (e.g., JSON payloads).
  • Make verbose reporters and write-status messages respect the quiet mode consistently across commands.

Description

  • Add a new src/scribae/cli_output.py utility exposing is_quiet(), echo_info() and secho_info() to gate non-essential output.
  • Add a global --quiet/-q option on the root Typer app callback and store it in ctx.obj so subcommands can observe it via click.get_current_context.
  • Update command modules (idea, brief, write, feedback, meta, translate) to: use is_quiet() when creating the reporter, replace direct typer.echo/typer.secho status writes with echo_info/secho_info, and suppress progress messages when quiet mode is enabled.
  • Add a unit test test_quiet_flag_suppresses_status_output in tests/unit/main_test.py to assert that --quiet suppresses status output while still writing expected files.

Testing

  • Ran uv run ruff check src tests and checks passed.
  • Ran uv run mypy src and it reported unrelated type errors (missing torch and no-any-return in src/scribae/translate/mt.py) which are pre-existing and not introduced by this change.
  • Ran uv run pytest and the full suite passed (161 passed).

Codex Task

@fmueller fmueller force-pushed the codex/add-quiet-flag-to-cli branch from cf185bd to 6dbb4cc Compare February 2, 2026 20:25
@fmueller fmueller merged commit 7c2534c into main Feb 3, 2026
5 of 7 checks passed
@fmueller fmueller deleted the codex/add-quiet-flag-to-cli branch February 3, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant