Skip to content
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

feat: Craft 3: Add craft\console\controllers\HelpController with --asJson flag #12017

Conversation

khalwat
Copy link
Contributor

@khalwat khalwat commented Sep 28, 2022

Description

PR for Craft 3

This adds a craft\console\controllers\HelpController that adds a --asJson flag, to allow for external API integration, such as with Fig for CLI autocomplete.

Usage:

All commands:

php craft help --asJson

Individual commands:

php craft help <command/name> --asJson

Alternately, the -j flag can be used as an option alias

If the --asJson flag isn't set, it calls through to the parent yii\console\controllers\HelpController to do its normal thing.

Related issues

n/a

@khalwat khalwat requested a review from a team as a code owner September 28, 2022 03:55
@brandonkelly brandonkelly changed the base branch from v3 to feature/help-json October 7, 2022 13:25
@brandonkelly brandonkelly merged commit ffc65a9 into craftcms:feature/help-json Oct 7, 2022
@brandonkelly
Copy link
Member

Craft 3.7.56 and 4.2.6 are out with this! (via #12074)

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