PHPackages                             graze/sprout - 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. [Database &amp; ORM](/categories/database)
4. /
5. graze/sprout

ActiveLibrary[Database &amp; ORM](/categories/database)

graze/sprout
============

Seed data for your project

1.0.0(1mo ago)08[3 issues](https://github.com/graze/sprout/issues)MITPHPPHP ^7.4 || ^8.0CI passing

Since Aug 9Pushed 1mo ago12 watchersCompare

[ Source](https://github.com/graze/sprout)[ Packagist](https://packagist.org/packages/graze/sprout)[ Docs](https://github.com/graze/sprout)[ RSS](/packages/graze-sprout/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (26)Versions (21)Used By (0)

🌱 Sprout
========

[](#-sprout)

[![Latest Version on Packagist](https://camo.githubusercontent.com/29cf7321944c4858f2f977f0e883c57c6f68e977ccd3d61944d7f1b0b79a3dee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772617a652f7370726f75742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/sprout)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![CI](https://camo.githubusercontent.com/8fd5e59f8c5687795f2c2cbf6c97a97c7ac0bf54b4fa66f126f6542317c341f8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6772617a652f7370726f75742f63692e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d4349)](https://github.com/graze/sprout/actions/workflows/ci.yml)[![PHP Version](https://camo.githubusercontent.com/c3ea23e9e812e17ddd412f558e8fe2ab779a65f6d4df97cd67d333a95daf8439/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6772617a652f7370726f75742e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Docker Image Size](https://camo.githubusercontent.com/658c04c7ec299473d17b1a78510e13c8c906bc22113ca677de87b15dd5fb0ca2/68747470733a2f2f696d672e736869656c64732e696f2f6d6963726f6261646765722f696d6167652d73697a652f6772617a652f7370726f75742e7376673f7374796c653d666c61742d737175617265)](https://hub.docker.com/r/graze/sprout/)[![Docker Pulls](https://camo.githubusercontent.com/93ece02ae11d8fda2343ce67f4f9ffcb4debbe783a72ad80dbf3d1993b213234/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6772617a652f7370726f75742e7376673f7374796c653d666c61742d737175617265)](https://hub.docker.com/r/graze/sprout/)

Sprout is a tool to help Dump, Truncate and Seed development data into your databases.

[![fun image](https://camo.githubusercontent.com/9d6921c4a460dd86f0d2d5c6702c43f4e503159e3d7276e209f3091d0ed1ceea/68747470733a2f2f37382e6d656469612e74756d626c722e636f6d2f35333434323565623131373036343438616638636535383338363239663736642f74756d626c725f696e6c696e655f6e39743867647a43377031717a6a7a68752e676966)](https://camo.githubusercontent.com/9d6921c4a460dd86f0d2d5c6702c43f4e503159e3d7276e209f3091d0ed1ceea/68747470733a2f2f37382e6d656469612e74756d626c722e636f6d2f35333434323565623131373036343438616638636535383338363239663736642f74756d626c725f696e6c696e655f6e39743867647a43377031717a6a7a68752e676966)

1. Seed sql data from local files
2. Dump data from mysql tables
3. Performs actions in parallel
4. Handle multiple groups of seed data (for example, `static`, `core`, `testing`)

Install
-------

[](#install)

Via Composer

```
composer require graze/sprout
```

Via docker

```
docker run -v [volumes] --rm graze/sprout [command]
```

Usage
-----

[](#usage)

See the [full documentation](https://graze.github.io/sprout) for complete usage information.

### File Structure

[](#file-structure)

Sprout will use the following file structure by default, you can change the root and each group's path in the configuration file.

```
- /seed
  - group1
    - schema1
      - table1.sql
      - table2.sql
    - schema2
      - table3.sql
  - group1
    - schema3
      - table4.sql

```

### Quick Start

[](#quick-start)

```
# Dump all tables you are interested in
sprout dump --config=config/sprout.yml --group=static a_schema:table_1,table_2 ...

# Store the data in your repository of choice
git add /seed/static/*

# Seed the data from your local files
sprout seed --config=config/sprout.yml --group=static
```

### Seeding

[](#seeding)

```
sprout seed [--config=] [--group=] [--no-chop|--chop-all] [[:,...]] ...

sprout seed --config=config/sprout.yml the_schema
sprout seed --config=config/sprout.yml --chop-all the_schema
sprout seed --config=config/sprout.yml --no-chop the_schema

sprout seed --config=config/sprout.yml the_schema:country
sprout seed --config=config/sprout.yml --no-chop the_schema:country other_schema:planets

sprout seed --config=config/sprout.yml --group=core
sprout seed --config=config/sprout.yml --group=core the_schema
sprout seed --config=config/sprout.yml --no-chop --group=extra
sprout seed --config=config/sprout.yml --chop-all --group=extra
```

### Truncating the data from all the tables in a schema

[](#truncating-the-data-from-all-the-tables-in-a-schema)

```
sprout chop [--config=] [--group=] [--all] [[:,...]] ...

sprout chop --config=config/sprout.yml the_schema
sprout chop --config=config/sprout.yml the_schema:country
sprout chop --config=config/sprout.yml --all the_schema

sprout chop --config=config/sprout.yml --group=core the_schema
sprout chop --config=config/sprout.yml --group=extra the_schema:country
sprout chop --config=config/sprout.yml --group=extra --all
```

### Dumping the data from all tables in a schema

[](#dumping-the-data-from-all-tables-in-a-schema)

```
sprout dump [--config=] [--group=] [[:,...]] ...

sprout dump --config=config/sprout.yml the_schema
sprout dump --config=config/sprout.yml the_schema:country

sprout dump --config=config/sprout.yml --group=core
sprout dump --config=config/sprout.yml --group=core the_schema:country
```

### Configuration

[](#configuration)

The configuration file follows the following standards.

By default sprout looks for a `config/sprout.yml` file, you can specify a different file using `--config=path/to/file.yml`.

```
defaults:
  group: core
  # default path
  path: /seed
  # number of simultaneous processors to run at a time (default: 10)
  simultaneousProcesses: 10

# ability to specify custom paths for groups
groups:
  core:
    path: /custom/path/to/group

schemas:
  # name of the schema to reference
  :
    # [optional] the actual name of the schema in the database. If not specified,  from above will be used
    schema: 'schema'

    # Connection details - this is just an example, you may want to specify
    # different properties, e.g. if connecting to a remote server. You are
    # advised to refer to the 'pdo' documentation for further details.
    connection:
      user: 'morphism'
      password: 'morphism'
      # driver for the database connection, currently only: `mysql` is supported
      driver: 'mysql'
      # [optional] name of the database
      dbName: 'schema'
      # database on a remote host
      host: 'db'
      # [optional] port to use, by default: 3306
      port: 3306
```

Testing
-------

[](#testing)

```
make build test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Harry Bragg](https://github.com/h-bragg)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance93

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 82.4% of commits — single point of failure

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 ~285 days

Recently: every ~688 days

Total

11

Last Release

33d ago

Major Versions

0.4.5 → 1.0.02026-05-28

PHP version history (2 changes)0.1PHP ^7.0

1.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/637788?v=4)[graze.com](/maintainers/graze)[@graze](https://github.com/graze)

---

Top Contributors

[![rick-lam](https://avatars.githubusercontent.com/u/114425681?v=4)](https://github.com/rick-lam "rick-lam (28 commits)")[![biggianteye](https://avatars.githubusercontent.com/u/1482649?v=4)](https://github.com/biggianteye "biggianteye (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

databasegrazedatabase-seedersprout

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/graze-sprout/health.svg)

```
[![Health](https://phpackages.com/badges/graze-sprout/health.svg)](https://phpackages.com/packages/graze-sprout)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M19.5k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[contao/core-bundle

Contao Open Source CMS

1301.6M2.7k](/packages/contao-core-bundle)

PHPackages © 2026

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