13

Does composer have any built in way to display a list of plugins in the current project? Or is the only option for finding composer plugins some sort of text search through the composer.json files in vendor with something like

$ find vendor -name composer.json | xargs grep -i -r 'composer-plugin' 
Alana Storm
  • 164,128
  • 91
  • 395
  • 599

3 Answers3

7

Since a Composer plugin must require the composer-plugin-api package (see Composer documentation) you can list the plugins with this command:

composer depends composer-plugin-api

More details here: https://getcomposer.org/doc/03-cli.md#depends-why-

Fabien V
  • 71
  • 1
  • 1
3

You can run composer show -i (short for --installed).

See: https://stackoverflow.com/a/15186162/1348344

Community
  • 1
  • 1
Tomas Votruba
  • 23,240
  • 9
  • 79
  • 115
2

composer -i would list the whole dependency tree.

I usually use composer -s to see which requires are defined in the root composer.json

Timon de Groot
  • 7,255
  • 4
  • 23
  • 38