PHPackages                             wp-cli/package-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. wp-cli/package-command

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

wp-cli/package-command
======================

Lists, installs, and removes WP-CLI packages.

v2.7.0(2mo ago)187.6M↑28.3%18[1 PRs](https://github.com/wp-cli/package-command/pulls)8MITPHPCI passing

Since Mar 10Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/wp-cli/package-command)[ Packagist](https://packagist.org/packages/wp-cli/package-command)[ Docs](https://github.com/wp-cli/package-command)[ RSS](/packages/wp-cli-package-command/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (50)Used By (8)

wp-cli/package-command
======================

[](#wp-clipackage-command)

Lists, installs, and removes WP-CLI packages.

[![Testing](https://github.com/wp-cli/package-command/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/package-command/actions/workflows/testing.yml)

Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) | [Support](#support)

Using
-----

[](#using)

This package implements the following commands:

### wp package

[](#wp-package)

Lists, installs, and removes WP-CLI packages.

```
wp package

```

WP-CLI packages are community-maintained projects built on WP-CLI. They can contain WP-CLI commands, but they can also just extend WP-CLI in some way.

Learn how to create your own command from the [Commands Cookbook](https://make.wordpress.org/cli/handbook/guides/commands-cookbook/)

**EXAMPLES**

```
# List installed packages.
$ wp package list
+-----------------------+------------------+----------+-----------+----------------+
| name                  | authors          | version  | update    | update_version |
+-----------------------+------------------+----------+-----------+----------------+
| wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev        |
+-----------------------+------------------+----------+-----------+----------------+

# Install the latest stable version of the package.
$ wp package install wp-cli/server-command
Installing package wp-cli/server-command (^2.0)
Updating /home/person/.wp-cli/packages/composer.json to require the package...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Dependency resolution completed in 0.005 seconds
Analyzed 732 packages to resolve dependencies
Analyzed 1034 rules to resolve dependencies
 - Installing package
Writing lock file
Generating autoload files
---
Success: Package installed.

# Uninstall package.
$ wp package uninstall wp-cli/server-command
Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json
Removing repository details from /home/person/.wp-cli/packages/composer.json
Removing package directories and regenerating autoloader...
Success: Uninstalled package.

```

### wp package browse

[](#wp-package-browse)

Browses WP-CLI packages available for installation.

```
wp package browse [--fields=] [--format=]

```

Lists packages available for installation from the [Package Index](http://wp-cli.org/package-index/). 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 [wp-cli/ideas#51](https://github.com/wp-cli/ideas/issues/51)to read about its potential replacement.

**OPTIONS**

```
[--fields=]
	Limit the output to specific fields. Defaults to all fields.

[--format=]
	Render output in a particular format.
	---
	default: table
	options:
	  - table
	  - csv
	  - ids
	  - json
	  - yaml
	---

```

**AVAILABLE FIELDS**

These fields will be displayed by default for each package:

- name
- description
- authors
- version

There are no optionally available fields.

**EXAMPLES**

```
$ wp package browse --format=yaml
---
10up/mu-migration:
  name: 10up/mu-migration
  description: A set of WP-CLI commands to support the migration of single WordPress instances to multisite
  authors: Nícholas André
  version: dev-main, dev-develop
aaemnnosttv/wp-cli-dotenv-command:
  name: aaemnnosttv/wp-cli-dotenv-command
  description: Dotenv commands for WP-CLI
  authors: Evan Mattson
  version: v0.1, v0.1-beta.1, v0.2, dev-main, dev-dev, dev-develop, dev-tests/behat
aaemnnosttv/wp-cli-http-command:
  name: aaemnnosttv/wp-cli-http-command
  description: WP-CLI command for using the WordPress HTTP API
  authors: Evan Mattson
  version: dev-main

```

### wp package get

[](#wp-package-get)

Gets information about an installed WP-CLI package.

```
wp package get  [--fields=] [--format=] [--skip-update-check]

```

**OPTIONS**

```

	Name of the package to get information for.

[--fields=]
	Limit the output to specific fields. Defaults to all fields.

[--format=]
	Render output in a particular format.
	---
	default: table
	options:
	  - table
	  - csv
	  - json
	  - yaml
	---

[--skip-update-check]
	Skip checking for updates. This is faster and avoids authentication issues with GitHub or Composer repositories.

```

**AVAILABLE FIELDS**

These fields will be displayed by default for each package:

- name
- authors
- version
- update
- update\_version

These fields are optionally available:

- description

**EXAMPLES**

```
# Get information about an installed package.
$ wp package get wp-cli/scaffold-package-command
+----------------+---------------------------------+
| Field          | Value                           |
+----------------+---------------------------------+
| name           | wp-cli/scaffold-package-command |
| authors        | Daniel Bachhuber                |
| version        | dev-main                        |
| update         | available                       |
| update_version | 2.x-dev                         |
+----------------+---------------------------------+

# Get the version of a package.
$ wp package get wp-cli/server-command --fields=version --format=json
{"version":"dev-main"}

```

### wp package install

[](#wp-package-install)

Installs a WP-CLI package.

```
wp package install  [--insecure] [--interaction]

```

Packages are required to be a valid Composer package, and can be specified as:

- Package name from WP-CLI's package index.
- Git URL accessible by the current shell user.
- Path to a directory on the local machine.
- Local or remote .zip file.

Packages are installed to `~/.wp-cli/packages/` by default. Use the `WP_CLI_PACKAGES_DIR` environment variable to provide a custom path.

When installing a local directory, WP-CLI simply registers a reference to the directory. If you move or delete the directory, WP-CLI's reference breaks.

When installing a .zip file, WP-CLI extracts the package to `~/.wp-cli/packages/local/`.

If Github token authorization is required, a GitHub Personal Access Token () can be used. The following command will add a GitHub Personal Access Token to Composer's global configuration: composer config -g github-oauth.github.com &lt;GITHUB\_TOKEN&gt; Once this has been added, the value used for &lt;GITHUB\_TOKEN&gt; will be used for future authorization requests.

**OPTIONS**

```

	Name, git URL, directory path, or .zip file for the package to install.
	Names can optionally include a version constraint
	(e.g. wp-cli/server-command:@stable).

[--insecure]
	Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.

[--interaction]
	Control interactive mode. Use `--no-interaction` to disable prompts (interactive by default). Useful for scripting.

```

**EXAMPLES**

```
# Install the latest stable version of a package.
$ wp package install runcommand/hook

# Install the latest stable version (explicitly specified).
$ wp package install wp-cli/server-command:@stable

# Install a package hosted at a GitLab.com URL.
$ wp package install https://gitlab.com/foo/wp-cli-bar-command.git

# Install a package in a .zip file.
$ wp package install google-sitemap-generator-cli.zip

```

### wp package is-installed

[](#wp-package-is-installed)

Checks if a given package is installed.

```
wp package is-installed

```

Returns exit code 0 when installed, 1 when uninstalled.

**OPTIONS**

```

	The package to check.

```

**EXAMPLES**

```
# Check whether "foo/bar" is installed; exit status 0 if installed, otherwise 1
$ wp package is-installed foo/bar
$ echo $?
1

```

### wp package list

[](#wp-package-list)

Lists installed WP-CLI packages.

```
wp package list [--fields=] [--format=] [--skip-update-check]

```

**OPTIONS**

```
[--fields=]
	Limit the output to specific fields. Defaults to all fields.

[--format=]
	Render output in a particular format.
	---
	default: table
	options:
	  - table
	  - csv
	  - ids
	  - json
	  - yaml
	---

[--skip-update-check]
	Skip checking for updates. This is faster and avoids authentication issues with GitHub or Composer repositories.

```

**AVAILABLE FIELDS**

These fields will be displayed by default for each package:

- name
- authors
- version
- update
- update\_version

These fields are optionally available:

- description

**EXAMPLES**

```
# List installed packages.
$ wp package list
+-----------------------+------------------+----------+-----------+----------------+
| name                  | authors          | version  | update    | update_version |
+-----------------------+------------------+----------+-----------+----------------+
| wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev        |
+-----------------------+------------------+----------+-----------+----------------+

# List installed packages without checking for updates.
$ wp package list --skip-update-check
+-----------------------+------------------+----------+--------+----------------+
| name                  | authors          | version  | update | update_version |
+-----------------------+------------------+----------+--------+----------------+
| wp-cli/server-command | Daniel Bachhuber | dev-main | none   |                |
+-----------------------+------------------+----------+--------+----------------+

```

### wp package path

[](#wp-package-path)

Gets the path to an installed WP-CLI package, or the package directory.

```
wp package path []

```

If you want to contribute to a package, this is a great way to jump to it.

**OPTIONS**

```
[]
	Name of the package to get the directory for.

```

**EXAMPLES**

```
# Get package path.
$ wp package path
/home/person/.wp-cli/packages/

# Get path to an installed package.
$ wp package path wp-cli/server-command
/home/person/.wp-cli/packages/vendor/wp-cli/server-command

# Change directory to package path.
$ cd $(wp package path) && pwd
/home/vagrant/.wp-cli/packages

```

### wp package update

[](#wp-package-update)

Updates installed WP-CLI packages to their latest version.

```
wp package update [...] [--interaction]

```

```
[...]
	One or more package names to update. If not specified, all packages will be updated.

[--interaction]
	Control interactive mode. Use `--no-interaction` to disable prompts (interactive by default). Useful for scripting.

```

**EXAMPLES**

```
# Update all packages.
$ wp package update
Using Composer to update packages...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Dependency resolution completed in 0.074 seconds
Analyzed 1062 packages to resolve dependencies
Analyzed 22383 rules to resolve dependencies
Writing lock file
Generating autoload files
---
Success: Packages updated.

# Update a specific package.
$ wp package update wp-cli/server-command
Using Composer to update packages...
---
Loading composer repositories with package information
Updating dependencies
Writing lock file
Generating autoload files
---
Success: Package updated successfully.

```

### wp package uninstall

[](#wp-package-uninstall)

Uninstalls a WP-CLI package.

```
wp package uninstall  [--insecure] [--interaction]

```

**OPTIONS**

```

	Name of the package to uninstall.

[--insecure]
	Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.

[--interaction]
	Control interactive prompts. Use `--no-interaction` to disable interactive questions (useful for scripting).

```

**EXAMPLES**

```
# Uninstall package.
$ wp package uninstall wp-cli/server-command
Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json
Removing repository details from /home/person/.wp-cli/packages/composer.json
Removing package directories and regenerating autoloader...
Success: Uninstalled package.

```

Installing
----------

[](#installing)

This package is included with WP-CLI itself, no additional installation necessary.

To install the latest version of this package over what's included in WP-CLI, run:

```
wp package install git@github.com:wp-cli/package-command.git

```

Contributing
------------

[](#contributing)

We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

For a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.

### Reporting a bug

[](#reporting-a-bug)

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should [search existing issues](https://github.com/wp-cli/package-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/wp-cli/package-command/issues/new). Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, [review our bug report documentation](https://make.wordpress.org/cli/handbook/bug-reports/).

### Creating a pull request

[](#creating-a-pull-request)

Want to contribute a new feature? Please first [open a new issue](https://github.com/wp-cli/package-command/issues/new) to discuss whether the feature is a good fit for the project.

Once you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See "[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)" for details specific to working on this package locally.

### License

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Support
-------

[](#support)

GitHub issues aren't for general support questions, but there are other venues you can try:

*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity56

Moderate usage in the ecosystem

Community36

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~73 days

Recently: every ~166 days

Total

46

Last Release

63d ago

Major Versions

v1.0.14 → v2.0.02018-08-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b5740d002b5556abcceed36e016c8f8ba6f533eefef6107b3c60a830704993b?d=identicon)[danielbachhuber](/maintainers/danielbachhuber)

![](https://www.gravatar.com/avatar/6dde7f578e5530884238e7173f768ae3a890b6d66eb99262a82f2c494a1b67d4?d=identicon)[schlessera](/maintainers/schlessera)

---

Top Contributors

[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (571 commits)")[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (216 commits)")[![scribu](https://avatars.githubusercontent.com/u/225715?v=4)](https://github.com/scribu "scribu (151 commits)")[![swissspidy](https://avatars.githubusercontent.com/u/841956?v=4)](https://github.com/swissspidy "swissspidy (92 commits)")[![gitlost](https://avatars.githubusercontent.com/u/481982?v=4)](https://github.com/gitlost "gitlost (37 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (27 commits)")[![Sidsector9](https://avatars.githubusercontent.com/u/17757960?v=4)](https://github.com/Sidsector9 "Sidsector9 (13 commits)")[![miya0001](https://avatars.githubusercontent.com/u/309946?v=4)](https://github.com/miya0001 "miya0001 (11 commits)")[![ernilambar](https://avatars.githubusercontent.com/u/2098823?v=4)](https://github.com/ernilambar "ernilambar (11 commits)")[![aaemnnosttv](https://avatars.githubusercontent.com/u/1621608?v=4)](https://github.com/aaemnnosttv "aaemnnosttv (10 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (8 commits)")[![NateWr](https://avatars.githubusercontent.com/u/2306629?v=4)](https://github.com/NateWr "NateWr (8 commits)")[![mwilliamson](https://avatars.githubusercontent.com/u/391876?v=4)](https://github.com/mwilliamson "mwilliamson (6 commits)")[![nyordanov](https://avatars.githubusercontent.com/u/192220?v=4)](https://github.com/nyordanov "nyordanov (5 commits)")[![francescolaffi](https://avatars.githubusercontent.com/u/357331?v=4)](https://github.com/francescolaffi "francescolaffi (4 commits)")[![mpeshev](https://avatars.githubusercontent.com/u/328189?v=4)](https://github.com/mpeshev "mpeshev (4 commits)")[![wojsmol](https://avatars.githubusercontent.com/u/4176111?v=4)](https://github.com/wojsmol "wojsmol (3 commits)")[![clemens-tolboom](https://avatars.githubusercontent.com/u/371014?v=4)](https://github.com/clemens-tolboom "clemens-tolboom (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![lkwdwrd](https://avatars.githubusercontent.com/u/1895738?v=4)](https://github.com/lkwdwrd "lkwdwrd (3 commits)")

---

Tags

clicomposerhacktoberfestpackagepackage-managementwordpresswp-cliwp-cli-package

### Embed Badge

![Health badge](/badges/wp-cli-package-command/health.svg)

```
[![Health](https://phpackages.com/badges/wp-cli-package-command/health.svg)](https://phpackages.com/packages/wp-cli-package-command)
```

###  Alternatives

[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1048.8M55](/packages/wp-cli-entity-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1717.7M15](/packages/wp-cli-scaffold-command)[wp-cli/i18n-command

Provides internationalization tools for WordPress projects.

11610.4M52](/packages/wp-cli-i18n-command)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

919.0M53](/packages/wp-cli-extension-command)[wp-cli/db-command

Performs basic database operations using credentials stored in wp-config.php.

768.0M30](/packages/wp-cli-db-command)[wp-cli/server-command

Launches PHP's built-in web server for a specific WordPress installation.

687.2M5](/packages/wp-cli-server-command)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
