Set up the Temporal CLI
The Temporal CLI is a command-line tool for interacting with the Temporal Service. It helps you manage, monitor, and debug Temporal applications. You can also use it to run a local development server and interact with Temporal Applications from the command line.
With the Temporal CLI, you can:
- Run a local Temporal Service for development
- Start Workflow Executions on any Temporal Service (local, self-hosted, or Temporal Cloud)
- Interact with running Workflows
- Inspect the state of Workflows and Activities
- Manage Namespaces, Schedules, and Task Queues
- Monitor and debug application behavior
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
Run the development server
The CLI includes a local Temporal development service for fast feedback while building your application.
Start the server:
temporal server start-dev \
--db-filename path/to/local-persistent-store
View available options:
temporal server start-dev \
--help
When running the 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/
What the local server provides
- A local instance of the Temporal Service
- Automatic startup of the Web UI
- A default Namespace
- Optional persistence using SQLite
Omitting --db-filename
uses an in-memory database. This speeds up testing but does not persist Workflow data between sessions.
Access the Web UI
- Temporal Service:
localhost:7233
- Web UI: http://localhost:8233
The CLI works with all Temporal SDKs. Use it to develop and test your application before deploying to production.
Getting CLI help
From the command line:
temporal <command> <subcommand> --help
For example:
temporal --help
temporal workflow --help
temporal workflow delete --help
Available commands
Command | Description |
---|---|
activity | Complete, update, pause, unpause, reset or fail an Activity |
batch | Manage running batch jobs |
completion | Generate the autocompletion script for the specified shell |
env | Manage environments |
operator | Manage Temporal deployments |
schedule | Perform operations on Schedules |
server | Run Temporal Server |
task-queue | Manage Task Queues |
worker | Read or update Worker state |
workflow | Start, list, and operate on Workflows |