Commands¶
$ runway --help
Usage: runway [OPTIONS] COMMAND [ARGS]...
Runway CLI.
Full documentation available at https://runway.readthedocs.io/
Options:
--version Show the version and exit.
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
...
deploy¶
$ runway deploy --help
Usage: runway deploy [OPTIONS]
Deploy infrastructure as code.
Process
-------
1. Determines the deploy environment.
- "-e, --deploy-environment" option
- "DEPLOY_ENVIRONMENT" environment variable
- git branch name
- strips "ENV-" prefix, master is converted to common
- ignored if "ignore_git_branch: true"
- name of the current working directory
2. Selects deployments & modules to deploy.
- (default) prompts
- (--module) module name matches pattern
- (--tag) module contains all tags
- (non-interactive) all
3. Deploys selected deployments/modules in the order defined.
Changeset Execution (CI/CD)
---------------------------
Execute pre-created changesets instead of normal deploy:
runway deploy --execute-changesets changesets.json
The changesets.json file is created by: runway plan --create-changeset
--output json > changesets.json
Options:
--ci Run in non-interactive mode.
--debug Supply once to display Runway debug logs.
Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
Manually specify the name of the deploy
environment.
--execute-changesets <file> Execute changesets from a JSON file created
by 'runway plan --create-changeset'. Skips
normal stack update logic and executes the
pre-created changesets directly.
--module <module-name>... Select modules by name. Supports glob
patterns (e.g., 'network-*'). This option
can be specified more than once to select
multiple modules. (e.g. "--module network-
vpc --module app-*.cfn").
--no-color Disable color in Runway's logs.
--stack <stack-name>... Select CFNgin stacks by name within the
targeted module(s). This option can be
specified more than once to select multiple
stacks. Only applies to
CloudFormation/CFNgin modules. (e.g. "--
stack vpc-stack --stack security-groups").
--tag <tag>... Select modules by tag or tags. This option
can be specified more than once to build a
list of tags that are treated as "AND".
(e.g. "--tag <tag1> --tag <tag2>" would
select all modules with BOTH tags).
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway deploy
$ runway deploy --ci --deploy-environment example
$ runway deploy --tag tag1 --tag tag2
destroy¶
$ runway destroy --help
Usage: runway destroy [OPTIONS]
Destroy infrastructure as code.
Process
-------
1. Determines the deploy environment.
- "-e, --deploy-environment" option
- "DEPLOY_ENVIRONMENT" environment variable
- git branch name
- strips "ENV-" prefix, master is converted to common
- ignored if "ignore_git_branch: true"
- name of the current working directory
2. Selects deployments & modules to deploy.
- (default) prompts
- (--module) module name matches pattern
- (--tag) module contains all tags
- (non-interactive) all
3. Destroys selected deployments/modules in reverse the order defined.
Options:
--ci Run in non-interactive mode.
--debug Supply once to display Runway debug logs.
Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
Manually specify the name of the deploy
environment.
--module <module-name>... Select modules by name. Supports glob
patterns (e.g., 'network-*'). This option
can be specified more than once to select
multiple modules. (e.g. "--module network-
vpc --module app-*.cfn").
--no-color Disable color in Runway's logs.
--stack <stack-name>... Select CFNgin stacks by name within the
targeted module(s). This option can be
specified more than once to select multiple
stacks. Only applies to
CloudFormation/CFNgin modules. (e.g. "--
stack vpc-stack --stack security-groups").
--tag <tag>... Select modules by tag or tags. This option
can be specified more than once to build a
list of tags that are treated as "AND".
(e.g. "--tag <tag1> --tag <tag2>" would
select all modules with BOTH tags).
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway destroy
$ runway destroy --ci --deploy-environment example
$ runway destroy --tag tag1 --tag tag2
dismantle¶
$ runway dismantle --help
Usage: runway dismantle [OPTIONS]
Alias of "runway destroy".
For more information, refer to the output of "runway destroy --help".
Options:
--ci Run in non-interactive mode.
--debug Supply once to display Runway debug logs.
Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
Manually specify the name of the deploy
environment.
--no-color Disable color in Runway's logs.
--tag <tag>... Select modules by tag or tags. This option
can be specified more than once to build a
list of tags that are treated as "AND".
(e.g. "--tag <tag1> --tag <tag2>" would
select all modules with BOTH tags).
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway dismantle
$ runway dismantle --ci --deploy-environment example
$ runway dismantle --tag tag1 --tag tag2
docs¶
$ runway docs --help
Usage: runway docs [OPTIONS]
Open the Runway documentation web site using the default web browser.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway docs
envvars¶
$ runway envvars --help
Usage: runway envvars [OPTIONS]
Output "env_vars" defined in the Runway config file.
OS environment variables can be set in the Runway config file for different
Runway environments. This command allows access to these values for use
outside of Runway.
NOTE: Only outputs "env_vars" defined in deployments, not modules.
Options:
--debug Supply once to display Runway debug logs.
Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
Manually specify the name of the deploy
environment.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway envvars
$ eval "$(runway envvars)"
$ runway envvars --deploy-environment example
gen-sample¶
$ runway gen-sample --help
Usage: runway gen-sample [OPTIONS] COMMAND [ARGS]...
Generate a sample Runway module module/project.
The sample is created in the current directory. If a directory already
exists with the name Runway tries to use, the sample will not be created.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Commands:
cdk-csharp cdk + c# (sampleapp.cdk)
cdk-py cdk + py (sampleapp.cdk)
cdk-tsc cdk + tsc (sampleapp.cdk)
cfn cfngin + cfn (sampleapp.cfn)
cfngin cfngin + troposphere (sampleapp.cfn)
sls-py sls + python (sampleapp.sls)
sls-tsc sls + tsc (sampleapp.sls)
static-angular angular static site (static-angular)
static-react react static site (static-react)
tf tf (sampleapp.tf)
Example
$ runway gen-sample cfngin
$ runway gen-sample static-react
init¶
$ runway init --help
Usage: runway init [OPTIONS]
Run initialization/bootstrap steps.
Process
-------
1. Determines the deploy environment.
- "-e, --deploy-environment" option
- "DEPLOY_ENVIRONMENT" environment variable
- git branch name
- strips "ENV-" prefix, master is converted to common
- ignored if "ignore_git_branch: true"
- name of the current working directory
2. Selects deployments & modules to deploy.
- (default) prompts
- (--module) module name matches pattern
- (--tag) module contains all tags
- (non-interactive) all
3. Initializes/bootstraps selected deployments/modules in the order defined.
(e.g. "cdk bootstrap", "terraform init")
Steps By Module Type
--------------------
- AWS CDK: Runs "cdk bootstrap".
- CFNgin: Creates the "cfngin_bucket" if needed.
- Terraform: Runs "terraform init", changes the workspace if needed, runs
"terraform init" again if the workspace was changed, and finally
downloads/updates Terraform modules.
Options:
--ci Run in non-interactive mode.
--debug Supply once to display Runway debug logs.
Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
Manually specify the name of the deploy
environment.
--module <module-name>... Select modules by name. Supports glob
patterns (e.g., 'network-*'). This option
can be specified more than once to select
multiple modules. (e.g. "--module network-
vpc --module app-*.cfn").
--no-color Disable color in Runway's logs.
--stack <stack-name>... Select CFNgin stacks by name within the
targeted module(s). This option can be
specified more than once to select multiple
stacks. Only applies to
CloudFormation/CFNgin modules. (e.g. "--
stack vpc-stack --stack security-groups").
--tag <tag>... Select modules by tag or tags. This option
can be specified more than once to build a
list of tags that are treated as "AND".
(e.g. "--tag <tag1> --tag <tag2>" would
select all modules with BOTH tags).
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway init
$ runway init --ci --deploy-environment example
$ runway init --tag tag1 --tag tag2
new¶
$ runway new --help
Usage: runway new [OPTIONS]
Create an example runway.yml file in the correct directory.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway new
$ runway new --debug
plan¶
Note
Currently only supported for AWS Cloud Development Kit (CDK), CloudFormation & Troposphere, and Terraform.
$ runway new --help
Usage: runway new [OPTIONS]
Create an example runway.yml file in the correct directory.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway plan
$ runway plan --ci --deploy-environment example
$ runway plan --tag tag1 --tag tag2
run-python¶
$ runway run-python --help
Usage: runway run-python [OPTIONS] <filename>
Execute a python script using a bundled copy of python.
This command can execute actions using python without requiring python to be
installed on a system. This is only applicable when installing a binary
release of Runway (not installed from PyPi). When installed from PyPI, the
current interpreter is used.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway run-python my_script.py
schema cfngin¶
$ runway schema cfngin --help
Usage: runway schema cfngin [OPTIONS]
Output JSON schema for CFNgin configuration files.
The schema that is output can be used to validate configuration files. It
can also be added to text editors to provide autocompletion, tool tips, and
suggestions within configuration files.
Options:
--debug Supply once to display Runway debug logs. Supply
twice to display all debug logs.
--indent <int> Number of spaces to use per indentation level when
output JSON. [default: 4]
--no-color Disable color in Runway's logs.
-o, --output <file-name> If provided, schema will be saved to a file
instead of being output to stdout.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway schema cfngin --output cfngin-schema.json
schema runway¶
$ runway schema runway --help
Usage: runway schema runway [OPTIONS]
Output JSON schema Runway configuration files.
The schema that is output can be used to validate configuration files. It
can also be added to text editors to provide autocompletion, tool tips, and
suggestions within configuration files.
Options:
--debug Supply once to display Runway debug logs. Supply
twice to display all debug logs.
--indent <int> Number of spaces to use per indentation level when
output JSON. [default: 4]
--no-color Disable color in Runway's logs.
-o, --output <file-name> If provided, schema will be saved to a file
instead of being output to stdout.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway schema runway --output runway-schema.json
takeoff¶
$ runway takeoff --help
Usage: runway takeoff [OPTIONS]
Alias of "runway deploy".
For more information, refer to the output of "runway deploy --help".
Options:
--ci Run in non-interactive mode.
--debug Supply once to display Runway debug logs.
Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
Manually specify the name of the deploy
environment.
--no-color Disable color in Runway's logs.
--tag <tag>... Select modules by tag or tags. This option
can be specified more than once to build a
list of tags that are treated as "AND".
(e.g. "--tag <tag1> --tag <tag2>" would
select all modules with BOTH tags).
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway takeoff
$ runway takeoff --ci --deploy-environment example
$ runway takeoff --tag tag1 --tag tag2
taxi¶
$ runway taxi --help
Usage: runway taxi [OPTIONS]
Alias of "runway plan".
For more information, refer to the output of "runway plan --help".
Options:
--ci Run in non-interactive mode.
--debug Supply once to display Runway debug logs.
Supply twice to display all debug logs.
-e, --deploy-environment <env-name>
Manually specify the name of the deploy
environment.
--no-color Disable color in Runway's logs.
--tag <tag>... Select modules by tag or tags. This option
can be specified more than once to build a
list of tags that are treated as "AND".
(e.g. "--tag <tag1> --tag <tag2>" would
select all modules with BOTH tags).
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway taxi
$ runway taxi --ci --deploy-environment example
$ runway taxi --tag tag1 --tag tag2
tfenv install¶
$ runway tfenv install --help
Usage: runway tfenv install [OPTIONS] [<version>]
Install the specified <version> of Terraform (e.g. 0.12.0).
If no version is specified, Runway will attempt to find and read a
".terraform-version" file in the current directory. If this file doesn't
exist, nothing will be installed.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway tfenv install 0.12.0
tfenv list¶
$ runway tfenv list --help
Usage: runway tfenv list [OPTIONS]
List the versions of Terraform that have been installed by Runway and/or
tfenv.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway tfenv list
tfenv run¶
$ runway tfenv run --help
Usage: runway tfenv run [OPTIONS] <args>
Run a Terraform command.
Uses the version of Terraform specified in the ".terraform-version" file in
the current directory.
IMPORTANT: When using options shared with Runway "--" must be placed before
the Terraform command.
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway tfenv run --version
$ runway tfenv run -- --help
tfenv uninstall¶
$ runway tfenv uninstall --help
Usage: runway tfenv uninstall [OPTIONS] [<version>]
Uninstall the specified <version> of Terraform (e.g. 0.12.0) or all
installed versions.
If no version is specified, Runway will attempt to find and read a
".terraform-version" file in the current directory.
Options:
--all Uninstall all versions of Terraform.
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway tfenv uninstall 1.0.0
$ runway tfenv uninstall --all
whichenv¶
$ runway whichenv --help
Usage: runway whichenv [OPTIONS]
Print the current deploy environment name to stdout.
When run, the deploy environment will be determined from one of the
following (in order of precedence):
- "DEPLOY_ENVIRONMENT" environment variable
- git branch name (strips "ENV-" prefix, master => common)
- current working directory
Options:
--debug Supply once to display Runway debug logs. Supply twice to
display all debug logs.
--no-color Disable color in Runway's logs.
--verbose Display Runway verbose logs.
-h, --help Show this message and exit.
Example
$ runway whichenv