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

Log into Velocity.
1
veloctl auth login
Copied!

veloctl auth logout

Log out from Velocity and unlink this device.
1
veloctl auth logout
Copied!

veloctl completion

Automatically complete the commands in the terminal. Run the command the first time you work with Velocity. After running the veloctl completion, the system would be able to auto-complete the commands.
Syntax: veloctl completion <bash|zsh|fish|powershell
Setups for different shell terminals:
Bash
1
$ source <(veloctl completion bash)$ source <(veloctl completion bash)
2
# To load completions for each session, execute once:
3
# Linux:
4
$ veloctl completion bash > /etc/bash_completion.d/veloctl
5
# macOS:
6
$ veloctl completion bash > /usr/local/etc/bash_completion.d/veloctl
Copied!
Zsh
1
# If shell completion is not already enabled in your environment,
2
# you will need to enable it. You can execute the following once:
3
4
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
5
6
# To load completions for each session, execute once:
7
$ veloctl completion zsh > "${fpath[1]}/_veloctl"
8
9
# You will need to start a new shell for this setup to take effect.
Copied!
Fish
1
$ veloctl completion fish | source
2
3
# To load completions for each session, execute once:
4
$ veloctl completion fish > ~/.config/fish/completions/veloctl.fish
Copied!
Powershell
1
PS> veloctl completion powershell | Out-String | Invoke-Expression
2
3
# To load completions for every new session, run:
4
PS> veloctl completion powershell > veloctl.ps1
5
# and source this file from your PowerShell profile.
Copied!

veloctl env create

Creates a new environment.
Options for creating an environment
Use Case
Command Syntax
Text
Create an environment for testing a specific service.
veloctl env create --service service-name
Create an environment for a service of a specific version.
veloctl env create --service service-name:version
Give a specific name for an environment.
veloctl env create --service service-name environment-name.
Create an environment from a configuration file.
veloctl env create --file filename.yml
Flags:
Flag
Description
Text
--confirm
Does not ask for confirmation.
--creator
Specifies the creator of the environmnent.
-d, --display
Display mode: - full - partial (default).
-f, --file
Reads the environment config from the specified path. Use '-' for standard input (for example - .yaml).
-s, --service
Specifies the services that will be included in the environment. To specify a particular version, use the following format: <service>:<version>
--snapshot
Snapshots to load into the environment.

veloctl env current

This command defines the default working environment.
To set the current working environment, enter:
1
veloctl env current set <environment-name>
Copied!
To show the current working environment, enter
1
veloctl env current get <environment-name>
Copied!

veloctl env destroy

Destroys an environment. This removes all related cloud resources, and the environment is no longer be active.
To destroy the current environment, enter:
1
veloctl env destroy
Copied!
To destroy a specific environment, enter:
1
veloctl env destroy environment-name
Copied!
Flag
Description
Text
--confirm
Does not ask for confirmation

veloctl env develop

Develop a service on your local machine and connect it to a remote environment.
The command creates active tunnels from your local service to all the service dependencies running in the remote environment.
To develop a service in a local environment, enter
1
veloctl env develop --service service-name --go run. /main
Copied!
To develop a service in a specific environment, enter:
1
veloctl env develop --env environment-name --service service-name go run ./main
Copied!
Flags:
Flag
Description
Text
--attach
Creates an active tunnel between your local service and the remote environment.
--detach
Removes active tunnels from your local service to the remote environment.
--dry-run
Does not actually execute the command. Displays information about how the veloctl would execute the command.
-e, --env
Environment name.
--env-file
Write the environment variables to the specified file. Use '-' for standard output (for example .yaml).
--no-shell
Do not use sh -c when running the command.
-s, -service
Specifies services to develop.
-v, --verbose
Verbose log output.

veloctl env list

Lists all active environments.
To list all active environments, enter:
1
veloctl env list
Copied!

veloctl env list-services

Lists all services for which you can build an environment. To list all the services for which you can build environments, enter:
1
veloctl env list-service
Copied!

veloctl env list-snapshots

Lists all snapshots that were loaded into your environment. To list all the snapshots that were loaded into your environment, enter:
1
veloctl env list-snapshots
Copied!

veloctl env logs

Appends logs for services in the environment.
Options for displaying logs:
Use Case
Command Syntax
Text
Append logs for all the services in the current working environment.
veloctl env logs
Append logs for all the services in a specific environment.
veloctl env logs enviornment-name
Append logs for a specific service in a specific environment .
veloctl env logs --service service-name environment-name
Append logs for a specific service since a set duration.
veloctl env logs --service service-name --since [timeframe]
Flags:
Flag
Description
Text
-n, --lines int
The number of lines from the end of the logs to show.
--no-color
Disables color in the output
-0, --output string
Specifies output format:, currntly support: - default - raw - json
-s, --service
Selects logs by the specified services.
--since duration
Returns the logs captured since a set duration (for example: 2s, 2m, 3h etc). Default is the last 5 minutes.
-t, time-stamp
Prints a timestap to every log record

veloctl env status

Continually shows the status of an existing environment.
To Get a status for the working environment, enter:
1
veloctl env status
Copied!
To get a status of an environment in the making, enter:
1
veloctl env status environment-name
Copied!
To show environment status and quit, enter:
1
veloctl env status --no-watch environment-name
Copied!
Flag
Description
Text
-d, --display
Display mode: - full - partial (default)
--no-watch
Disable watching the status. Show current status and quit.

veloctl status

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

veloctl version

Shows the currently installed version of veloctl.
Usage:
1
veloctl version
Copied!

veloctl env describe

Environment Description

The command prints out a description of services in the environment.
Usage:
1
veloctl env describe
Copied!
To print out a description of a specific service and save it to a file:
1
veloctl env describe --service my-service --file output.yml
Copied!
Flag
Description
Data Type
-f,
--file
Saves the desceription of this environment to the specified file name (-f or --filename). The filename can be '-' for standard output (default "-").
String
-s,
--service
When a service is specified by service name, only the parameters of the specified service will be shown.
String

veloctl env sleep

Putting an environment to Sleep

The command shuts down the environment but preserves its data for later use.
Please note - Environments may get to sleep mode automatically according to the account default definitions.
Syntax:
1
veloctl env sleep
Copied!
Example: To put "johns-feature" to sleep, use the following command:
1
veloctl env sleep johns-feature
Copied!

veloctl env wakeup

Waking up an environment

The command wakes up the environment that was put to sleep. It restores the data preserved when the environment was put to sleep and allows it to resume from the same point.
Syntax:
1
veloctl env wakeup
Copied!
Example: To resume work on johns-feature after putting it to sleep, use the following command: veloctl env wakeup -johns-feature

veloctl env export

Exporting environment definition to a file

The command exports running environment definitions to a file. The environment must be running.
Example: To export john-feature environment to a YAML file run $veloctl env export johns-feature --file johns-feature.yaml
Syntax
1
veloctl env export environment-name --file filename.yaml
Copied!

velcotl env plan

Generating definitions for a non-running environment

The command generates a file containing descriptions and definitions for an environment without creating it.
Example - to generate a plan for an environment containing the website service and save it to a file, run: veloctl env plan --service website --file filename.yaml
Syntax:
1
veloctl env plan --service service-name --file filename.yaml
Copied!
Flag
Description
Text
-d, --display
Display mode: - full - partial (default).
-f, --file
Saves the environment plan to the filename. The filename be '-' for standrad output (for example .yaml).
-s, --service
Services to include in the planned environment.

veloctl env portal

Opens a process that manages the connections between the local device to the remote environment.
The portal is a long-living process that needs to stay running in the background while you develop and debug your application. Once the portal is running, you need to run veloctl env develop --attach in order to create an active tunnel from your local service to the remote environment. To terminate the tunnel, you need to run veloctl env develop --detach --service website.
Example: to develop the website service
  1. 1.
    Run env portal in a terminal window and keep the process running
  2. 2.
    In a new terminal window, run env develop for the website service while attaching it to a running portal: veloctl env portal attach --service website
  3. 3.
    To terminate the tunnel, run: veloctl env portal detach --service website
Syntax:
1
veloctl env portal
Copied!
Please note that unlike using env develop, using a long-living portal allows you to restart your developed application many times without affecting the active tunnels, resulting in a faster feedback loop.
Flag
Description
Text
-e, --env
Environment name.
-v, --verbose
Verbose log output.

veloctl env portal connect/disconnect

Connect - creates a tunnel from the local device to the remote service. Disconnect - closes the tunnel to the remote service.
The portal must be up to run these commands.
These commands are mainly used for connecting to remote infrastructure services from your local machine. Services that you are not developing, such as databases and queues.
Syntax:
1
velcotl env portal connect --service servicename
2
velcotl env portal disconnect --service servicename
Copied!

veloctl env sync

Automatically synchronizes a remote service based on changes to local files.
Only available upon request. Contact Velocity support to enable this feature.
Rsync should be installed on the local machine and on the service image.
This command allows you to change the code locally and synchronize it to a running remote environment.
There are two modes for using env sync:
File sync / Hot reload - Velocity monitors a local folder and synchronizes its files with a selected folder in the remote service. For use with scripted languages (such as Python).
Image rebuild - Velocity monitors a local folder. When the files change, Velocity rebuilds the image, and updates the remote service. For use with compiled language (such as .Net).
Use veloctl env sync as follows:
Use Case
Command Syntax
Text
Sync service source code from a local folder
veloctl env sync --service service-name
Sync service source code from a folder while ignoring a file path that matches */my_directory
veloctl env sync --service service-name --exlude-pattern "*/my_directory"
Sync service source code from folder path 'my/source-code/path'
veloctl env sync --service service-name --source /my/source-code/path
Sync service and use 'path/to/Dockerfile/' for building the image
veloctl env sync --service service-name --dockerfile /path/to/Dockerfile
Sync a service only once, without watching for changes
veloctl env sync --service service-name --no-watch
Sync service and use a customized build script for building a new image. Build tag is exported as an environment variable: 'EXPECTED_REF'
velcotl env sync --service servicename --build-script
Example for a build script: 1#!/bin/sh 2 3docker build --platform=linux/amd64 -t $EXPECTED_REF . 4echo "done building docker image"
Flags:
Flag
Description
Text
--build-dir string
Build directory, the location used to build your image on.
--build-script string
Customize build script to be used for building new images (instead of the generic docker build that is used by default) Use a custom build script when a build argument is required. For example - when you want to indicate a platform for the image build: --platform=linux/amd64
--build-tag-var string
The exported variable to the build script containing the expected docker build tag
--dockerfile string
Dockerfile name to use for building the service, if not provided the existing folder will be used to search for the docker file
-e, --env string
Environment name
-p, --exclude-pattern strings
Regex for files paths to be ignored on change
-l, --live-update strings
Run live updates. The source and target folders in the following format: source/path:target/path
--no-watch
Sync only once and don't monitor for additional file changes.
-s, --service string
Services to sync
--skip-first-build
Skip build on start
--source string
Service source code path, if not provided the existing folder will be used.
-v, --verbose
Verbose log output
Flag
Description
Text
-e, -env
Environment name.
-s, --service
Service name.
-v, --verbose
Verbose log output.

veloctl env update

Updates services in an existing environment. This command recreates services in the environment based on updated definitions and allows adding additional services if needed.
Syntax: veloctl env update
Options for environment update:
Use Case
Command Syntax
Text
Recreate the environment base on the image version.
veloctl env update --file config.yml
Update a specific service. This commad affects the variables and images of the main service. The dependencies of the service are not updated.
veloctl env update --service worker
Update an environment for developing a specific service in a specific version
veloctl env update --service worker:latest
Update Multiple services.
veloctl env update --service worker --service backend
Update the environment by reloading data snapshot.
veloctl env update --snapshot snapshot-name
Flags:
Flag
Description
Text
--confirm
Does not ask for confirmation
-d, --display
Display Mode: -full -partial (default)
-f. --file
Reads the environment configuration from a selected path (use '-' for standard input, for example YAML).
-s, --service
Services to update. To use a specific version, use '<service>:<version>'
--snapshot
Data snapshots to load to the environment

veloctl snapshot

Manages the database snapshots avaiable to load into an environment.
This feature is only available upon request. Contact Velocity support to enable veloctl snapshot.
  1. 1.
    To upload snapshot file to the database, enter:
veloctl snapshot put
2. To show a list of available snapshots, enter:
veloctel snapshot list
3. To load snapshots to an environment, enter:
veloctl create --service name --snapshot snapshot-name