Search…
CLI Reference
Below is a list of Velocity CLI commands and usage information. You can also see this text in your terminal using veloctl --help or veloctl -h.

veloctl

Shows the currently installed version of veloctl
1
veloctl [flags]
Copied!
Options
1
-v, --version version for veloctl
Copied!

veloctl auth

Manages veloctl authentication state

veloctl auth login

Log in to Velocity
1
veloctl auth login
Copied!

veloctl auth logout

Log out and unlinks this device
1
veloctl auth logout
Copied!

veloctl completion

Setups shell completions
1
veloctl completion <bash|zsh|fish|powershell>
Copied!
Examples
1
Bash:
2
3
$ source <(veloctl completion bash)
4
5
# To load completions for each session, execute once:
6
# Linux:
7
$ veloctl completion bash > /etc/bash_completion.d/veloctl
8
# macOS:
9
$ veloctl completion bash > /usr/local/etc/bash_completion.d/veloctl
10
11
Zsh:
12
13
# If shell completion is not already enabled in your environment,
14
# you will need to enable it. You can execute the following once:
15
16
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
17
18
# To load completions for each session, execute once:
19
$ veloctl completion zsh > "${fpath[1]}/_veloctl"
20
21
# You will need to start a new shell for this setup to take effect.
22
23
fish:
24
25
$ veloctl completion fish | source
26
27
# To load completions for each session, execute once:
28
$ veloctl completion fish > ~/.config/fish/completions/veloctl.fish
29
30
PowerShell:
31
32
PS> veloctl completion powershell | Out-String | Invoke-Expression
33
34
# To load completions for every new session, run:
35
PS> veloctl completion powershell > veloctl.ps1
36
# and source this file from your PowerShell profile.
Copied!

veloctl env

Creates, shows, and manages environments

veloctl env create

Creates a new environment
1
veloctl env create [environment-name] [flags]
Copied!
Examples
1
# Create an environment for developing a specific service:
2
$ veloctl env create --service worker
3
4
# Create an environment for developing a specific service in a specific version:
5
$ veloctl env create --service worker:latest
6
7
# Create an environment for developing more than one service:
8
$ veloctl env create --service worker --service backend
9
10
# Create an environment with a specific name for developing a service:
11
$ veloctl env create --service website johns-feature
12
13
# Create an environment specified in a config file (The filename can be '-' for standard input):
14
$ veloctl env create --file config.yml
15
16
# Create an ad-hoc environment specified in a config file (The filename can be '-' for standard input):
17
# Override the entire blueprint definition with the specified file definitions
18
$ veloctl env create --file config.yml --override
19
20
# Create an environment loaded with a database snapshot:
21
# (Use 'veloctl snapshot put' to create database snapshots)
22
$ veloctl env create --service worker --snapshot snapshot-name
23
24
# Create an environment and override the creator's name:
25
$ veloctl env create --service worker --creator phil
26
27
# Create an environment that includes all available services:
28
$ veloctl env create --all
29
30
# Create an environment with values for the predefined blueprint parameters.
31
$ veloctl env create --param 'tenantId=3','dbLocation=west-2'
Copied!
Options
1
--all Include all available services in the environment
2
--confirm Don't ask for confirmation
3
--creator string Specifies the creator of the environment
4
-d, --display display Display mode: 'full' or 'partial' (default partial)
5
-f, --file string Reads the environment config from the specified path. Use '-' for standard input
6
--override Override the entire blueprint definition with the specified environment file
7
--param strings Specifies values for the predefined blueprint parameters
8
-s, --service strings Specifies the services that will be included in the environment.
9
(Optional) To specify a particular version, use the following format: <service>:<version>
10
--snapshot strings Snapshots to load into the environment
Copied!

veloctl env current

Defines the default working environment

veloctl env current get

Shows the default set environment to be used when developing
1
veloctl env current get
Copied!
Examples
1
$ veloctl env current get
Copied!

veloctl env current set

Sets the current working environment
1
veloctl env current set <environment-name>
Copied!
Examples
1
$ veloctl env current set my-dev-env
Copied!

veloctl env describe

Describes services of the current environment
1
veloctl env describe [environment-name] [flags]
Copied!
Examples
1
# Show services description for the current environment:
2
$ veloctl env describe
3
4
# Show a description for a specific service for the current environment:
5
$ veloctl env describe --service my-service
6
7
# Show a description for a specific service for the current environment and save it to a file:
8
$ veloctl env describe --service my-service --file output.yml
Copied!
Options
1
-f, --file string Saves the description of this environment to the specified file. Use '-' for standard output (default "-")
2
-s, --service string Shows only the parameters of the specified service
Copied!

veloctl env destroy

Destroys an environment
Synopsis
Destroys an environment. This will remove all related cloud resources, and the environment will no longer be active
1
veloctl env destroy [environment-name] [flags]
Copied!
Examples
1
# Destroy the current working environment
2
$ veloctl env destroy
3
4
# Destroy an environment by name (e.g. 'johns-feature'):
5
$ veloctl env destroy johns-feature
Copied!
Options
1
--confirm Don't ask for confirmation
2
--ttl duration Sets the time in which the environment will be destroyed (for example 2s, 2m, 3h, etc) (default -1ns)
Copied!

veloctl env develop

Develops a service on your local machine and connects it to a remote environment
1
veloctl env develop <cmd> [flags]
Copied!
Examples
1
# Develop a service in the current working environment by starting it locally:
2
$ veloctl env develop --service my-service -- go run ./main
3
4
# Develop a service in a specific environment by starting it locally:
5
$ veloctl env develop --env my-env --service my-service -- go run ./main
6
7
# Develop a service in the current working environment, and debug it by running the delve debugger
8
$ veloctl env develop --env my-env --service my-service -- dlv debug --headless=true --api-version=2 --listen=:2345
9
10
# Develop a service in the current working environment by attaching it to a running 'veloctl env portal'
11
$ veloctl env develop --attach --service my-service --env-file .env
Copied!
Options
1
--attach Creates an active tunnel between your local service and the remote environment (Requires a running 'veloctl env portal'
2
--detach Removes active tunnels from your local service to the remote environment (Requires a running 'veloctl env portal')
3
--dry-run Displays information about how the veloctl would execute the command without executing it
4
-e, --env string Environment name
5
--env-file string Writes the environment variables to the specified file. The default is '-' for standard output
6
-f, --file string Applies command configuration specified in a Velocity YAML file
7
--no-shell Don't use sh -c when running the command
8
-q, --quiet No output messages, except for output from the running command
9
-s, --service string Specifies services to develop
10
-v, --verbose Verbose log output
Copied!

veloctl env export

Exports an environment to a file
1
veloctl env export [environment-name] [flags]
Copied!
Examples
1
# Export an environment to a file:
2
$ veloctl env export johns-feature --file johns-feature.yml
Copied!
Options
1
-f, --file string Exports the environment to the desired file path. Use '-' for standard output
Copied!

veloctl env list

Lists all active environments
1
veloctl env list
Copied!

veloctl env list-parameters

Lists the parameters that can be set when creating the environment
1
veloctl env list-parameters
Copied!

veloctl env list-services

Lists all services that you can include in your environments
1
veloctl env list-services
Copied!

veloctl env list-snapshots

Lists all snapshots that were loaded into your environment
1
veloctl env list-snapshots
Copied!

veloctl env logs

Displays logs for services in the environment
1
veloctl env logs [environment-name] [flags]
Copied!
Examples
1
# Display logs for all the services in the current working environment:
2
$ veloctl env logs
3
4
# Display logs for all the services in a specific environment:
5
$ veloctl env logs my-env
6
7
# Display logs for a specific service in a specific environment:
8
$ veloctl env logs --service my-service my-env
9
10
# Display logs for more than one service in a the current working environment:
11
# the current working environment
12
$ veloctl env logs --service my-service --service my-worker
13
14
# Display logs for a specific service since a set duration
15
$ veloctl env logs --service my-service --since 24h
Copied!
Options
1
-n, --lines int The number of lines from the end of the logs to show. Default is -1, showing all logs (default -1)
2
--no-color Disables color in the output
3
-o, --output string Specifies output format: [default, raw, json] (default "default")
4
-s, --service strings Select logs by the specified services (By default, display logs for all the services)
5
--since duration Returns the logs captured in the provided time frame (for example 2s, 2m, 3h, etc) (default 5m0s)
6
-t, --timestamps Prints a timestamp to every log record
Copied!

veloctl env plan

Generates a plan for an environment without creating it
1
veloctl env plan [flags]
Copied!
Examples
1
# Generate a plan for an environment:
2
$ veloctl env plan --service my-service --file plan.yaml
Copied!
Options
1
-d, --display display Display mode: 'full' or 'partial' (default) (default partial)
2
-f, --file string The target filename. Use '-' for standard output
3
--param strings Specifies values for the predefined blueprint parameters
4
-s, --service strings Services to include in the planned environment. (Optional) to use a specific version, use '<service>:<version>'
Copied!

veloctl env portal

Opens a portal that manages connections to the remote environment
1
veloctl env portal [flags]
Copied!
Examples
1
# Open a portal for the current working environment:
2
$ veloctl env portal
3
4
# Open a portal for a specific environment:
5
$ veloctl env portal --env my-env
Copied!
Options
1
-e, --env string environment name
2
-v, --verbose verbose log output
Copied!

veloctl env portal connect

Opens a tunnel to a remote service
1
veloctl env portal connect [flags]
Copied!
Examples
1
# Open a tunnel to a remote service for the current working environment:
2
$ veloctl env portal connect --service backend
Copied!
Options
1
-e, --env string environment name
2
-s, --service string service name
3
-v, --verbose verbose log output
Copied!

veloctl env portal disconnect

Disconnects the tunnels opened by env portal connect
1
veloctl env portal disconnect [flags]
Copied!
Examples
1
# Disconnect the tunnel to a remote service for the current working environment:
2
$ veloctl env portal disconnect --service backend
Copied!
Options
1
-e, --env string environment name
2
-s, --service string service name
3
-v, --verbose verbose log output
Copied!

veloctl env sleep

Shuts down an environment
Synopsis
Shuts down an environment and preserves its data for later use
1
veloctl env sleep [environment-name] [flags]
Copied!
Examples
1
# Shuts down the current working environment
2
$ veloctl env sleep
3
4
# Shuts down an environment named 'johns-feature'
5
$ veloctl env sleep johns-feature
Copied!
Options
1
--ttl duration Sets the time in which the environment will be put to sleep (for example 2s, 2m, 3h, etc) (default -1ns)
Copied!

veloctl env status

Shows the status of an existing environment
1
veloctl env status [environment-name] [flags]
Copied!
Examples
1
# Get status for the current working environment:
2
$ veloctl env status
3
4
# Watch the status of an environment until it is ready:
5
$ veloctl env status env-name
6
7
# Show environment status and quit:
8
$ veloctl env status --no-watch env-name
Copied!
Options
1
-d, --display display Display mode: 'full' or 'partial' (default) (default partial)
2
--no-watch Disable watching the status. show the current status and quit
Copied!

veloctl env sync

Automatically synchronizes a remote service based on changes to local files
1
veloctl env sync [flags]
Copied!
Examples
1
# Sync service source code from a local folder
2
$ veloctl env sync --service worker
3
4
# Sync service source code from a folder while ignoring a file path that matches '*/my_directory/*'
5
$ veloctl env sync --service worker --exclude-pattern ".*/my_directory/.*"
6
7
# Sync service source code from folder path '/my/source-code/path'
8
$ veloctl env sync --service worker --source /my/source-code/path
9
10
# Sync service and use 'path/to/Dockerfile/' for building the image
11
$ veloctl env sync --service worker --dockerfile /path/to/Dockerfile
12
13
# Sync a service only once, without watching for changes
14
$ veloctl env sync --service worker --no-watch
15
16
# Sync service and use a customized build script for building a new image. Build tag is exported as an environment variable.
17
$ veloctl env sync --service worker --build-script
Copied!
Options
1
--build-dir string
2
--build-script string Build script to be used for building new images
3
--build-tag-var string The exported variable to the build script containing the expected docker build tag (default "EXPECTED_REF")
4
--dockerfile string Dockerfile name to use for building the service (default "Dockerfile")
5
-e, --env string The name of the environment
6
-p, --exclude-pattern strings Regex for files paths to be ignored on change
7
-f, --file string Applies command configuration specified in a Velocity YAML file
8
-l, --live-update strings Run live updates
9
--no-watch Sync only once
10
-s, --service string Service to sync
11
--skip-first-build Skip build on start
12
--source string Build directory
13
-v, --verbose Verbose log output
Copied!

veloctl env up

Creates a hybrid Docker Compose environment with offloaded services
1
veloctl env up [environment-name] [flags]
Copied!
Examples
1
# Create a hybrid environment from a docker-compose file by offloading services to a remote cluster
2
$ veloctl env up --offload postgres --file compose-file.yaml
3
4
# Create a hybrid environment from a docker-compose file that is located in the specified working directory
5
$ veloctl env up --offload postgres -f compose-file.yaml --working-directory /path/to/work/dir
Copied!
Options
1
--creator string Specifies the creator of the environment
2
-f, --file strings Specifies the path to your docker-compose file
3
--local strings Defines the list of services that will run locally. The rest of the services will run remotely
4
--offload strings Defines the list of services that will run remotely
5
--pre-run strings Defines a pre-run command that will run before the specified service. Format: '<target_service>|<command>'
6
-v, --verbose Verbose log output
7
-w, --working-directory string Sets the working directory which contains the docker-compose file
Copied!

veloctl env update

Updates services in an existing environment
1
veloctl env update [environment-name] [flags]
Copied!
Examples
1
# Update the current environment for developing existing services:
2
$ veloctl env update
3
4
# Update an environment for developing a specific service:
5
$ veloctl env update --service worker
6
7
# Update an environment for developing a specific service in a specific version:
8
$ veloctl env update --service worker:latest
9
10
# Update an environment for developing more than one service:
11
$ veloctl env update --service worker --service backend
12
13
# Update an environment with a specific name for developing a specific service:
14
$ veloctl env update --service website johns-feature
15
16
# Update an environment specified in a config file:
17
$ veloctl env update --file config.yml
18
19
# Update an environment by loading a database snapshot:
20
$ veloctl env update --snapshot snapshot-name
21
22
# Update an environment by removing an existing service from the environment:
23
$ veloctl env update --service worker --remove
24
25
# Update an environment with values for the predefined blueprint parameters.
26
$ veloctl env update --param 'tenantId=3','dbLocation=west-2'
Copied!
Options
1
--confirm Don't ask for confirmation
2
-d, --display display Display mode: full or partial (default) (default partial)
3
-f, --file string Reads the environment configuration from a selected path. Use '-' for standard output
4
--param strings Specifies values for the predefined blueprint parameters
5
--remove Remove the specified service from the environment
6
-s, --service strings Services to update. To use a specific version, use '<service>:<version>'
7
--snapshot strings Data snapshots to load into the environment
Copied!

veloctl env wakeup

Restores a sleeping environment into a running state
1
veloctl env wakeup [environment-name] [flags]
Copied!
Examples
1
# Restores the current sleeping environment into a running state.
2
$ veloctl env wakeup
3
4
# Restores a sleeping environment named 'johns-feature' into a running state.
5
$ veloctl env wakeup johns-feature
Copied!
Options
1
-d, --display display Display mode: 'full' or 'partial' (default) (default partial)
Copied!

veloctl snapshot

Manages the database snapshots available for environment seeding

veloctl snapshot list

Lists all available snapshots
1
veloctl snapshot list
Copied!
Examples
1
$ veloctl snapshot list
Copied!

veloctl snapshot put

Creates or updates a snapshot
1
veloctl snapshot put [snapshot-name] [flags]
Copied!
Examples
1
# Upload or update a snapshot named 'my-snapshot' with the file 'mysql-dump.sql'
2
$ veloctl snapshot put --target mysql-database --db db-name --file ./mysql-dump.sql my-snapshot
3
4
# Upload a new snapshot. The snapshot's name will be the UTC time of the upload in format "20060102150405"
5
# with "snapshot-" prefix (e.g. snapshot-20210707160809)
6
$ veloctl snapshot put --target mysql-database --db db-name --file ./mysql-dump.sql
7
8
# Upload a snapshot created by Mongodump ("mongodump --gzip --archive=dump.gz") named 'my-mongo-dump'
9
$ veloctl snapshot put --target mongodb-database --db db-name --file ./dump.gz my-mongo-dump
Copied!
Options
1
-d, --db string database name in the target.
2
-f, --file string snapshot file path.
3
-t, --target string target (service name) to load the snapshot into.
Copied!

veloctl status

Shows the status of your connectivity, environment, and active sessions
1
veloctl status
Copied!

veloctl version

Shows the currently installed version of veloctl
1
veloctl version
Copied!