Skip to content

Add WP-CLI handbook link to wp help output#6273

Merged
swissspidy merged 2 commits intomainfrom
copilot/mention-shell-friends-in-cli-help
Mar 15, 2026
Merged

Add WP-CLI handbook link to wp help output#6273
swissspidy merged 2 commits intomainfrom
copilot/mention-shell-friends-in-cli-help

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 15, 2026

The WP-CLI handbook was not referenced anywhere in the CLI help output, limiting its discoverability.

Changes

  • templates/man-params.mustache: Adds handbook URL with a brief label inside the {{#root_command}} block, so it appears only at the bottom of wp help — not on every subcommand help page.
  • features/help.feature: Asserts the handbook URL is present in wp help output and absent from subcommand help (e.g. wp help core).

The bottom of wp help now reads:

  Run 'wp help <command>' to get more information on a specific command.

  See the handbook for more information on WP-CLI:
  https://make.wordpress.org/cli/handbook/

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:

  • example.com
    • Triggering command: /usr/bin/php php vendor/bin/phpunit --color=always --bootstrap ./vendor/wp-cli/wp-cli-tests/tests/bootstrap.php (dns block)
  • nosuchhost_asdf_asdf_asdf.com
    • Triggering command: /usr/bin/php php vendor/bin/phpunit --color=always --bootstrap ./vendor/wp-cli/wp-cli-tests/tests/bootstrap.php (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>Mention "shell-friends" within the command line help too</issue_title>
<issue_description>## Facts

shell-friends.md https://make.wordpress.org/cli/handbook/references/shell-friends/

✅ is linked to from these web pages:

❗️ It is yet not mentioned from anywhere within the command line help.

Proposal: Rename shell-friends to something more telling

  • "shell-friends" may be fun or amusing, but not very telling at first.
  • I'd rename it to "shell-hints" or "wp-cli plus shell commands combined" or something into that direction.

Proposal: Mention it in the CLI help screen(s) too

Maybe at the very bottom of wp help insert:

SEE ALSO:

wp help shell-hints — Get some tips & tricks how you can make the most of wp-cli in combination with other CLI apps. Composability is a key philosophy of WP-CLI!

Or if not made available as a help page of the app, then:

SEE ALSO:

https://make.wordpress.org/cli/handbook/references/shell-hints/

  • Get some tips & tricks how you can make the most of wp-cli in combination with other CLI apps.
  • Composability is a key philosophy of WP-CLI!
  • Many Terminal apps allow clicking hyperlinks (with right-click or click + modifier key).
  • Or copy and pasting into a web browser will also do.
  • Certainly this measure would help discoverability a bit.</issue_description>

<agent_instructions>Link to / reference the handbook at the end of the help output</agent_instructions>

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

@danielbachhuber Thanks for the suggestion, @porg !

I'm not sure it makes sense to link to Shell Friends from the CLI context, but it would probably be worth linking to the handbook.</comment_new>


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Mention "shell-friends" within the command line help Add WP-CLI handbook link to wp help output Mar 15, 2026
Copilot AI requested a review from swissspidy March 15, 2026 13:42
@swissspidy swissspidy marked this pull request as ready for review March 15, 2026 15:46
@swissspidy swissspidy requested a review from a team as a code owner March 15, 2026 15:46
Copilot AI review requested due to automatic review settings March 15, 2026 15:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a reference to the WP-CLI handbook in the root wp help output so users can discover fuller documentation directly from the CLI help screen.

Changes:

  • Extend the root-command help footer to include a handbook link.
  • Update the Behat help feature to assert the handbook link is shown for wp help but not for subcommand help (e.g., wp help core).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
templates/man-params.mustache Adds handbook reference lines to the root command help footer.
features/help.feature Adds coverage ensuring the handbook link appears only in root help output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@swissspidy swissspidy added this to the 3.0.0 milestone Mar 15, 2026
@swissspidy swissspidy merged commit 9e3c4f8 into main Mar 15, 2026
73 checks passed
@swissspidy swissspidy deleted the copilot/mention-shell-friends-in-cli-help branch March 15, 2026 15:50
swissspidy added a commit to apermo/wp-cli that referenced this pull request Mar 16, 2026
* Initial plan

* Add WP-CLI handbook URL reference to wp help output

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
swissspidy added a commit that referenced this pull request Mar 16, 2026
…6270)

* fix(context): resolve admin user dynamically

Replace hardcoded user ID 1 fallback in Admin
context with smart user resolution. On multisite,
queries get_super_admins() to find a valid super
admin. On single site, queries for the first user
with the administrator role. Emits a clear error
if no suitable user is found.

Fixes #6269

* fix(context): optimize query and add test cases

Use get_users() with login__in for single DB query
instead of looping get_user_by(). Add single-site
error case test. Replace wp super-admin commands
with direct option manipulation in tests.

* fix(context): fix linting issues

Use single quotes for strings per PHPCS rules.
Fix gherkin use-and lint violations by replacing
consecutive When steps with And.

* fix(context): address review feedback

Revert multisite super admin lookup from get_users()
back to foreach + get_user_by('login') loop because
get_users() only fetches users on the current site
but a super admin might not be a member of any site.

Add debug logging after resolving admin user ID.

* fix(context): use instanceof for type safety

* Fix autoloader priority: locally installed packages now fully override phar-bundled versions (#6218)

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>

* Add environment variable configuration support to wp-cli.yml (#6169)

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>

* Autocomplete `--url` (#5704)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>

* Add WP-CLI handbook link to `wp help` output (#6273)

* Initial plan

* Add WP-CLI handbook URL reference to wp help output

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

* Update file(s) from wp-cli/.github

* Update file(s) from wp-cli/.github

* Fix SSH alias path not forwarded to remote when defined as a separate config key (#6274)

* Initial plan

* Fix SSH alias path not forwarded to remote when path is a separate config key

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

* Fix: forward active alias to runcommand subprocess (#6272)

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Fix vagrant SSH strict host key checking failure (#6275)

* Initial plan

* Fix vagrant SSH strict host key checking failure

When ssh: vagrant is configured and vagrant ssh-config is parsed,
add -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null to
the SSH command to match what vagrant itself sets. This prevents
failures when the vagrant VM has been recreated and has a different
host key than what is stored in ~/.ssh/known_hosts.

Adds a Behat test scenario to verify the fix.

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @swissspidy

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Add optional `$newline` parameter to `WP_CLI::log()` and `WP_CLI::line()` (#6276)

* Initial plan

* Add optional $newline parameter to WP_CLI::log(), WP_CLI::line(), and logger info() methods

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

* Undo Base class change

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>

* Refactor: remove unused imports (#6277)

* Harden some tests on macOS

* Update tests

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>
Co-authored-by: Ian Dunn <ian@iandunn.name>
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
Co-authored-by: swissspidy <swissspidy@users.noreply.github.com>
Co-authored-by: Sören Wünsch <soerenwrede@gmail.com>
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.

Mention "shell-friends" within the command line help too

3 participants