Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Feb 1, 2026

Summary

Improve developer experience by showing --help instead of errors/confusing behavior when CLI commands are called without required arguments.

Breaking Change: vcspull sync now requires --all to sync all repos. Previously it would silently sync nothing.

Changes

Command Before After
vcspull sync "No repositories matched" Shows help
vcspull search argparse error Shows help
vcspull add argparse error Shows help
vcspull discover argparse error Shows help

Implementation

  • Add --all/-a flag to sync command
  • Show help for sync when no patterns and --all not specified
  • Show help for search when no query terms provided
  • Show help for add when no repo_path provided
  • Show help for discover when no scan_dir provided
  • Update tests to verify new behavior
  • Update CLI examples to show vcspull sync --all

Test plan

  • All 740 tests pass
  • Ruff linting passes
  • Mypy type checking passes
  • Manual verification:
    • vcspull sync → shows help
    • vcspull sync --all → syncs all repos
    • vcspull search → shows help
    • vcspull add → shows help
    • vcspull discover → shows help

@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.62%. Comparing base (bcfb4bb) to head (15d7f0f).

Files with missing lines Patch % Lines
src/vcspull/cli/sync.py 72.22% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #511      +/-   ##
==========================================
+ Coverage   80.52%   80.62%   +0.10%     
==========================================
  Files          16       16              
  Lines        2192     2199       +7     
  Branches      454      457       +3     
==========================================
+ Hits         1765     1773       +8     
+ Misses        277      276       -1     
  Partials      150      150              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

why: Improve developer experience by providing helpful guidance instead of
cryptic argparse errors or confusing behavior when CLI commands are called
without required arguments.

what:
- Add --all/-a flag to sync command (BREAKING: sync now requires --all to
  sync all repos, previously synced none silently)
- Show help for sync when no patterns and --all not specified
- Show help for search when no query terms provided (changed nargs="+" to "*")
- Show help for add when no repo_path provided (added nargs="?")
- Show help for discover when no scan_dir provided (added nargs="?")
- Update tests to verify new help-on-empty behavior
- Update CLI examples to show vcspull sync --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants