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
config Manage and debug raftt configuration
cp Copy files to and from a workload
data Reset or persist the data of a workload
diagnostics Send local diagnostics to Raftt
down Delete environment
expose Share access to one or more workloads
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 workloads
restart Restart a workload
setup Create the first raftt.yml file
sh Connect or run a command on a workload
share Generate access token for environment sharing
status Show the status of the current Raftt environment
stop Stop one or more workloads
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, envs, ...)
Usage:
raftt cluster [command]
Available Commands:
envs Lists all the environments in the cluster
secrets Perform actions on cluster secrets
Use "raftt cluster [command] --help" for more information about a command.
raftt cluster envs
Lists all the environments in the cluster. Only available for users with the required permissions.
Usage:
raftt cluster envs
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 config
Manage and debug raftt configuration
Usage:
raftt config [command]
Available Commands:
debug Debug raftt starlark configuration
Use "raftt config [command] --help" for more information about a command.
raftt config debug
Debug raftt starlark configuration
Usage:
raftt config debug
Flags:
--to-be-deployed print the list of resources to be deployed
raftt cp
Copy files to and from a workloadl. Omitting the workload name means referring to the local machine.
Usage:
raftt cp [WORKLOAD:]source ... [WORKLOAD:]target
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
Delete environment that is currently connected or exists for this branch.
Usage:
raftt down
Flags:
-a, --all all envs
-d, --delete delete env (no longer required, as this is the default behavior)
-f, --force skip confirmation prompt
--hibernate hibernate env instead of deleting
-w, --wait wait for logs
raftt expose
Share access to one or more workloads through a publicly accessible URL
Usage:
raftt expose WORKLOAD_NAME [...]
Flags:
-d, --delete stop exposing a workload
--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 workloads. If no workloads specified, the entire environment is rebuilt and deployed.
Usage:
raftt rebuild [SERVICES...]
Flags:
--add-remove Only start resources added to the env definition and delete resources that were removed
--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 workload. 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 workload using the SSH protocol
Usage:
raftt sh SERVICE [flags] [-- COMMAND]
Flags:
--share-token string Connect to another env using a share token
raftt share
Generate access token for environment sharing
Usage:
raftt share
raftt status
Show the status of the current Raftt environment. If one or more workloads 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 workloads
Usage:
raftt stop SERVICE [WORKLOAD...]
raftt sync
Synchronize local auxiliary repositories to an existing raftt environment
Usage:
raftt sync
Flags:
-d, --unsync unsync currently synced repository
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