Skip to main content

CLI Reference

In this document, you can find the full list of Raftt CLI commands and usage information.

Help information is also available by running raftt --help, or raftt -h.

raftt

Manage your development environment with ease

Usage:
raftt
raftt [command]

Available Commands:
cluster Manage global cluster properties
cp Copy files to and from a service
data Reset or persist the data of a service
diagnostics Send local diagnostics to Raftt
down Put the environment to sleep
expose Share access to one or more services
init Initialize Raftt for the current git repository
list List connected environments
logs Get the logs of a workload or hooks
port Control port forwarding to remote environment
rebuild Rebuild and deploy one or more services
restart Restart a service
setup Create the first raftt.yml file
sh Connect or run a command on a service
status Show the status of the current Raftt environment
stop Stop one or more services
sync Synchronize local auxiliary repositories
up Spawn or reconnect to a Raftt environment
version Show the Raftt version information

Use "raftt [command] --help" for more information about a command.

Command List

raftt cluster

Manage global cluster properties (secrets, ...)

Usage:
raftt cluster [command]

Available Commands:
secrets Perform actions on cluster secrets

Use "raftt cluster [command] --help" for more information about a command.

raftt cluster secrets

Set, delete or list global cluster secrets

Usage:
raftt cluster secrets [command]

Available Commands:
delete Delete a global cluster secret
list List global cluster secrets
set Set a global cluster secret

Use "raftt cluster secrets [command] --help" for more information about a command.

raftt cluster secrets delete

Delete a global cluster secret

Usage:
raftt cluster secrets delete SECRET_NAME

Flags:
--force force deletion

raftt cluster secrets list

List all secrets defined in the cluster

Usage:
raftt cluster secrets list

raftt cluster secrets set

Set a global cluster secret

Usage:
raftt cluster secrets set SECRET_NAME

Flags:
-f, --file string file from which to read secret

raftt cp

Copy files to and from a service using the SCP protocol. Omitting the service name means referring to the local machine.

Usage:
raftt cp [SERVICE:]source ... [SERVICE:]target

Flags:
-r, --recursive Copy directories recursively

raftt data

Reset or persist the state of one or more databases to / from git or the cloud

Usage:
raftt data [command]

Available Commands:
dump Dump the state of a database to a file in the git repository
load Load a previously saved DB state according to a tag
save Commit the state of one or more databases to the cloud according to a tag
seed Seeds the state of one or more databases from git or the cloud

Use "raftt data [command] --help" for more information about a command.

raftt data dump

Dump the state of one or more databases to a file in the git repository

Usage:
raftt data dump CONTAINER_NAME [...]

raftt data load

Load a previously saved DB state according to a tag of one or more databases from the cloud

Usage:
raftt data load CONTAINER_NAME -t TAG

Flags:
-s, --shared Load the tag from the shared tag pool
-t, --tag string Reset to a specific tag, applies to all services being seeded

raftt data save

Commit the state of one or more databases to the cloud according to a supplied tag

Usage:
raftt data save CONTAINER_NAME -t TAG

Flags:
-s, --shared Save this tag to the shared tag pool to allow others to access it
-t, --tag string Commit to a specific tag, applies to all services being seeded

raftt data seed

Seeds the state of one or more databases according to git or the cloud

Usage:
raftt data seed CONTAINER_NAME [...]

raftt diagnostics

Send local diagnostics to Raftt

Usage:
raftt diagnostics

Flags:
-m, --message string Add a message to explain to Raftt what happened

raftt down

Put the environment to sleep. If session ID is not supplied, use the session for the current repository.

Usage:
raftt down [session ID]

Flags:
-a, --all all envs
-d, --delete delete env instead of putting to sleep
-f, --force skip confirmation prompt
-w, --wait wait for logs

raftt expose

Share access to one or more services through a publicly accessible URL

Usage:
raftt expose SERVICE_NAME [...]

Flags:
-d, --delete delete exposed service
--password-fd string file to read password for authentication
-u, --user string username for authentication

raftt init

Initialize Raftt for the current git repository. Run once per git repository.

Usage:
raftt init

Flags:
-F, --force force overwrite current user token

raftt list

List connected environments

Usage:
raftt list

raftt logs

Get the logs of a workload or hooks

Usage:
raftt logs WORKLOAD

Flags:
-f, --follow Follow log output
--hooks Show the logs for the event hooking mechanism. Can be used with or without specifying a workload.
--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
-n, --tail string Number of lines to show from the end of the logs (default "all")
-t, --timestamps Show timestamps
--until string Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)

raftt port

Control port forwarding to remote environment

Usage:
raftt port [command]

Available Commands:
map Forward local port(s) to remote env
unmap Unmap local ports from remote env

Use "raftt port [command] --help" for more information about a command.

raftt port map

Map local port(s) to remote env

Usage:
raftt port map [-r] SERVICE [LOCAL_PORT:]REMOTE_PORT

Flags:
-r, --reverse Forward from remote service to local machine instead (reverse tunnel)

raftt port unmap

Unmap local ports from remote env

Usage:
raftt port unmap LOCAL_PORT

Flags:
-r, --reverse unmap reverse tunnel

raftt rebuild

Rebuild and deploy one or more services, if no services specified the entire environment is rebuilt and deployed.

Usage:
raftt rebuild [SERVICES...]

Flags:
--compose-profile stringArray Stating which docker-compose profile to use. Use multiple times to start multiple profiles. Not relevant when using envDefinition in raftt.yml.
--config-args string A string that is passed to the env config file. Only relevant when using envDefinition in raftt.yml.
--config-args-file string Path to file to use as the input string passed to the env config file. Only relevant when using envDefinition in raftt.yml.
-r, --reseed re-seed DBs
--setup Run initial setup before creating the environment

raftt restart

Restart the main process of a service. NOTE: The container itself isn't restarted and any changes made to it will remain.

Usage:
raftt restart SERVICE [OPTIONS] -- [ALTERNATIVE_ARGUMENTS]

Flags:
-e, --env stringArray Specify environment variables to set for the process
--env-file string Specify a file to read environment variables from
-w, --workdir string Specify workdir to set for the process

raftt setup

Help with the setup of the Raftt environment

Usage:
raftt setup

Flags:
-d, --dev-container-folder string Folder under the git root to put the dev-container dockerfile at (default "dev")

raftt sh

Connect or run a command on a service using the SSH protocol

Usage:
raftt sh SERVICE [flags] [-- COMMAND]

raftt status

Show the status of the current Raftt environment. If one or more services are stated, only show their status.

Usage:
raftt status [SERVICES ...]

Flags:
-d, --debug show debug information
-w, --wait wait for environment to spawn

raftt stop

Stop the main process and its children of one or more services

Usage:
raftt stop SERVICE [SERVICE...]

raftt sync

Synchronize local auxiliary repositories to an existing raftt environment

Usage:
raftt sync

raftt up

Spawn a new Raftt environment or reconnect to an existing one

Usage:
raftt up

Flags:
--compose-profile stringArray Stating which docker-compose profile to use. Use multiple times to start multiple profiles. Not relevant when using envDefinition in raftt.yml.
--config-args string A string that is passed to the env config file. Only relevant when using envDefinition in raftt.yml.
--config-args-file string Path to file to use as the input string passed to the env config file. Only relevant when using envDefinition in raftt.yml.
--setup Run initial setup before creating the environment

raftt version

Shows the version information of the Raftt executable

Usage:
raftt version

Flags:
-s, --silent Show version only