Skip to content

Refactor CLI to nested command groups#90

Merged
cursor[bot] merged 5 commits into
mainfrom
cursor/nested-cli-subcommands-f7eb
Jul 21, 2026
Merged

Refactor CLI to nested command groups#90
cursor[bot] merged 5 commits into
mainfrom
cursor/nested-cli-subcommands-f7eb

Conversation

@lbrealdev

@lbrealdev lbrealdev commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Replace flat verb-noun commands with nested resource-oriented groups, and thin the CLI entrypoint:

github-rest-cli repo get|list|create|delete
github-rest-cli dependabot enable|disable
github-rest-cli environment create

Changes

  • Nested argparse subparsers with shared helpers and wider help formatting
  • Extract argparse builders, handlers, and confirm UX into parser.py; keep main.py as a thin cli() entrypoint
  • Replace repo create --visibility with mutually exclusive --public / --private / --internal (default public)
  • Update README, CONTRIBUTING, and CLI tests

Breaking change

  • Old flat commands (get-repo, list-repo, create-repo, delete-repo, and dependabot --enable/--disable) are removed
  • repo create --visibility is replaced by --public / --private / --internal

Verification

  • pytest -v — 39 passed
  • uvx ruff check / uvx ruff format --check — clean
  • Manual --help checks for nested commands and repo create visibility flags
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 20, 2026 23:25
Replace flat verb-noun commands (get-repo, list-repo, ...) with
resource-oriented groups: repo, dependabot, and environment.
Dispatch via args.func(args) and update docs/tests accordingly.

Co-authored-by: akae <lbrealdev@users.noreply.github.com>
Co-authored-by: akae <lbrealdev@users.noreply.github.com>
@lbrealdev
lbrealdev marked this pull request as ready for review July 20, 2026 23:31
@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

cursoragent and others added 3 commits July 20, 2026 23:37
Use a short FORMAT metavar and a wider HelpFormatter so
repo list/get flag descriptions stay on one line.

Co-authored-by: akae <lbrealdev@users.noreply.github.com>
Move argparse builders and command handlers into parser.py so
main.py stays a thin entrypoint. Replace repo create --visibility
with mutually exclusive --public/--private/--internal flags.

Co-authored-by: akae <lbrealdev@users.noreply.github.com>
The intro paragraph already covers what the CLI does.

Co-authored-by: akae <lbrealdev@users.noreply.github.com>
@cursor
cursor Bot merged commit 7fbc57f into main Jul 21, 2026
4 checks passed
@cursor
cursor Bot deleted the cursor/nested-cli-subcommands-f7eb branch July 21, 2026 00:01
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