Skip to content

Refactor: Migrate CLI to Cobra - v1.2.0-rc.1#5

Merged
CarlosEduJs merged 3 commits intomainfrom
refactor/migrate-to-cobra
Feb 27, 2026
Merged

Refactor: Migrate CLI to Cobra - v1.2.0-rc.1#5
CarlosEduJs merged 3 commits intomainfrom
refactor/migrate-to-cobra

Conversation

@CarlosEduJs
Copy link
Owner

This PR migrates the command-line interface from the standard flag package to Cobra to improve project structure and user experience.

Changes

Architecture: Implemented the cmd/ package layout and simplified

  • main.go: to a minimal entrypoint.
  • Persistent Flags: Added a global --path (-p) flag available across all subcommands.
  • Documentation: Added usage examples to the help text for every command.
  • Completion: Enabled native shell autocompletion support via the completion command.
  • Versining: Updated usage of version templates and promoted the project to v1.2.0-rc.1.
  • Error Handling: Implemented SilenceErrors and SilenceUsage for cleaner CLI output.

Version

  • Bumped to v1.2.0-rc.1.

…tentFlags().GetString(path) in subcommands; VersionTemplate sets pumu version v1.2.0-beta.0; real examples for all cmds; SilenceErrors/SilenceUsage avoids duplicate errors; zsh completion enabled; local flags (--threshold, --verbose, --reinstall/--no-select) only, global is --path
@github-actions
Copy link

🧹 Pumu CI Results

Check Status
Tests ✅ success
Lint ✅ success
Build ✅ success

🎉 All checks passed! This PR is ready for review.

@CarlosEduJs CarlosEduJs merged commit 19e416d into main Feb 27, 2026
8 checks passed
@CarlosEduJs CarlosEduJs deleted the refactor/migrate-to-cobra branch February 27, 2026 21:58
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.

1 participant