⚠️ Temporal CLI's API is still a subject for changes.⚠️
The Temporal CLI is a command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal.
brew install temporal
Download and extract the latest release from GitHub releases.
temporal server start-devAt this point you should have a server running on localhost:7233 and a web interface at http://localhost:8233.
Run individual commands to interact with the local Temporal server.
temporal operator namespace list
temporal workflow listUse the help flag to see all available options:
temporal server start-dev -hNamespaces are pre-registered at startup so they're available to use right away.
By default, the "default" namespace is registered. To customize the pre-registered namespaces, start the server with:
temporal server start-dev --namespace foo --namespace barRegistering namespaces the old-fashioned way via temporal operator namespace register foo works too!
By default temporal server start-dev run in an in-memory mode.
To persist the state to a file use --db-filename:
temporal server start-dev --db-filename my_test.dbBy default the Temporal UI is started with Temporal CLI. The UI can be disabled via a runtime flag:
temporal server start-dev --headlessTo build without static UI assets, use the headless build tag when running go build.
Some advanced uses require Temporal dynamic configuration values which are usually set via a dynamic configuration file inside the Temporal configuration file. Alternatively, dynamic configuration values can be set via --dynamic-config-value KEY=JSON_VALUE.
For example, to disable search attribute cache to make created search attributes available for use right away:
temporal server start-dev --dynamic-config-value system.forceSearchAttributesCacheRefreshOnRead=trueTo compile the source run:
go build -o dist/temporal ./cmd/temporalTo run all tests:
go test ./...-
When consuming Temporal as a library in go mod, you may want to replace grpc-gateway with a fork to address URL escaping issue in UI. See temporalio/temporalite-archived#118
-
When running the executables from the Releases page in macOS you will want to allowlist
temporalbinary inSecurity & Privacysettings:
