feat: add global quiet flag for CLI output#19
Merged
Conversation
cf185bd to
6dbb4cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
--quietoption so the CLI can be used in scripts/CI without progress/status noise.Description
src/scribae/cli_output.pyutility exposingis_quiet(),echo_info()andsecho_info()to gate non-essential output.--quiet/-qoption on the root Typer app callback and store it inctx.objso subcommands can observe it viaclick.get_current_context.idea,brief,write,feedback,meta,translate) to: useis_quiet()when creating thereporter, replace directtyper.echo/typer.sechostatus writes withecho_info/secho_info, and suppress progress messages when quiet mode is enabled.test_quiet_flag_suppresses_status_outputintests/unit/main_test.pyto assert that--quietsuppresses status output while still writing expected files.Testing
uv run ruff check src testsand checks passed.uv run mypy srcand it reported unrelated type errors (missingtorchandno-any-returninsrc/scribae/translate/mt.py) which are pre-existing and not introduced by this change.uv run pytestand the full suite passed (161 passed).Codex Task