Install and configure the CLI
The Temporal CLI is a command-line tool for interacting with the Temporal Service. It helps you manage, monitor, and debug Temporal applications.
Install the CLI
The CLI is available for macOS, Linux, and Windows, or as a Docker image.
- macOS
- Linux
- Windows
- Docker
Install with Homebrew:
brew install temporal
Or download from the CDN:
extract the archive and add the temporal binary to your PATH.
Install with Homebrew (if available):
brew install temporal
Or download from the CDN:
extract the archive and add the temporal binary to your PATH.
Download from the CDN:
extract the archive and add the temporal.exe binary to your PATH.
Temporal CLI container image is available on DockerHub and can be run directly:
docker run --rm temporalio/temporal --help
When running the Temporal CLI inside Docker, for the development server to be accessible from the host system, the server needs to be configured to listen on external IP and the ports need to be forwarded:
docker run --rm -p 7233:7233 -p 8233:8233 temporalio/temporal server start-dev --ip 0.0.0.0
# UI is now accessible from host at http://localhost:8233/
Run a local development server
The CLI includes a local Temporal development service for fast feedback while building your application.
Start the server:
temporal server start-dev
This command automatically starts the Web UI, creates the default Namespace, and uses an in-memory
SQLite database.
The Temporal Server will be available on localhost:7233 and the Temporal Web UI will be available at
http://localhost:8233.
Persist state locally by specifying a database file:
temporal server start-dev --db-filename temporal.db
Local databases created with --db-filename may not be compatible with newer versions of the Temporal CLI. The
temporal server start-dev command is intended for development environments.
For the full list of development server options, use the --help flag:
temporal server start-dev --help
Development server configuration
Namespace registration
Namespaces are pre-registered at startup for immediate use. Customize pre-registered Namespaces with the following command:
temporal server start-dev --namespace foo --namespace bar
Register Namespaces with namespace create:
temporal operator namespace create --namespace foo
Enable or turn off the Temporal Web UI
By default, the Temporal Web UI is enabled when running the development server using the Temporal CLI. To turn off the UI,
use the --headless modifier:
temporal server start-dev --headless
Dynamic configuration
Advanced Temporal CLI configuration requires a dynamic configuration file.
To set values on the command line, use --dynamic-config-value KEY=JSON_VALUE. For example, enable the Search Attribute
cache:
temporal server start-dev --dynamic-config-value system.forceSearchAttributesCacheRefreshOnRead=false
This setting makes created Search Attributes immediately available.
Configure the CLI
Environment variables
The following table describes the environment variables you can set for the Temporal CLI.
| Variable | Definition | Client Option |
|---|---|---|
TEMPORAL_ADDRESS | Host and port (formatted as host:port) for the Temporal Frontend Service. | --address |
TEMPORAL_CODEC_AUTH | Authorization header for requests to Codec Server. | --codec-auth |
TEMPORAL_CODEC_ENDPOINT | Endpoint for remote Codec Server. | --codec-endpoint |
TEMPORAL_NAMESPACE | Namespace in Temporal Workflow. Default: "default". | --namespace |
TEMPORAL_TLS_CA | Path to server CA certificate. | --tls-ca-path |
TEMPORAL_TLS_CERT | Path to x509 certificate. | --tls-cert-path |
TEMPORAL_TLS_DISABLE_HOST_VERIFICATION | Turns off TLS host name verification. Default: false. | --tls-disable-host-verification |
TEMPORAL_TLS_KEY | Path to private certificate key. | --tls-key-path |
TEMPORAL_TLS_SERVER_NAME | Override for target TLS server name. | --tls-server-name |
TEMPORAL_API_KEY | API key used for authentication. | --api-key |
Do not confuse environment variables, set with your shell, with temporal env options.
Create and modify configuration files
The Temporal CLI lets you create and modify TOML configuration files to store your environment variables and other settings. Refer to Environment Configuration for more information.
Configure proxy support
The Temporal CLI provides support for users who are operating behind a proxy. This feature ensures seamless communication even in network-restricted environments.
Setting up proxy support
If you are behind a proxy, you'll need to instruct the Temporal CLI to route its requests via that proxy. You can
achieve this by setting the HTTPS_PROXY environment variable.
export HTTPS_PROXY=<host>:<port>
Replace <host> with the proxy's hostname or IP address, and <port> with the proxy's port number.
Once set, you can run the Temporal CLI commands as you normally would.
Temporal CLI uses the gRPC library which natively supports HTTP CONNECT proxies. The gRPC library checks for the
HTTPS_PROXY (and its case-insensitive variants) environment variable to determine if it should route requests through
a proxy.
In addition to HTTPS_PROXY, gRPC also respects the NO_PROXY environment variable. This can be useful if there are
specific addresses or domains you wish to exclude from proxying.
For more information, see Proxy in the gRPC documentation.
Enable auto-completion
Enable auto-completion using the following commands.
zsh auto-completion
-
Add the following line to your
~/.zshrcstartup script:eval "$(temporal completion zsh)" -
Re-launch your shell or run:
source ~/.zshrc
Bash auto-completion
-
Install bash-completion and add the software to your
~/.bashrc. -
Add the following line to your
~/.bashrcstartup script:eval "$(temporal completion bash)" -
Re-launch your shell or run:
source ~/.bashrc
If auto-completion fails with the error: bash: _get_comp_words_by_ref: command not found, you did not successfully
install bash-completion. This package must be loaded into your
shell for temporal auto-completion to work.
Fish auto-completion
-
Create the Fish custom completions directory if it does not already exist:
mkdir -p ~/.config/fish/completions -
Configure the completions to load when needed. Note: the filename must be
temporal.fishor the completions will not be found:echo 'eval "$(temporal completion fish)"' >~/.config/fish/completions/temporal.fish -
Re-launch your shell or run:
source ~/.config/fish/completions/temporal.fish
Getting CLI help
From the command line:
temporal <command> <subcommand> --help
For example:
temporal --helptemporal workflow --helptemporal workflow delete --help
For a full list of commands, see the Temporal CLI command reference.