Skip to content

feat(cli): split cli into sub commands #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 19, 2025
Merged

Conversation

avivkeller
Copy link
Member

@avivkeller avivkeller commented Apr 15, 2025

Description

This PR splits the CLI into subcommands, following the structure shown below:

api-docs-tooling
│
├── generate       → Generate API docs
├── lint           → Run linter independently
├── list
│   ├── generators → List available generators
│   ├── rules      → List available linter rules
│   └── reporters  → List available reporters
├── interactive    → Launch a guided CLI wizard

Validation

Every command shown in the updated README should work as intended.

Related Issues

Fixes #148

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I've covered new added functionality with unit tests if necessary.

@avivkeller avivkeller requested a review from a team as a code owner April 15, 2025 21:52
@avivkeller
Copy link
Member Author

Ack! I never rebased the multi-threading

Copy link
Member Author

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review on things I need to verify/fix

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a DX point of view, do we want to have commands that are just keyword like list or should they all be flags like --list?
I'm fine with both

@avivkeller
Copy link
Member Author

From a DX point of view, do we want to have commands that are just keyword like list or should they all be flags like --list?

As @ovflowd stated in the linked issue,

There should be a simple top-level command called list to list the current generators. (Version, Name, Description, Examples)

I like the idea of splitting each different function into these subcommands, I feel it makes it easier to understand what does what.

@avivkeller avivkeller marked this pull request as draft April 16, 2025 16:13
@avivkeller avivkeller force-pushed the feat/cli/subcommands branch from 14707bc to 0255fb6 Compare April 16, 2025 16:52
@avivkeller avivkeller marked this pull request as ready for review April 16, 2025 16:52
Co-authored-by: flakey5 <73616808+flakey5@users.noreply.github.com>
@avivkeller avivkeller requested a review from ovflowd April 17, 2025 15:43
@avivkeller
Copy link
Member Author

Requesting review from @ovflowd, who opened the issue

@avivkeller avivkeller merged commit 222fea3 into main Apr 19, 2025
7 checks passed
@avivkeller avivkeller deleted the feat/cli/subcommands branch April 19, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add list generators command / move current commands under "generate"
4 participants