You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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:
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.core and repowise.server pinned to ERROR, so progress bars are the only output.
verbose=True: repowise's own loggers pass through at DEBUG so a user can watch provider/pipeline activity. httpx/httpcore stay at ERROR either 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 -v on 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 existing repowise update -v spelling and every doc that uses it.
Leaving the read-only commands alone. Still the plan. status, search, costs, risk, saved, expand, and distill print 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_logging sets cache_logger_on_first_use=False on purpose. Modules that call structlog.get_logger(__name__) at import time hold a bound logger snapshotted before configure runs, so without that, debug lines from core/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 reaches configure_cli_logging is enough; no need to re-test the helper.
Where a command already has a -v meaning something else, or where its output is deliberately terse, either reuse the flag or leave it always-quiet via setup_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.
Problem
#929 made
repowise initandrepowise updatequiet by default. Before that,updateprinted 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
initandupdatedefine a-vflag today:Proposed Solution
Give the remaining long-running commands the same treatment: a
--verbose / -vflag wired to the helper #929 already added.The helper lives in
packages/cli/src/repowise/cli/_setup.py: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:
from repowise.cli._setup import configure_cli_loggingconfigure_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:
reindexcommands/reindex_cmd.pyProgressat line 118, embedding calls per batchrestylecommands/restyle_cmd.py--concurrency 12exportcommands/export_cmd.pyProgressat line 155claude-mdcommands/claude_md_cmd.pywatchcommands/watch_cmd.pyworkspace add/workspace scancommands/workspace_cmd.py_run_index_for_repo,_generate_docs_for_added_repo)healthcommands/health_cmd/codegen.pycalls a providercoverage addcommands/coverage_cmd.pyaugmentcommands/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
-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.init.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.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.-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.Progress(and provider usage, not from running each command, so it is a pointer rather than a confirmed reproduction for every entry.repowise updatewiki pages generation CLI rendering strangeness #922, fix(update): count onboarding pages in the generation progress total #928, feat(cli): make init/update quiet by default, show debug logs under --verbose #929