Dump installed plugins to composer.json?

Maybe something like this:

$ wp plugin list --format=csv --fields=name,version | awk '{if ($1 != "name,version") print $1;}' | awk -F',' '{system("composer require wpackagist-plugins/" $1 ":" $2)}'

Note: It actually run $ composer require for each plugin

Update:
maybe this version, copy and paste the console output to composer.json

$ wp plugin list --format=csv --fields=name,version | awk '{if ($1 != "name,version") print $1;}' | awk -F',' '{print "\"wpackagist-plugins/" $1 "\":" " \"" $2 "\","}'
3 Likes