Skip to content

feat(cli): add --version/-h flags and an install summary line #35

Description

@Chemaclass

Context

The CLI has a version command but not the conventional --version flag. After a batch install there is no summary — you scan per-line output.

Scope

  • Add --version (keep -v reserved for verbose to avoid a clash; -h already maps to help — confirm).
  • Print a final summary after install/install_from: e.g. installed X, skipped Y, failed Z. Respect silent.

Boundary

Files: bashdep (main/usage, install), tests/unit/bashdep_test.sh, docs/api.md, CHANGELOG.md. User-visible → CHANGELOG Added.

Acceptance criteria

  • bashdep --version prints the version; bashdep version unchanged
  • Batch install prints an accurate installed/skipped/failed summary; suppressed by --silent
  • Tests for the flag and the summary counts

Constraints (apply to all bashdep work)

  • Bash 3.2+ compatible — no declare -A, ${var,,}/${var^^}, mapfile, negative array index, &>>.
  • Zero runtime deps beyond curl/wget/awk/mktemp/mkdir/rm/cp/mv/printf/cat/grep/sort/tr/dirname/basename + shell builtins.
  • TDD: write the failing test first (tests/unit/*_test.sh), then implement; keep make test green for the right reason. Mock curl/wget — no network in tests.
  • Quality gate: make test && make sa && make lint must all pass.
  • Update docs/api.md / docs/behavior.md when public API or semantics change; add a CHANGELOG.md ## [Unreleased] entry for any user-visible change.
  • Conventional commits (ref: for refactors); never mention AI/automation. One PR per issue, assigned to Chemaclass.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions