Search for a specific package on packagist from the composer command line
Here are some options to narrow down the search for a package.
If your composer.json
has custom vcs repos composer show -a
will list thos
1 2 3 4 5 6 7 8 9 10 11 | # show everything composer show -a # show everything that starts with 'cakephp/app' composer show -a | grep '^cakephp/app' # show everything that contains 'cakephp' composer show -a | grep cakephp # show everything that contains 'cakephp' that also contains 'i18n' composer show -a | grep cakephp | grep i18n |
Show the repositories in your project that composer knows about
If you are in your project directory (where composer.json
is) locally and you want to know what remote repositories are configured.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # show the default repository composer config repositories --list | grep repositories # The default composer repositories look like this [repositories.packagist.org. type ] composer [repositories.packagist.org.url] https: //repo .packagist.org # project with multiple custom vcs repos composer config repositories --list | grep repositories [repositories.2. type ] vcs [repositories.2.url] https: //github .com /toggenation/cakephp-cors [repositories.1. type ] vcs [repositories.1.url] https: //github .com /toggenation/whos-online [repositories.0. type ] vcs [repositories.0.url] https: //github .com /toggenation/asset-mix [repositories.packagist.org. type ] composer [repositories.packagist.org.url] https: //repo .packagist.org |
Show information about a package
When not in a project dir
1 2 | composer show -a cakephp /app composer show -a cakephp /cakephp |
0 Comments