Skip to content

Third-party command discovery #51

Open

Description

@schlessera

As the package index has now been deprecated, we should start the discussion about whether we want a new discovery mechanism, and how that could work.

As the installation of packages has now been split off of the discovery mechanism, discovery can just as well be something entirely external to WP-CLI. It could be a full-blown package repository, but it could just as well be a specialized search engine.

Activity

  1. danielbachhuber commented on Aug 23, 2017

    @danielbachhuber
    Member
  2. schlessera commented on Aug 24, 2017

    @schlessera
    MemberAuthor

    That will only cover commands stored on GitHub. Ideally, we'd have a discovery mechanism for finding both stand-alone commands as well as commands included with plugins, no matter where the source files are stored.

  3. danielbachhuber commented on Aug 24, 2017

    @danielbachhuber
    Member

    as well as commands included with plugins

    Oh, this is an interesting idea.

  4. danielbachhuber commented on Aug 25, 2017

    @danielbachhuber
    Member

    as well as commands included with plugins

    Oh, this is an interesting idea.

    For plugin commands, maybe the more appropriate place would be the WordPress.org plugin repo. It'd be cool to work out a way for plugin authors to easily incorporate that detail.

  5. schlessera commented on Aug 26, 2017

    @schlessera
    MemberAuthor

    Yes, that might be feasible. Add a meta tag to the plugin file header, with something like:

    commands: event list, event get, ...
    

    Another approach would be to scan the plugin files for WP_CLI::add_command() calls.

  6. miya0001 commented on Aug 26, 2017

    @miya0001
    Member

    commands: event list, event get, ...

    Oh, nice. 👍

  7. schlessera commented on Sep 20, 2017

    @schlessera
    MemberAuthor
  8. stefanos82 commented on Mar 17, 2019

    @stefanos82

    Maybe https://wpackagist.org/ is much more appropriate suggestion than vim-awesome.

  9. szepeviktor commented on May 26, 2020

    @szepeviktor
  10. redtux commented on Oct 17, 2020

    @redtux

    Hi, I just found out about the fact that wp package is deprecated by running wp package browse.

    Would it be possible to include this information in the docs? https://developer.wordpress.org/cli/commands/package/

    Although the package index will remain in place for backward compatibility reasons, it has been deprecated and will not be updated further. Please refer to #51 to read about its potential replacement.

  11. gilzow commented on Jun 22, 2023

    @gilzow

    Was a replacement ever decided on? OR if not, can we resurface the discussion?

  12. danielbachhuber commented on Jun 27, 2023

    @danielbachhuber
    Member

    Was a replacement ever decided on?

    It was not.

    OR if not, can we resurface the discussion?

    Sure, how would you suggest moving the discussion forward?

  13. gilzow commented on Jun 27, 2023

    @gilzow

    Sure, how would you suggest moving the discussion forward?

    Thanks for the response, @danielbachhuber !

    There are several good suggestions above, but I've been unable to find (so far) why none of them were selected as appropriate. I've read the blog post and it seems that a packagist-like solution (Satis, wpackagist, etc) would solve both the central search location, and discoverability issues.

    They do not address discovering cli packages that are bundled into plugins/themes; HOWEVER, one could argue in those situations the cli functionality is worthless without the plugin/theme it is bundled into.

    IMO, I don't think plugin/theme cli discoverability should be a road-block for a centralized wp-cli package repository. I'm curious why none of the above solutions were ever implemented. Resources? Sponsor? Agreement?

    Edit: mispelling

  14. danielbachhuber commented on Jun 29, 2023

    @danielbachhuber
    Member

    I'm curious why none of the above solutions were ever implemented. Resources? Sponsor? Agreement?

    Honestly, I think it's more a lack of momentum than anything else. It's a little bit of a solution in search of a problem — in reality, there aren't a ton of new packages created on a regular basis.

    At this point, my preferred approach would be:

    1. A page in the handbook that lists community packages maintained outside of the WP-CLI community.
    2. Create more repos inside of this GitHub organization for common, general purpose commands.

    Out of curiosity, how did you stumble upon this issue? What problem are you hoping to see addressed?

  15. gilzow commented on Jun 29, 2023

    @gilzow

    Out of curiosity, how did you stumble upon this issue? What problem are you hoping to see addressed?

    I've been writing several wp-cli packages that I've been installing via git url. I'm now doing a presentation on writing custom wp-cli packages and noticed the handbook mentions the package index numerous times. But when I went to investigate how to submit a package to the index (linked from the package-index page), discovered it was deprecated. That led me down a rabbit hole that ultimately brought me here. 😄

    there aren't a ton of new packages created on a regular basis.

    I can't speak with confidence on whether there are, or there aren't, but I'll offer this counterpoint: one possibility is people follow the same path I did above, see that the index is deprecated, but then just stop. As an example of this, you can read the discussion surrounding the deprecation (and reversal) of Gitlab's public accessibility job template.

  16. danielbachhuber commented on Jun 29, 2023

    @danielbachhuber
    Member

    Thanks for the explanation 😊

    I've been writing several wp-cli packages that I've been installing via git url.

    Are these packages meant for public consumption? Do you intend to maintain and support them?

    I can't speak with confidence on whether there are, or there aren't, but I'll offer this counterpoint: one possibility is people follow the same path I did above, see that the index is deprecated, but then just stop.

    Sure, makes sense. If there's interest at an upcoming Contributor Day, we could potentially discuss reviving a package index cc @wp-cli/maintainers

  17. swissspidy commented on Jun 30, 2023

    @swissspidy
    Member

    A curated list of some useful and popular commands sounds like a good start in the interim.

    Highlighting plugins offering commands would also be nice. Maybe for now also in a curated way? There are around 600 in the repo: https://wpdirectory.net/search/01H46J87X60A5XC4KSJ1A42QVH

  18. gilzow commented on Jun 30, 2023

    @gilzow

    Are these packages meant for public consumption?

    Possibly? I could certainly make them more generic to see if anyone else can use them. So far they've mostly been for my own use.

    Do you intend to maintain and support them?

    Yes, if I end up putting them in a public directory of some sorts, I'd definitely continue to maintain them.

  19. schlessera commented on Jul 12, 2023

    @schlessera
    MemberAuthor
  20. gilzow commented on Jul 12, 2023

    @gilzow

    @swissspidy I already created an "awesome list" in the past: https://github.com/schlessera/awesome-wp-cli

    Is it ok if I promote/publicize that repository?

  21. ahathaway commented on May 13, 2026

    @ahathaway

    Wondering if there has been any progress/discussion on the possibility of getting the package manager for wp-cli working again? There are those of us who manage hundreds of wordpress websites and having a working, dependable package manager for wp cli would be very nice.

    What is everyone else doing instead?

  22. swissspidy commented on May 13, 2026

    @swissspidy
    Member

    What is not working for you?

    Discovering & installing WP-CLI packages from Packagist should be working as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions