CodeRed CLI Manual#
The cr
tool has a comprehensive help available by typing cr --help
from the command line. Help for each specific command is accessed by running cr <command> --help
. This information has been copied here for your convenience.
cr [options] command
Options#
- -v, --version
Print the program version and exit.
Global Options#
- --debug
Output verbose debug logging.
Commands#
- command
Possible choices: check, deploy, download, list, login, logs, restart, sftp, ssh, upload
Sub-commands#
check#
Check the local project for configuration errors.
cr check [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.- --path
Path to folder containing the source code for the website. For Django & Wagtail, this is the folder with
manage.py
. For WordPress, this is the folder withwp-config.php
. Defaults to the current directory.- --skip-predeploy
Skip common pre-deployment checks. Only checks for local configuration errors.
Global Options#
- --debug
Output verbose debug logging.
deploy#
Upload the project to CodeRed Cloud and initiate a deployment.
cr deploy [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.- --path
Path to folder containing the source code for the website. For Django & Wagtail, this is the folder with
manage.py
. For WordPress, this is the folder withwp-config.php
. Defaults to the current directory.- --no-upload
Do not upload a new website version. Re-deploys the website version already on CodeRed Cloud.
- --skip-predeploy
Skip common pre-deployment checks. Only checks for local configuration errors.
Global Options#
- --debug
Output verbose debug logging.
download#
Download a file or folder from CodeRed Cloud. By default this will also download all media files, which may take a long time.
cr download [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.- --path
Directory in which to download the files. Defaults to the current directory.
- --remote
Remote directory or file on the CodeRed Cloud server to recursively download. Defaults to
/www
which is the main directory.- --exclude
Space separated list of directories (relative to –remote) to exclude from download. Defaults to
--exclude cache static wp-content/cache
.
Global Options#
- --debug
Output verbose debug logging.
list#
List the websites on your account. If you have multiple clients, you’ll need to specify a --token
which has access to each client.
cr list [options]
Options#
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.
Global Options#
- --debug
Output verbose debug logging.
login#
Interactively set up your first API key.
cr login [options]
Global Options#
- --debug
Output verbose debug logging.
logs#
Show the latest deployment logs.
cr logs [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.
Global Options#
- --debug
Output verbose debug logging.
restart#
Restart the currently running website on CodeRed Cloud. No new software is installed or updated.
cr restart [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.
Global Options#
- --debug
Output verbose debug logging.
sftp#
Show SFTP credentials and reset system password.
cr sftp [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.
Global Options#
- --debug
Output verbose debug logging.
ssh#
Show SSH credentials and reset system password.
cr ssh [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.
Global Options#
- --debug
Output verbose debug logging.
upload#
Upload a file or folder to CodeRed Cloud.
cr upload [options] webapp
Required#
- webapp
The handle of the webapp.
Options#
- --env
Possible choices: prod, staging
The environment to act upon. Default is prod.
- --token
API key which has access to webapp. If not provided, uses the
CR_TOKEN
environment variable.- --path
Path to a file or folder to upload. If this is a file, it will be uploaded into –remote. If this is a folder, its contents will be recursively uploaded into –remote. To upload your full website, this should be the folder containing
manage.py
orwp-config.php
. Defaults to the current directory.- --remote
Remote directory on the CodeRed Cloud server in which to upload the file or folder. Defaults to
/www
which is the main directory.- --skip-predeploy
Skip common pre-deployment checks. Only checks for local configuration errors.
Global Options#
- --debug
Output verbose debug logging.