# Ymir CLI reference

This reference documents every command available in Ymir’s command-line tool (opens new window).

# Login

$ ymir login

Authenticate with Ymir by logging in using your email, password and 2FA code (if enabled). Creates an authentication token locally.

Authenticate using an environment variable

The Ymir CLI also lets you authenticate by storing an API token in the YMIR_API_TOKEN environment variable. You can create an API token on the account management page (opens new window).

Configuration file

All the Ymir CLI configuration options (including authentication token) are stored in ~/.ymir/config.json.

# Cache

Commands to manage cache clusters with the Ymir platform.

# cache:create

$ ymir cache:create [options] [<name>]

Create a new cache cluster.

# Arguments

# name (optional)

The name of the cache cluster.

# Options

# --network=NETWORK

The ID or name of the network on which the cache cluster will be created.

# --type=TYPE

The cache cluster type to create on the cloud provider.

# Usage

# Create a new cache cluster with prompt for the name, network and type
$ ymir cache:create

# Create a new cache cluster named "cluster" with prompt network and type
$ ymir cache:create cluster

# cache:delete

$ ymir cache:delete [<cache>]

Delete a cache cluster.

# Arguments

# cache (optional)

The ID or name of the cache cluster to delete.

# Usage

# Delete the cache cluster with prompt for cache cluster
$ ymir cache:delete

# Delete the cache cluster named "cluster"
$ ymir cache:delete cluster

# Delete the cache cluster with ID 42
$ ymir cache:delete 42

# cache:list

$ ymir cache:list

List all the cache clusters that the current team has access to.

# Usage

# List all cache clusters
$ ymir cache:list
---- --------- ----------- ---------- -------------- ----------- ----------------
 Id   Name      Provider   Network        Region      Status      Type
---- --------- ----------- ---------- -------------- ----------- ----------------
 42   cluster   AWS        ymir        us-east-1      available   cache.t3.micro
---- --------- ----------- ---------- -------------- ----------- ----------------

# cache:tunnel

$ ymir cache:create [options] [<cache>]

Create a SSH tunnel to a cache cluster.

Requires a bastion host

To create a SSH tunnel to a cache cluster, the network that cache cluster is on must have a bastion host.

# Arguments

# cache (optional)

The ID or name of the cache cluster to create a SSH tunnel to.

# Options

# --port=PORT (default: 6378)

The local port to use to connect to the cache cluster.

# Usage

# Create a SSH tunnel to a cache cluster with prompt for the cache cluster
$ ymir cache:tunnel

# Create a SSH tunnel to the cache cluster named "cluster"
$ ymir cache:tunnel cluster

# Create a SSH tunnel to the cache cluster named "cluster" on port "1234"
$ ymir cache:tunnel --port=1234 cluster

# Certificate

Commands to manage SSL certificates with the Ymir platform.

# certificate:delete

$ ymir certificate:request <certificate>

Delete a SSL certificate.

# Arguments

# certificate

The ID of the SSL certificate to delete.

# Usage

# Delete the SSL certificate with ID 42
$ ymir certificate:delete 42

# certificate:info

$ ymir certificate:request <certificate>

Get information on an SSL certificate.

# Arguments

# certificate

The ID of the SSL certificate to fetch the information of.

# Usage

# Get information on the SSL certificate with ID 42
$ ymir certificate:info 42

# certificate:list

$ ymir certificate:list

List the SSL certificates that belong to the currently active team.

# Usage

# List all SSL certificates
$ ymir certificate:list
 ---- -------------- ----------- --------------------- -------- --------
  Id   Provider       Region      Domains               Status   In Use
 ---- -------------- ----------- --------------------- -------- --------
  42   Personal AWS   us-east-1   example.com           issued   yes
 ---- -------------- ----------- --------------------- -------- --------

# certificate:request

$ ymir certificate:request [options] [<domain>]

Request a new SSL certificate from the cloud provider.

# Arguments

# domain (optional)

The domain that the SSL certificate is for.

# Options

# --provider=PROVIDER

The cloud provider where the certificate will be created.

# --region=REGION

The cloud provider region where the certificate will be located.

# Usage

# Create a SSL certificate with prompt for domain and region
$ ymir certificate:request

# Create a SSL certificate for "example.com" with prompt for region
$ ymir certificate:request example.com

# Create a SSL certificate for "example.com" in "us-east-1" region
$ ymir certificate:request example.com --region=us-east-1

# Database

Commands to manage your databases and database servers.

# database:create

$ ymir database:create [<database> [<name>]]

Create a new database on a database server.

Only useable with public database servers

You can only use the database:create command to create a database on a publicly accessible database server.

# Arguments

# database (optional)

The ID or name of the database server where the database will be created.

# name (optional)

The name of the new database.

# Usage

# Create a database with prompt for database server and database name
$ ymir database:create

# Create a database on the database server named "database-server" with prompt for the database name
$ ymir database:create database-server

# Create a database named "database-name" on the database server named "database-server"
$ ymir database:create database-server database-name

# database:delete

$ ymir database:delete [<database> [<name>]]

Delete a database on a database server.

Only useable with public database servers

You can only use the database:delete command to delete a database on a publicly accessible database server.

# Arguments

# database (optional)

The ID or name of the database server where the database will be deleted.

# name (optional)

The name of the database to delete.

# Usage

# Delete a database with prompt for database server and database name
$ ymir database:delete

# Delete a database on the database server named "database-server" with prompt for the database name
$ ymir database:delete database-server

# Delete a database named "database-name" on the database server named "database-server"
$ ymir database:delete database-server database-name

# database:list

$ ymir database:list [<database>]

List all the databases on a public database server.

Only useable with public database servers

You can only use the database:list command to list databases on a publicly accessible database server.

# Arguments

# database (optional)

The ID or name of the database server to list databases from.

# Usage

# List all databases on the database server with prompt for database server
$ ymir database:list

# List all databases on the database server named "database-server"
$ ymir database:list database-server

# database:server:create

$ ymir database:server:create [options] [<name>]

Create a new database server.

# Arguments

# name (optional)

The name of the database server.

# Options

# --dev

Create a development database server. (Overrides all other options.)

# --network=NETWORK

The ID or name of the network on which the database will be created.

# --storage=STORAGE

The maximum amount of storage (in GB) allocated to the database server.

# --type=TYPE

The database server type to create on the cloud provider.

# Usage

# Create a new database server with prompt for the name, network, storage and type
$ ymir database:server:create

# Create a development database server with a prompt for the name
$ ymir database:server:create --dev

# database:server:delete

$ ymir database:server:delete [<database>]

Delete a database server.

# Arguments

# database (optional)

The ID or name of the database server to delete.

# Usage

# Delete the database server with prompt for database server
$ ymir database:server:delete

# Delete the database server named "database-server"
$ ymir database:server:delete database-server

# Delete the database server with ID 42
$ ymir database:server:delete 42

# database:server:info

$ ymir database:server:info [<database>]

Get information on a database server.

# Arguments

# database (optional)

The ID or name of the database server to fetch the information of.

# Usage

# Get information on a database server with prompt for database server
$ ymir database:server:info

# Get information on the database server named "database-server"
$ ymir database:server:info database-server

# Get information on the database server with ID 42
$ ymir database:server:info 42

# database:server:list

$ ymir database:server:list

List all the database servers that the current team has access to.

# Usage

# List all databases servers
$ ymir database:server:list
---- --------- ----------- ---------- -------------- ----------- ------------- ---------
 Id   Name      Provider   Network        Region      Status      Type          Storage
---- --------- ----------- ---------- -------------- ----------- ------------- ---------
 42   ymir-db   AWS        ymir        us-east-1      available   db.t3.micro   50GB
---- --------- ----------- ---------- -------------- ----------- ------------- ---------

# database:server:modify

$ ymir database:server:modify [options] [<database>]

Modify a database server.

# Arguments

# database (optional)

The ID or name of the database server to modify.

# Options

# --storage=STORAGE

The maximum amount of storage (in GB) allocated to the database server.

# --type=TYPE

The database server type.

# Usage

# Modify a database server with prompt for database server
$ ymir database:server:modify

# Modify the database server named "database-server"
$ ymir database:server:modify database-server

# database:server:rotate-password

$ ymir database:server:rotate-password [<database>]

Rotate the password of the database server's ymir user.

Redeployment needed

All projects that use the database server with the default ymir user will be unable to connect to the database once the password rotated. You'll have have to redeploy each project using either the deploy or redeploy commands to restore the connection to the database server.

# Arguments

# database (optional)

The ID or name of the database server to rotate the password of.

# Usage

# Rotate the password of a database server with prompt for the database server
$ ymir database:server:rotate-password

# Rotate the password of the database server named "database-server"
$ ymir database:server:rotate-password database-server

# database:server:tunnel

$ ymir database:server:tunnel [options] [<database>]

Create a SSH tunnel to a database server.

Requires a bastion host

To create a SSH tunnel to a database server, the network that database server is on must have a bastion host.

# Arguments

# database (optional)

The ID or name of the database server to create a SSH tunnel to.

# Options

# --port=PORT (default: 3305)

The local port to use to connect to the database server.

# Usage

# Create a SSH tunnel to a database server with prompt for the database server
$ ymir database:server:tunnel

# Create a SSH tunnel to the database server named "database-server"
$ ymir database:server:tunnel database-server

# Create a SSH tunnel to the database server named "database-server" on port "1234"
$ ymir database:server:tunnel --port=1234 database-server

# database:user:create

$ ymir database:user:create [<database> [<username>]]

Create a new database on a database server.

Need to create user on private database

With a private database, the database:user:create command will only create the database user on the Ymir platform. You'll have to create the user on the database yourself using the credentials returned by the command.

# Arguments

# database (optional)

The ID or name of the database server where the user will be created.

# username (optional)

The username of the new database user.

# Usage

# Create a database user with prompt for database server and username
$ ymir database:user:create

# Create a database user on the database server named "database-server" with prompt for the username
$ ymir database:user:create database-server

# Create a database user named "database-user" on the database server named "database-server"
$ ymir database:create database-server database-user

# database:user:delete

$ ymir database:delete [<database> [<username>]]

Delete a user on a database.

Need to delete user on private database

With a private database, the database:user:delete command will only delete the database user on the Ymir platform. You'll have to delete the user on the database yourself to remove the user completly.

# Arguments

# database (optional)

The ID or name of the database server where the database user will be deleted.

# username (optional)

The username of the database user to delete.

# Usage

# Delete a database user with prompt for database server and username
$ ymir database:user:delete

# Delete a database on the database server named "database-server" with prompt for the username
$ ymir database:user:delete database-server

# Delete a database user named "database-user" on the database server named "database-server"
$ ymir database:user:delete database-server database-user

# database:user:list

$ ymir database:user:list [<database>]

List all the managed users on a database server.

# Arguments

# database (optional)

The ID or name of the database server to list users from.

# Usage

# List all the managed database users on the database server with prompt for database server
$ ymir database:user:list

# List all the managed database users on the database server named "database-server"
$ ymir database:user:list database-server

# DNS

Commands to manage your DNS records and zones.

# dns:record:change

$ ymir dns:record:change <zone> <type> <name> <value>

Change the value of a DNS record.

Use comma-separated values to create multiple DNS records

To create multiple DNS records for the name and type (for example with MX records), you want to use commas to separate each value to add as a record. Please check the usage section below for an example.

Overwrites existing DNS record

The dns:record:change command will overwrite an existing DNS record if one already exists with the same name and type.

# Arguments

# zone

The name of the DNS zone that the DNS record belongs to.

# type

The DNS record type.

# name

The name of the DNS record without the domain.

# value

The value of the DNS record.

# Usage

# Change the A record of "example.com" to 192.168.1.1
$ ymir dns:record:change example.com a @ 192.168.1.1

# Change the A record of "subdomain.example.com" to 192.168.1.1
$ ymir dns:record:change example.com a subdomain 192.168.1.1

# Change the MX records of "example.com"
$ ymir dns:record:change example.com MX @ "10 mail.example.com,20 mail2.example.com"

# dns:record:delete

$ ymir dns:record:delete <zone> [<record>]

Delete DNS record(s) from a DNS zone.

# Arguments

# zone

The ID or name of the DNS zone that the DNS record belongs to.

# record (optional)

The ID of the DNS record to delete.

# Usage

# Delete a DNS record from the "example.com" DNS zone with prompt for the DNS record
$ ymir dns:record:delete example.com

# Delete a DNS record with ID 42 from the "example.com" DNS zone
$ ymir dns:record:delete example.com 42

# dns:record:list

$ ymir dns:record:list [<zone>]

List the DNS records belonging to a DNS zone.

# Arguments

# zone (optional)

The ID or name of the DNS zone to list DNS records from.

# Usage

# List DNS records from a DNS zone with prompt for the DNS zone
$ ymir dns:record:list

# List DNS records from the "example.com" DNS zone
$ ymir dns:record:list example.com

# dns:zone:create

$ ymir dns:zone:create [options] [<name>]

Create a new DNS zone.

# Arguments

# name (optional)

The name of the domain managed by the created DNS zone.

# Options

# --provider=PROVIDER

The cloud provider region where the DNS zone will created.

# Usage

# Create a DNS zone with prompt for the domain name
$ ymir dns:zone:create

# Create a DNS zone for the "example.com" domain name
$ ymir dns:zone:create example.com

# dns:zone:delete

$ ymir dns:zone:delete [<zone>]

Delete a DNS zone.

# Arguments

# zone (optional)

The ID or name of the DNS zone to delete.

# Usage

# Delete a DNS zone with prompt to choose the DNS zone
$ ymir dns:zone:delete

# Delete the DNS zone for the "example.com" domain name
$ ymir dns:zone:delete example.com

# dns:zone:import-records

$ ymir dns:zone:import-records <zone> [<subdomain>...]

Import DNS records into a DNS zone.

Import DNS records first

If you wish to import DNS records, you must do so before updating your domain nameservers to the ones of your DNS zone.

# Arguments

# zone

The name of the DNS zone that the DNS record belongs to.

# subdomain

The subdomain(s) that we want to import.

# Usage

# Import the DNS records of the "example.com" root domain
$ ymir dns:zone:import-records example.com

# Import the DNS records of the "example.com" root domain as well as the "subdomain.example.com" subdomain
$ ymir dns:zone:delete example.com subdomain

# dns:zone:list

$ ymir dns:zone:list

List the DNS zones that belong to the currently active team.

# Usage

# List DNS zones
$ ymir dns:zone:list

# Docker

Commands to manage your project's Docker configuration.

# docker:create

$ ymir docker:create [options] [<environment>]

Create a new Dockerfile.

# Arguments

# environment (optional)

The name of the environment to create the Dockerfile for.

# Options

# --configure-project

Configure project's ymir.yml file.

# Usage

# Create a project-wide Dockerfile
$ ymir docker:create

# Create a Dockerfile for the "staging" environment
$ ymir docker:create staging

# Create a Dockerfile for the "staging" environment and add configuration to ymir.yml file
$ ymir docker:create --configure-project staging

# Email

Commands to manage email.

# email:identity:create

$ ymir email:identity:create [options] [<name>]

Create a new email identity.

Validation required

An email identity will only become active once you validate it. For an email address, AWS will send a validation email to that address. If you're creating an identity for a domain, you must add the validation DNS records. If Ymir manages the domain, it'll create those DNS records for you automatically.

# Arguments

# name (optional)

The name of the email identity.

# Options

# --provider=PROVIDER

The cloud provider where the email identity will be created.

# --region=REGION

The cloud provider region where the email identity will be located.

# Usage

# Create a email identity with a prompt for the identity name
$ ymir email:identity:create

# Create a email identity for the "example.com" domain
$ ymir email:identity:create example.com

# Create a email identity for the "person@example.com" email address
$ ymir email:identity:create person@example.com

# email:identity:delete

$ ymir email:identity:delete [<identity>]

Delete an email identity.

# Arguments

# identity (optional)

The ID or name of the email identity to delete.

# Usage

# Delete an email identity with prompt to choose the identity
$ ymir email:identity:delete

# Delete an email identity for the "example.com" domain
$ ymir email:identity:delete example.com

# email:identity:info

$ ymir email:identity:info [<identity>]

Delete an email identity.

# Arguments

# identity (optional)

The ID or name of the email identity to fetch the information of.

# Usage

# Get information on an email identity with prompt to choose the identity
$ ymir email:identity:info

# Get information on the "example.com" domain email identity
$ ymir email:identity:info example.com

# email:identity:list

$ ymir email:identity:list

List the email identities that belong to the currently active team.

# Usage

# List email identities
$ ymir email:identity:list

# Environment

Commands to manage your project environments.

# environment:create

$ ymir environment:create [<name>]

Create a new environment.

# Arguments

# name (optional)

The name of the environment to create.

# Usage

# Create a new environment with prompt to choose the name
$ ymir environment:create

# Create the "testing" environment
$ ymir environment:create testing

# environment:delete

$ ymir environment:delete [<environment>]

Delete an environment.

# Arguments

# environment (optional)

The name of the environment to delete.

# Usage

# Delete an environment with prompt to choose the environment
$ ymir environment:delete

# Delete the "testing" environment
$ ymir environment:delete testing

# environment:info

$ ymir environment:info [<environment>]

Get information on the environment(s).

# Arguments

# environment (optional)

The name of the environment to get information on.

# Usage

# Get information on all environments found in ymir.yml file
$ ymir environment:info

# Get information on the "testing" environment
$ ymir environment:info testing

# environment:invalidate-cache

$ ymir environment:invalidate-cache [options] [<environment>]

Invalidate the environment's content delivery network cache.

# Arguments

# environment (default: staging)

The name of the environment to invalidate the cache of.

# Options

# --path=PATH (default: *)

The path(s) to invalidate on the content delivery network.

# Usage

# Invalidate the "staging" environment's content delivery network cache
$ ymir environment:invalidate-cache

# Invalidate the "testing" environment's content delivery network cache
$ ymir environment:invalidate-cache testing

# Invalidate everything under "/uploads" on the "staging" environment
$ ymir environment:invalidate-cache --path="/uploads"

# environment:list

$ ymir environment:list

List the project's environments.

# Usage

# List environments
$ ymir environment:list

# environment:metrics

$ ymir environment:metrics [options] [<environment>]

Get cost and usage metrics of the environment.

# Arguments

# environment (default: staging)

The name of the environment to get the metrics of.

# Options

# --period=PERIOD (default: 1d)

The period to gather metrics for. (1m, 5m, 30m, 1h, 8h, 1d, 3d, 7d, 1mo)

# Usage

# Get cost and usage metrics for the "staging" environment over the last 24h
$ ymir environment:metrics

# Get cost and usage metrics for the "staging" environment over the last month
$ ymir environment:metrics --period=1mo

# Get cost and usage metrics for the "production" environment over the last week
$ ymir environment:metrics production --period=7d

# environment:secret:change

Change an environment's secret.

$ ymir environment:secret:change [<environment> [<name> [<value>]]]

Upsert command

The environment:secret:change command behaves like an upsert (opens new window). It'll create a secret if it doesn't exist. Otherwise, it'll replace the existing secret with the given name with the given value.

# Arguments

# environment (default: staging)

The name of the environment where the secret is.

# name (optional)

The name of the secret.

# value (optional)

The value of the secret.

# Usage

# Change a secret on the "staging" environment with a prompt for the name and value of the environment variable
$ ymir environment:secret:change

# Change a secret on the "testing" environment with a prompt for the name and value of the environment variable
$ ymir environment:secret:change testing

# Change the "secret" secret on the "testing" environment with a prompt for the value
$ ymir environment:secret:change testing secret

# Change the value of "secret" secret to "value" on the "testing" environment
$ ymir environment:secret:change testing secret value

# environment:secret:delete

Delete an environment's secret.

$ ymir environment:secret:delete [<environment> [<secret>]]

# Arguments

# environment (default: staging)

The name of the environment where the secret is.

# secret (optional)

The ID or name of the secret.

# Usage

# Delete a secret on the "staging" environment with prompt for the secret
$ ymir environment:secret:delete

# Delete a secret on the "production" environment with prompt for the secret
$ ymir environment:secret:delete production

# Delete a secret on the "production" environment with the name "secret"
$ ymir environment:secret:delete production secret

# Delete a secret on the "production" environment with the ID "42"
$ ymir environment:secret:delete production 42

# environment:secret:list

List an environment's secrets.

$ ymir environment:secret:list [<environment>]

# Arguments

# environment (default: staging)

The name of the environment to list secrets of.

# Usage

# List the secrets used by the "staging" environment
$ ymir environment:secret:list

# List the secrets used by the "production" environment
$ ymir environment:secret:list production

# environment:url

$ ymir environment:url [<environment>]

Get the environment URL and copy it to the clipboard.

# Arguments

# environment (default: staging)

The name of the environment to get the URL of.

# Usage

# Get the URL to the "staging" environment
$ ymir environment:url

# Get the URL to the "testing" environment
$ ymir environment:url testing

# environment:variables:change

Change an environment variable.

$ ymir environment:variables:change [<environment> [<name> [<value>]]]

Upsert command

The environment:variables:change command behaves like an upsert (opens new window). It'll create environment variable if it doesn't exist. Otherwise, it'll replace the existing environment variable with the given name with the given value.

# Arguments

# environment (default: staging)

The name of the environment where the environment variable is.

# name (optional)

The name of the environment variable.

# value (optional)

The value of the environment variable.

# Usage

# Change an environment variable on the "staging" environment with a prompt for the name and value of the environment variable
$ ymir environment:variables:change

# Change an environment variable on the "testing" environment with a prompt for the name and value of the environment variable
$ ymir environment:variables:change testing

# Change the "variable" environment variable on the "testing" environment with a prompt for the value
$ ymir environment:variables:change testing variable

# Change the value of "variable" environment variable to "value" on the "testing" environment
$ ymir environment:variables:change testing variable value

# environment:variables:download

Download an environment's environment variables into a .env environment file.

$ ymir environment:variables:download [<environment>]

# Arguments

# environment (default: staging)

The name of the environment to download environment variables from.

# Usage

# Download environment variables from the "staging" environment to the ".env.staging" file
$ ymir environment:variables:download

# Download environment variables from the "testing" environment to the ".env.testing" file
$ ymir environment:variables:download testing

# environment:variables:upload

Upload the environment variables in a .env environment file to an environment.

$ ymir environment:variables:upload [<environment>]

Replaces all environment variables

The environment:variables:upload command will replace all environment variables in an environment. If you remove environment variables from the .env file, they'll be deleted from the environment.

# Arguments

# environment (default: staging)

The name of the environment to upload environment variables to.

# Usage

# Upload the environment variables in the ".env.staging" file to the "staging" environment
$ ymir environment:variables:upload

# Upload the environment variables in the ".env.testing" file to the "testing" environment
$ ymir environment:variables:upload testing

# Import

Commands to import data into Ymir.

# import:uploads

$ ymir import:uploads [options] <path>

Import files to the environment uploads directory.

# Arguments

# path

The path to the files to import.

# Options

# --environment=ENVIRONMENT (default: staging)

The environment to upload files to.

# --size=SIZE (default: 20)

The number of files to process at a time.

# Usage

# Import files to "staging" environment using a file path
$ ymir import:uploads /path/to/uploads

# Import files to "production" environment using a SFTP URL
$ ymir import:uploads --environment=production sftp://myserver.com/path/to/uploads

# Network

Commands to manage team networks.

# network:bastion:add

$ ymir network:bastion:add [<network>]

Add a bastion host to the network.

# Arguments

# network (optional)

The ID or name of the network to add a bastion host to.

# Usage

# Add a bastion host to a network with prompt for the network
$ ymir network:bastion:add

# Add a bastion host to the "my-network" network
$ ymir network:bastion:add my-network

# network:bastion:remove

$ ymir network:bastion:remove [<network>]

Remove bastion host from a network.

# Arguments

# network (optional)

The ID or name of the network to add a bastion host to.

# Usage

# Remove a bastion host from a network with prompt for the network
$ ymir network:bastion:remove

# Remove the bastion host from the "my-network" network
$ ymir network:bastion:remove my-network

# network:create

$ ymir network:create [options] [<name>]

Create a new network.

# Arguments

# name (optional)

The name of the network.

# Options

# --provider=PROVIDER

The cloud provider region where the network will created.

# --region=REGION

The cloud provider region where the network will be located.

# Usage

# Create a network with a prompt for the network name
$ ymir network:create

# Create a network with the name "my-network"
$ ymir network:create my-network

# network:delete

$ ymir network:delete [<network>]

Delete a network.

# Arguments

# network (optional)

The ID or name of the network to delete.

# Usage

# Delete a network with a prompt for the network
$ ymir network:delete

# Delete the network with the name "my-network"
$ ymir network:delete my-network

# Delete network with the ID "42"
$ ymir network:delete 42

# network:list

$ ymir network:list

List the networks that belong to the currently active team.

# Usage

# List all networks
$ ymir network:list
---- ------ -------------- ----------- ----------- -------------
 Id   Name   Provider       Region      Status      NAT Gateway
---- ------ -------------- ----------- ----------- -------------
 42   ymir   Personal AWS   us-east-1   available   no
---- ------ -------------- ----------- ----------- -------------

# network:nat:add

$ ymir network:nat:add [<network>]

Add a NAT gateway to a network's private subnet.

# Arguments

# network (optional)

The ID or name of the network to add a NAT gateway to.

# Usage

# Add a NAT gateway to a network with prompt for the network
$ ymir network:nat:add

# Add a NAT gateway to the "my-network" network
$ ymir network:nat:addmy-network

# network:nat:remove

$ ymir network:nat:remove [<network>]

Remove a NAT gateway from a network's private subnet.

# Arguments

# network (optional)

The ID or name of the network to remove the NAT gateway from.

# Usage

# Remove a NAT gateway from a network with prompt for the network
$ ymir network:nat:remove

# Remove the NAT gateway from the "my-network" network
$ ymir network:nat:remove my-network

# PHP

Commands to get information about PHP.

# php:info

$ ymir php:info [<environment>]

Get information about PHP on the cloud provider.

# Arguments

# environment (default: staging)

The name of the environment to get PHP information about.

# Usage

# Get PHP information about the "staging" environment
$ ymir php:info

# Get PHP information about the "production" environment
$ ymir php:info production

# php:version

$ ymir php:version [<environment>]

Get the PHP version information on the cloud provider.

# Arguments

# environment (default: staging)

The name of the environment to get the PHP version of.

# Usage

# Get the PHP version on the "staging" environment
$ ymir php:version

# Get the PHP version on the "production" environment
$ ymir php:version production

# Project

Commands to manage a team's projects.

Aliases

All project commands have an alias without their project: prefix.

# project:build [build]

$ ymir project:build [<environment>]
$ ymir build [<environment>]

Build the project for deployment.

# Arguments

# environment (default: staging)

The name of the environment to build.

# Usage

# Build project for deployment to the "staging" environment
$ ymir build

# Build project for deployment to the "production" environment
$ ymir build production

# project:configure [configure]

$ ymir project:configure [<environment>]
$ ymir configure [<environment>]

Configure the project by scanning your plugins and themes.

WP-CLI required

The project:configure command requires you to have WP-CLI (opens new window) installed and globally available. This is necessary for the command to scan your project's plugins and themes. You can refer to the WP-CLI installation instructions (opens new window) to see how to install WP-CLI and make it globally available.

# Arguments

# environment (optional)

The name of the environment to configure.

# Usage

# Scan the project's plugins and themes and configure all environments
$ ymir configure

# Scan the project's plugins and themes and configure the "production" environment
$ ymir configure production

# project:delete [delete]

$ ymir project:delete [<project>]
$ ymir delete [<project>]

Delete a project.

# Arguments

# project

The ID or name of the project to delete.

Only usable outside project directories

The project argument only works when calling the project:delete command outside of a Ymir project directory.

# Usage

[Inside a Ymir project directory]
# Delete the project
$ ymir delete

[Outside a Ymir project directory]
# Delete a project with a prompt to select the project
$ ymir delete

# Delete a project with the name "ymir-project"
$ ymir delete ymir-project

# Delete a project with the ID 42
$ ymir delete 42

# project:deploy [deploy]

$ ymir project:deploy [<environment>]
$ ymir deploy [<environment>]

Deploy project to an environment.

# Arguments

# environment (default: staging)

The name of the environment to deploy to.

# Usage

# Deploy project to the "staging" environment
$ ymir deploy

# Deploy project to the "production" environment
$ ymir deploy production

# project:info [info]

$ ymir project:info
$ ymir info

Get information on the project.

# Usage

# Get information on the project
$ ymir info

# project:init [init]

$ ymir project:init
$ ymir init

Initialize a new project.

# Usage

# Initialize a new project
$ ymir init

# project:redeploy [redeploy]

$ ymir project:redeploy [<environment>]
$ ymir redeploy [<environment>]

Redeploy project to an environment.

# Arguments

# environment (default: staging)

The name of the environment to redeploy.

# Usage

# Redeploy the "staging" environment
$ ymir redeploy

# Redeploy the "production" environment
$ ymir redeploy production

# project:rollback [rollback]

$ ymir project:rollback [options] [<environment>]
$ ymir rollback [options] [<environment>]

Rollback environment to a previous deployment.

# Arguments

# environment (default: staging)

The name of the environment to rollback.

# Options

# --select

Select the deployment to rollback to.

# Usage

# Rollback the "staging" environment to the last successful deployment
$ ymir rollback

# Rollback the "staging" environment with a prompt to select the deployment to rollback to
$ ymir rollback --select

# Rollback the "production" environment to the last successful deployment
$ ymir rollback production

# project:validate [validate]

$ ymir project:validate [<environments>]
$ ymir validate [<environments>]

Validates the project's ymir.yml file.

# Arguments

# environments

The names of the environments to validate.

# Usage

# Validates the project's ymir.yml file
$ ymir validate

# Provider

Commands to manage cloud providers.

# provider:connect

$ ymir provider:connect

Connect a cloud provider to the currently active team.

Imports AWS credentials file

The provider:connect command can also import AWS credentials from the AWS credentials file found in ~/.aws/credentials.

# Usage

# Connect a cloud provider
$ ymir provider:connect

# provider:delete

$ ymir provider:delete <provider>

Delete a cloud provider.

# Arguments

# provider

The ID of the cloud provider to delete.

# Usage

# Delete cloud provider with ID 42
$ ymir provider:delete 42

# provider:list

$ ymir provider:list

List the cloud provider accounts connected to the currently active team.

# Usage

# List all cloud providers
$ ymir provider:list
 ---- ------
  Id   Name
 ---- ------
  42   ymir
 ---- ------

# provider:update

$ ymir provider:update <provider>

Update a cloud provider.

Imports AWS credentials file

The provider:update command can also import AWS credentials from the AWS credentials file found in ~/.aws/credentials.

# Arguments

# provider

The ID of the cloud provider to update.

# Usage

# Update cloud provider with ID 42
$ ymir provider:update 42

# Team

Commands to manage teams.

# team:create

$ ymir team:create [<name>]

Create a new team.

# Arguments

# name

The name of the team.

# Usage

# Create a new team with a prompt for the name
$ ymir team:create

# Create a new team with the name "ymir"
$ ymir team:create ymir

# team:current

$ ymir team:current

Get the details on your currently active team.

# Usage

# Get the details on your currently active team
$ ymir team:current
Your currently active team is:
 ------- ----------
  Id      42
  Name    Personal
  Owner   You
 ------- ----------

# team:list

$ ymir team:list

List all the teams that you're on.

# Usage

# List all the teams that you're on
$ ymir team:list
You are on the following teams:
 ---- ---------- -------
  Id   Name       Owner
 ---- ---------- -------
  42   Personal   You
 ---- ---------- -------

# team:select

$ ymir team:select [<team>]

Select a new currently active team.

# Arguments

# team

The ID of the team to make your currently active team.

# Usage

# Select a new currently active team with prompt for the team
$ ymir team:select

# Select team with ID 42 as the new currently active team
$ ymir team:select 42