CLI
You can use the CLI to interact with Restate, and manage your services, deployments and invocations.
Installation
Option 1: Using a package manager
Install the Restate CLI via:
Option 2: Download the binary
Use curl
to download the binaries from the releases page, and make them executable:
Check if the CLI is configured correctly:
restate whoami
Print help to see all available commands:
restate --help
The CLI can be a useful tool for debugging and troubleshooting. Have a look at the introspection page for a list of useful commands .
Configuration
There are two ways to configure the CLI: via environment variables or via a configuration file.
Using environment variables
You can specify the following environment variables:
RESTATE_HOST
: The hostname/IP address of the server. Default islocalhost
.RESTATE_HOST_SCHEME
: Default ishttp
.RESTATE_ADMIN_URL
: To specify the full URL of the admin server (scheme+host+port).RESTATE_AUTH_TOKEN
: Set if authentication is required.
For example, to specify the hostname myhost
and the host scheme https
, pass environment variables as follows:
RESTATE_HOST=myhost RESTATE_HOST_SCHEME=https restate <command>
You can find the full list of configuration variables in the CLI GitHub repo.
Using a configuration file
You can also specify the configuration in a .env
file. The CLI will look for a .env
file in its current directory.
For example, to connect to a Restate admin server running at http://myhost:9070
, save the following in a .env
file: