Reference

Mayfly command cheatsheet

A list of commands available with Mayfly.

Container operations

Deploying

Run to deploy your code to Mayfly.

bash
$ bash <(curl -fsSL mayfly.live/preview.sh)

Updating code

Run the same command to sync up any code changes.

bash
$ bash <(curl -fsSL mayfly.live/preview.sh)

Stopping a preview

Stop containers without removing data (alias: shutdown).

bash
$ bash <(curl -fsSL mayfly.live/preview.sh) stop

Restarting

Restart your preview container (alias: reboot).

bash
$ bash <(curl -fsSL mayfly.live/preview.sh) restart

Deleting a container

Tear down (and delete) your preview environment (alias: teardown).

bash
$ bash <(curl -fsSL mayfly.live/preview.sh) delete

Database operations

Import a database

Import a database using stdin.

bash
$ cat dump.sql | bash <(curl -fsSL host.mayfly.live/preview.sh) import-db

Import SQL from file (plain or gzipped).

bash
$ DB_FILE=dump.sql.gz bash <(curl -fsSL host.mayfly.live/preview.sh) import-db

Export a database

Export database to stdout.

bash
$ bash <(curl -fsSL host.mayfly.live/preview.sh) export-db > dump.sql

Export database to file.

bash
$ DB_FILE=dump.sql bash <(curl -fsSL host.mayfly.live/preview.sh) export-db

SSH Operations

Access preview

Allows SSH access to the preview web container.

bash
$ ssh [email protected] <slug>

List previews

List which previews are currently associated with your account.

bash
$ ssh [email protected]

View username

View the username currently associated with your SSH key.

bash
$ ssh [email protected] whoami

Calculate the slug

Useful if you need to anticipate what the slug is.

bash
$ ssh [email protected] slug <ddev_name> <branch>

View global rsync excludes

View which excludes are set globally on your account.

bash
$ ssh [email protected] rsync-excludes