Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

The wp scaffold package-readme command now includes command aliases (defined via @alias docblock) in generated README files, matching the format recently added to the handbook.

Changes

  • src/ScaffoldPackageCommand.php: Extract alias field from cmd-dump output and pass to template
  • templates/readme-using.mustache: Display alias after synopsis using format **Alias:** xyz``
  • features/scaffold-package-readme.feature: Add test coverage using scaffold post-type command (alias cpt)

Behavior

Aliases display only when present. Commands without aliases show no alias line.

Example output:

### wp scaffold post-type

Generates PHP code for registering a custom post type.

~~~
wp scaffold post-type <slug> [--label=<label>] ...
~~~

**Alias:** `cpt`

**OPTIONS**

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.wordpress.org
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
  • wp-cli.org
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-package-command/scaffold-package-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php scaffold package wp-cli/default-readme (dns block)
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-package-command/scaffold-package-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php scaffold package wp-cli/custom-branch d -n 10 (dns block)
    • Triggering command: /usr/bin/php /usr/bin/php /home/REDACTED/work/scaffold-package-command/scaffold-package-command/vendor/wp-cli/wp-cli/bin/../php/boot-fs.php scaffold package wp-cli/foo --dir=foo --require_wp_cli=&gt;=0.24.0-alpha rgo/bin/git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add command aliases to README.md output by wp scaffold package-readme</issue_title>
<issue_description>The README.md output by wp scaffold package-readme does not include @alias directive information (alternative names for a given command as described here). I think it would be good to include it either by default (my preference) or via a flag such as below:

wp scaffold package-readme --include-aliases
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
<comment_new><author>@swissspidy</author><body>
Makes sense to me!

We just recently enabled this for the handbook already via https://github.com/wp-cli/wp-cli/pull/6147 and https://github.com/wp-cli/handbook/pull/605 so this should be trivial to do.

We can include this by default, with a simple line like:

Alias: xyz

</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add command aliases to README output Add command alias display to scaffold package-readme output Jan 9, 2026
Copilot AI requested a review from swissspidy January 9, 2026 13:09
@swissspidy swissspidy added this to the 2.1.1 milestone Jan 9, 2026
@swissspidy swissspidy marked this pull request as ready for review January 9, 2026 13:57
@swissspidy swissspidy requested a review from a team as a code owner January 9, 2026 13:57
@swissspidy swissspidy merged commit 233838d into main Jan 9, 2026
46 of 47 checks passed
@swissspidy swissspidy deleted the copilot/add-command-aliases-readme branch January 9, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add command aliases to README.md output by wp scaffold package-readme

2 participants