# Dump installed plugins to composer.json?

**URL:** https://discourse.roots.io/t/dump-installed-plugins-to-composer-json/10249
**Category:** bedrock
**Tags:** plugins, composer
**Created:** 2017-08-20T19:54:12Z
**Posts:** 3
**Showing post:** 3 of 3

## Post 3 by @TangRufus — 2017-08-21T19:46:55Z

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 "\","}'
```

---

_[View the full topic](https://discourse.roots.io/t/dump-installed-plugins-to-composer-json/10249)._
