Temporal CLI command reference
The Temporal CLI provides direct access to a Temporal Service via the terminal. It's a powerful tool for managing, monitoring, and debugging Temporal Applications. You can use it to start, stop, inspect and operate on Workflows and Activities, and perform administrative tasks such as Namespace, Schedule, and Task Queue management.
The Temporal CLI also includes an embedded Temporal Service suitable for use in development and CI/CD. It includes the Temporal Server, SQLite persistence, and the Temporal Web UI.
When upgrading from tctl to the Temporal CLI, make sure to update your environment variables and use updated commands. For details, see CLI release notes.
Command set
- temporal activity
- temporal batch
- temporal env
- temporal operator
- temporal schedule
- temporal server
- temporal task-queue
- temporal workflow
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 disable Temporal UI
By default, the Temporal UI is enabled when running the development server using the Temporal CLI.
To disable 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.
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 | Disables 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 |
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.