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 auth login

Logins to Velocity.
1
Usage:
2
veloctl auth login
Copied!

veloctl auth logout

Logouts and unlinks this device.
1
Usage:
2
veloctl auth logout
Copied!

veloctl completion

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

veloctl env create

Creates a new environment.
1
Usage:
2
veloctl env create [environment-name] [flags]
3
4
Examples:
5
# Create an environment for developing the 'worker' service
6
$ veloctl env create --service worker
7
8
# Create an environment for developing the 'worker' service
9
# in a specific "version"
10
$ veloctl env create --service worker:version
11
12
# Create an environment for developing both the 'worker'
13
# and 'backend' services
14
$ veloctl env create --service worker --service backend
15
16
# Create an environment named 'johns-feature' for
17
# developing the 'website' service
18
$ veloctl env create --service website johns-feature
19
20
# Read the environment config from the specified file.
21
# The filename can be '-' for standard input
22
$ veloctl env create --file config.yml
23
24
25
Flags:
26
-d, --display display display mode; can be 'full' or 'partial' (default is partial)
27
-f, --file string read the environment config from the specified file.
28
The filename can be '-' for standard input
29
-s, --service strings services to debug.
30
(Optional) to use a specific version, use '<service>:<version>'
31
--snapshot strings snapshots to load into the environment
Copied!

veloctl env current get

Shows the default set environment to be used when developing.
1
Usage:
2
veloctl env current get
Copied!

veloctl env current set

Sets the current working environment.
1
Usage:
2
veloctl env current set <environment-name>
Copied!

veloctl env destroy

Destroys an environment. This will remove all related cloud resources, and the environment will no longer be active.
1
Usage:
2
veloctl env destroy [environment-name] [flags]
3
4
Examples:
5
# Destroy the current working environment
6
$ veloctl env destroy
7
8
# Destroy an environment named 'johns-feature'
9
$ veloctl env destroy johns-feature
10
11
12
Flags:
13
--confirm don't ask for confirmation
Copied!

veloctl env develop

Develops on a local environment by swapping a running service with a local one for development.
1
Usage:
2
veloctl env develop <command> [flags]
3
4
Examples:
5
# Develop the 'my-service' service in the current working environment
6
# by running 'go run ./main' locally
7
$ veloctl env develop --service my-service -- go run ./main
8
9
# Develop the 'my-service' service in the 'my-env' environment
10
# by running 'go run ./main' locally
11
$ veloctl env develop --env my-env --service my-service -- go run ./main
12
13
# Run the delve debugger with the 'my-service' service in the current working
14
# environment, and listen on :2345 for incoming debugger connections.
15
$ veloctl env develop --env my-env --service my-service -- dlv debug
16
--headless=true --api-version=2 --listen=:2345
17
18
19
Flags:
20
--dry-run do not actually execute the command. display
21
information about how veloctl will execute the command
22
-e, --env string environment name
23
-s, --service string service to debug
24
-v, --verbose verbose log output
Copied!

veloctl env list

Lists all active environments.
1
Usage:
2
veloctl env list
Copied!

veloctl env list-services

Lists all services that you can build environments for.
1
Usage:
2
veloctl env list-services
Copied!

veloctl env list-snapshots

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

veloctl env logs

Tails logs for services in the environment.
1
Usage:
2
veloctl env logs [environment-name] [flags]
3
4
Examples:
5
# Tail logs for all the services in the current working environment
6
$ veloctl env logs
7
8
# Tail logs for all the services in the 'my-env' environment
9
$ veloctl env logs my-env
10
11
# Tail logs for the 'my-service' service in the 'my-env' environment
12
$ veloctl env logs --service my-service my-env
13
14
# Tail logs for the 'my-service' and 'my-worker' services in
15
# the current working environment
16
$ veloctl env logs --service my-service --service my-worker
17
18
# Tail logs for all the services in the current working environment
19
# from the last 24 hours
20
$ veloctl env logs --service my-service --since 24h
21
22
23
Flags:
24
-n, --lines int the number of lines from the end of the logs to show.
25
Defaults to -1, showing all logs (default -1)
26
--no-color whether to disable color in the output.
27
-o, --output string specify output format.
28
Currently supports: [default, raw, json]
29
(default "default")
30
-s, --service strings filter what services to show logs.
31
Defaults to all services in the environment
32
--since duration return logs newer than a relative duration like
33
5s, 2m, or 3h. (default 5m0s)
Copied!

veloctl env status

Watch an existing environment's status.
1
Usage:
2
veloctl env status [environment-name] [flags]
3
4
Examples:
5
# Watch the current working environment status
6
$ veloctl env status
7
8
# Watch the status of the 'env-name' environment until it is ready
9
$ veloctl env status env-name
10
11
# See the status of the 'env-name' environment
12
$ veloctl env status --no-watch env-name
13
14
15
Flags:
16
-d, --display display display mode; can be 'full' or 'partial'
17
(default partial)
18
--no-watch disable watching the status.
19
show the current status and quit
Copied!

veloctl status

See the status of your connectivity, environment, and active development sessions.
1
Usage:
2
veloctl status
Copied!

veloctl version

Shows the currently installed version of veloctl.
1
Usage:
2
veloctl version
Copied!
Last modified 3mo ago