repowise-dev / repowise-dev/repowise
[Feature] Extend quiet-by-default logging plus -v to the remaining CLI commands
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 711
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 439
Description
Problem
#929 made repowise init and repowise update quiet by default. Before that, update printed provider and pipeline debug lines (ollama.generate.done, ingestion graph/traverser events) straight into the live Rich progress bar, which is what produced the duplicated "Generating pages..." rows in #922.
That PR deliberately scoped itself to those two commands. Every other command still runs with whatever logging configuration it happens to inherit, so any command that touches the core pipeline or an LLM/embedding provider can spray debug output over its own progress display. Only init and update define a -v flag today:
packages/cli/src/repowise/cli/commands/init_cmd/command.py:499
packages/cli/src/repowise/cli/commands/update_cmd/command.py:260
Proposed Solution
Give the remaining long-running commands the same treatment: a --verbose / -v flag wired to the helper #929 already added.
The helper lives in packages/cli/src/repowise/cli/_setup.py:
configure_cli_logging(verbose: bool = False) -> None
- Default:
httpx,httpcore,repowise.coreandrepowise.serverpinned toERROR, so progress bars are the only output. verbose=True: repowise's own loggers pass through atDEBUGso a user can watch provider/pipeline activity.httpx/httpcorestay atERROReither way, since their debug stream is HTTP-level noise that buries the useful lines.
setup_logging_silence() is a thin wrapper over the quiet path, for call sites that never want logs (the multi-repo workspace init flow).
Per command:
- Add the flag, matching the existing wording:
@click.option( "--verbose", "-v", is_flag=True, default=False, help="Show debug logs from the pipeline.", ) from repowise.cli._setup import configure_cli_logging- Call
configure_cli_logging(verbose=verbose)as the first statement in the command body, before any pipeline import or work. Reference call site:update_cmd/command.py:387.
Candidates, roughly in priority order. Each renders progress or calls a provider:
| Command | File | Why it matters |
|---|---|---|
reindex |
commands/reindex_cmd.py |
Rich Progress at line 118, embedding calls per batch |
restyle |
commands/restyle_cmd.py |
Regenerates pages through the LLM provider, --concurrency 12 |
export |
commands/export_cmd.py |
Rich Progress at line 155 |
claude-md |
commands/claude_md_cmd.py |
Generation path, plus a workspace variant |
watch |
commands/watch_cmd.py |
Long-lived, repeatedly triggers update runs |
workspace add / workspace scan |
commands/workspace_cmd.py |
Indexing and doc generation per repo (_run_index_for_repo, _generate_docs_for_added_repo) |
health |
commands/health_cmd/ |
codegen.py calls a provider |
coverage add |
commands/coverage_cmd.py |
Ingests and parses reports |
augment |
commands/augment_cmd/ |
This is splittable. One PR per command, or a small batch, is easier to review than one sweep. Picking a single command off this list is a reasonable first contribution.
Alternatives Considered
- A global
-von the root group instead of per-command. Cleaner in principle, but Click would need the flag before the subcommand (repowise -v update), which breaks the existingrepowise update -vspelling and every doc that uses it. - Always-quiet everywhere, no flag. Rejected: users debugging a stuck provider call need a way to see the pipeline. That was the specific gap #929 closed for
init. - Leaving the read-only commands alone. Still the plan.
status,search,costs,risk,saved,expand, anddistillprint and exit fast, and probably do not need this. Use judgement, and say so in the PR if you skip one from the table.
Additional Context
configure_cli_loggingsetscache_logger_on_first_use=Falseon purpose. Modules that callstructlog.get_logger(__name__)at import time hold a bound logger snapshotted beforeconfigureruns, so without that, debug lines fromcore/ingestion/*leak past the filter on the first run of a session. This is also why the call has to come before the work, not partway through it.- Helper tests live in
tests/unit/cli/test_shared_helpers.py(test_configure_cli_logging_quiet_by_default,test_configure_cli_logging_verbose_shows_repowise_debug). A per-command test asserting the flag reachesconfigure_cli_loggingis enough; no need to re-test the helper. - Where a command already has a
-vmeaning something else, or where its output is deliberately terse, either reuse the flag or leave it always-quiet viasetup_logging_silence()and note why. - The "why it matters" column comes from grepping for
Progress(and provider usage, not from running each command, so it is a pointer rather than a confirmed reproduction for every entry. - Related: #922, #928, #929
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Choose one candidate command, such as reindex_cmd.py, restyle_cmd.py, or export_cmd.py, and compare its entry point with init_cmd/command.py and update_cmd/command.py. Read configure_cli_logging in packages/cli/src/repowise/cli/_setup.py, then inspect the existing helper tests in tests/unit/cli/test_shared_helpers.py. Done means the selected command supports --verbose/-v, configures logging before its work, and has a focused flag test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100