Open dhiaayachi opened 2 weeks ago
Huge +1 on this one. We have completely migrated from using Docker compose version of temporal to simple and easy set up temporal server cli. But this restriction is causing lot of churn. We changed our docs and built around this CLI version in mind some CI/CD pipelines. Now this is unable to handle to more than 3 KeywordList search attributes.
Thanks for reporting this issue. The Temporal CLI server has a pre-allocated limit for the number of custom search attributes, as documented here.
The suggested workaround is to use docker-compose instead.
Thanks for reporting this issue. Unfortunately, I need more information to find a solution.
Could you please share the following information:
This will help me understand the context better and find the appropriate solution for you.
Thanks for the feature request! This is a great suggestion and we understand the need for a higher limit on custom search attributes in the CLI server for development purposes.
Currently, there's no way to configure this limit, but you can use the workaround you've suggested: Docker Compose. This will provide you with a more flexible environment and allow you to adjust the search attributes limit according to your needs.
We'll consider this feature request for future releases of the Temporal CLI.
Temporal CLI command options reference | Temporal Documentation
Replay will return September 18-20 in Seattle! Secure your ticket.
Home Start learning Start building Temporal Cloud
Search
Temporal CLI command options reference
On this page
This page lists the available options that can be used in conjunction with the various Temporal CLI commands. Temporal CLI offers a terminal-based interface for managing, monitoring, and debugging Workflows and Activities within the Temporal Platform.
The Temporal CLI documentation covers version 1.0 of the Temporal CLI.
For reference, see Temporal CLI Command Reference.
You can use environment variables to set common values rather than having to specify them for every command.
For example, to set a default Namespace, enter: temporal env set NAMESPACE my-namespace
You can also use a -e
modifier in the docker compose up
command to set environment variables for a self-hosted Docker Cluster.
For example, to set a default Namespace, use docker compose up -e NAMESPACE=my-namespace
.
These are general options that can be used with nearly all temporal
commands.
--help
Display help for the given command.
Alias: -h
Example
temporal workflow start --help
--version
Display the version of the Temporal CLI.
Example
temporal --version
--address
The address of the Temporal Frontend Service.
The default is 127.0.0.1:7233
.
Example
temporal --address 127.0.0.1:7233 workflow list
--namespace
Specify a Namespace for the Temporal command.
Alias: -ns
Example
temporal --namespace my-namespace workflow list
--tls
Enable Transport Layer Security (TLS) over the Temporal gRPC connection.
This requires you to also specify your tls_cert_path
and tls_key_path
arguments.
Example
temporal --address 127.0.0.1:7233 --tls --tls_cert_path <path> --tls_key_path <path> workflow list
--tls_cert_path
The path to the TLS certificate that is used by the Temporal CLI.
Example
temporal --address 127.0.0.1:7233 --tls --tls_cert_path <path> --tls_key_path <path> workflow list
--tls_key_path
The path to the TLS private key file.
If you specify this argument, you must also specify --tls_cert_path
.
Example
temporal --address 127.0.0.1:7233 --tls --tls_cert_path <path> --tls_key_path <path> workflow list
--tls_ca_path
The path to a CA certificate file for the TLS connection.
Example
temporal --address 127.0.0.1:7233 --tls --tls_cert_path <path> --tls_key_path <path> --tls_ca_path <path> workflow list
--tls_server_name
Specify the server name to use for TLS host verification.
This is necessary if a hostname is used, instead of an IP address, in --address
.
If you specify this argument, TLS must also be enabled.
Example
temporal --address your-temporal.io:7233 --tls --tls_cert_path <path> --tls_key_path <path> --tls_server_name your-temporal.io workflow list
--tls_disable_host_verification
Disable TLS host verification. If you specify this argument, TLS must also be enabled.
Example
temporal --address 127.0.0.1:7233 --tls --tls_cert_path <path> --tls_key_path <path> --tls_disable_host_verification workflow list
--query_reject_condition
The --query_reject_condition
modifier can be used to reject queries based on the status of the workflow execution.
Valid values:
not_open
: Reject if Workflow is not open.not_completed_cleanly
: Reject if the Workflow is not completed cleanly.--cron
Specify a Cron Schedule for a Workflow Execution.
--workflowidreusepolicy
Specify a Workflow Id Reuse Policy.
There are three allowed values:
AllowDuplicateFailedOnly
: Allow duplicate if the previous run failed.AllowDuplicate
: Allow duplicate runs of the Workflow with the same ID.RejectDuplicate
: Reject if the Workflow already has a running execution with the same ID.--input
The --input
modifier passes input for a Workflow Execution.
Input must be in JSON format.
For multiple JSON objects, pass each in a separate --input
option.
Use null
for null values.
Alias: -i
Example
temporal workflow start --input '"your-input-value"'
--input_file
Pass input for the Workflow from a JSON file. For multiple JSON objects, concatenate them and use spaces or newline characters as separators. Input from the command line overwrites input from the file.
Example
temporal workflow start --input_file <filename>
--memo_key
Specify a key for a memo. For multiple keys, concatenate them and use spaces as separators.
Example
temporal workflow start --memo_key <key>
--memo
Specify a memo.
A memo is information in JSON format that can be shown when the Workflow is listed.
For multiple memos, concatenate them and use spaces as separators.
The order must match the order of keys in --memo_key
.
Example
temporal workflow start --memo <json>
--memo_file
Pass information for a memo from a JSON file.
For multiple JSON objects, concatenate them and use spaces or newline characters as separators.
The order must match the order of keys in --memo_key
.
Example
temporal workflow start --memo_file <filename>
--search_attr_key
Specify a Search Attribute name.
For multiple names, concatenate them and use pipes ( |
) as separators.
To list valid Search Attributes, use the temporal cluster get-search-attributes
command.
Example
temporal workflow start --search_attr_key <key>
--search_attr_value
Specify a Search Attribute value.
For multiple values, concatenate them and use pipes ( |
) as separators.
If a value is an array, use JSON format, such as ["a","b"]
, [1,2]
, ["true","false"]
, or ["2022-06-07T17:16:34-08:00","2022-06-07T18:16:34-08:00"]
.
To list valid Search Attributes and value types, use the temporal cluster get-search-attributes
command.
Example
temporal workflow start --search_attr_value <value>
--workflow_type
Specify the name of a Workflow Type.
Alias: -wt
Example
temporal workflow start --workflow_type YourWorkflowName
--workflow_id
Specify the ID for a Workflow Execution
Alias: -w
Example
temporal workflow start --workflow_id <id>
If a Workflow is started without providing an Id, the Client generates one in the form of a UUID. Temporal recommends using a business id rather than the client-generated UUID.
--taskqueue
Specify the name of a Task Queue.
The default is default
.
Alias: -tq
Example
temporal workflow start --taskqueue <name>
--execution_timeout
Specify the Start-To-Close Timeout of the Workflow Execution in seconds. The default value is 0.
Example
temporal workflow start --execution_timeout <seconds>
--workflow_task_timeout
Specify the Start-To-Close Timeout of the Workflow Task in seconds. The default value is 10.
Example
temporal workflow start --workflow_task_timeout <seconds>
--reason
Specify a reason for canceling or terminating the Workflow.
Example
temporal workflow terminate --workflow_id <id> --reason <string>
--event_id
Specify the eventId
of any event after WorkflowTaskStarted
to which you want to reset.
Valid values are WorkflowTaskCompleted
, WorkflowTaskFailed
, and WorkflowTaskTimeout
.
Example
temporal workflow reset --event_id <id>
--reset_type
Specify the event type to which you want to reset.
ValueDescriptionFirstWorkflowTask
Reset to the beginning of the Event History.LastWorkflowTask
Reset to the end of the Event History.LastContinuedAsNew
Reset to the end of the Event History for the previous Run.BadBinary
Reset to the point where a bad binary was used.
Example
temporal workflow reset --reset_type <value>
--reset_bad_binary_checksum
Specify the binary checksum when using --reset_type BadBinary
.
Example
temporal workflow reset --reset_bad_binary_checksum <value>
--reset_reapply_type
Specify the types of events to reapply after the reset point.
Valid values are All
, Signal
, and None
. The default is All
.
Example
temporal workflow reset --reset_reapply_type <value>
--input_parallism
Specify the number of goroutines to run in parallel. Each goroutine processes one line for every second. The default is 1.
Example
temporal workflow reset-batch --input_parallism <value>
--skip_current_open
Indicate that a Workflow Execution should be skipped if the current Run is open for the same Workflow Id as the base Run.
Example
temporal workflow reset-batch --skip_current_open
--skip_base_is_not_current
Indicate that a Workflow Execution should be skipped if the base Run is not the current Run.
Example
temporal workflow reset-batch --skip_base_is_not_current
--only_non_deterministic
Indicate that a Workflow Execution should be reset only if its last event is WorkflowTaskFailed
with a non-deterministic error.
Example
temporal workflow reset-batch --only_non_deterministic
--dry_run
Simulate use of the temporal workflow reset-batch
command without resetting any Workflow Executions.
Output is logged to stdout
.
Example
temporal workflow reset-batch --dry_run
--search_attr_value
Specify a Search Attribute value.
For multiple values, concatenate them and use pipes ( |
) as separators.
If a value is an array, use JSON format, such as ["a","b"]
, [1,2]
, ["true","false"]
, or ["2022-06-07T17:16:34-08:00","2022-06-07T18:16:34-08:00"]
.
To list valid Search Attributes and value types, use the temporal cluster get-search-attributes
command.
Example
temporal workflow start --search_attr_value <value>
--signal_name
Specify the name of a Signal.
Example
temporal workflow signal --query <value> --signal_name <name>
--input
Pass input for the Query. Input must be in JSON format. For multiple JSON objects, concatenate them and use spaces as separators.
Alias: -i
Example
temporal workflow query --input <json>
--input_file
Pass input for the Query from a JSON file. For multiple JSON objects, concatenate them and use spaces or newline characters as separators. Input from the command line overwrites input from the file.
Example
temporal workflow query --input_file <filename>
--query_type
Specify the type of Query to run.
Example
temporal workflow query --query_type <value>
--query
Specify an SQL-like query of Search Attributes. This modifier is used for commands that either start, list, describe, or terminate Workflow Executions.
Alias: -q
Example
temporal workflow start --query <value>
--job_id
Specify the job ID of a batch job.
Example
temporal batch describe --job_id <id>
--taskqueue
Specify the name of a Task Queue.
The default is default
.
Alias: -tq
Example
temporal workflow start --taskqueue <name>
--workflow_id
Specify a Workflow Id.
Alias: -w
Example
temporal workflow start --workflow_id <id>
--run_id
Specify a Run Id.
Alias: -r
Example
temporal workflow start --run_id <id>
--namespace_id
Specify the ID of a Namespace to describe.
Example
temporal namespace describe --namespace_id <id>
--shard_id
Specify the ID of a shard to close or list tasks for.
Example
temporal admin shard close_shard --shard_id <id>
--task_id
Specify the Task Id of a Task.
This is used with the --task_type
modifier for the temporal admin shard describe_task
command.
Example
temporal admin shard describe_task --task_id <id> --task_type transfer
--task_type
Specify the type of Task.
ValueDescriptiontransfer
Transfer tasks.timer
Timer tasks.replication
Replication tasks.visibility
Visibility tasks
Example
temporal admin shard describe_task --task_id <id> --task_type transfer
--task_timestamp
Specify a Task Visibility timestamp.
This is used with the --task_id
and --task_type
modifiers for the temporal admin shard describe_task
command.
Example
temporal admin shard describe_task --task_id <id> --task_type transfer --task_timestamp <timestamp>
--earliest_time
Specify the earliest start time to list. Supported format are as follows:
<year>-<month>-<day>T<hour>:<minute>:<second><+|-><offsethours>:<offsetminutes>
<n><duration
, where <n>
is a value between 0 and 1000000, and <duration>
is one of the following:
second
or s
minute
or m
hour
or h
day
or d
week
or w
month
or M
year
or y
Examples
To specify 3:04:05 PM India Standard Time on January 2, 2022:
temporal workflow list --earliest-time '2022-01-02T15:04:05+05:30'
To specify 15 minutes before the current time:
temporal workflow list --earliest-time '15minute'
--latest_time
Specify the latest start time to list. Supported formats are as follows:
<year>-<month>-<day>T<hour>:<minute>:<second><+|-><offsethours>:<offsetminutes>
<n><duration
, where <n>
is a value between 0 and 1000000, and <duration>
is one of the following:
second
or s
minute
or m
hour
or h
day
or d
week
or w
month
or M
year
or y
Alias: -lt
Examples
To specify 11:02:17 PM Pacific Daylight Time on April 13, 2022:
temporal workflow list --latest_time '2022-04-13T23:02:17-07:00'
To specify 10 seconds before the current time:
temporal workflow list --latest_time '10second'
--max_field_length
Specify the maximum length for each attribute field. The default value is 0.
Example
temporal workflow observe --max_field_length <length>
--more
List more than one page.
Example
temporal workflow list --more
--pagesize
Specify the maximum number of items to list on a page.
Example
temporal workflow list --pagesize <value>
--min_event_id
Specify the minimum eventId
to show in workflow history.
The default value is 0.
Example
temporal workflow show --min_event_id <id>
--max_event_id
Specify the maximum eventId
to show in workflow history.
The default value is 0.
Example
temporal workflow show --max_event_id <id>
--min_event_version
Specify the minimum Event version to show in workflow history. The default value is 0.
Example
temporal workflow show --min_event_version <id>
--max_event_version
Specify the maximum Event version to show in workflow history. The default value is 0.
Example
temporal workflow show --max_event_version <id>
--output_filename
Specify the filename where the output is written to.
Example
temporal workflow show --output_filename <filename>
--print_raw_time
Print the raw timestamp.
Example
temporal workflow list --print_raw_time
--print_datetime
Print the timestamp.
Example
temporal workflow list --print_datetime
--print_memo
Print a memo.
Example
temporal workflow list --print_memo
--print_search_attr
Print the Search Attributes.
Example
temporal workflow list --print_search_attr
--print_full
Print the full message without table formatting.
Example
temporal workflow list --print_full
--print_json
Print the raw JSON objects.
Example
temporal workflow list --print_json
--show_detail
Show event details.
Example
temporal workflow observe --show_detail
--yes
Disable the confirmation prompt.
Alias: y
Example
temporal workflow start --yes
--name
Specify the name of a Search Attribute or Signal.
Example
temporal workflow signal --query <value> --name <name>
--type
Specify the type of a Search Attribute or the type to decode a payload to.
Example
temporal operator search-attribute create --name <name> --type <type>
--db_engine
Type of DB engine to use
Default: cassandra
Value: cassandra
| mysql
| postgres
Example
temporal admin dlq purge --db_engine cassandra
--db_address
Persistence address for the database.
Default: 127.0.0.1
Example
temporal admin dlq purge --db_address <address>
--db_port
Persistence port for the DB.
Default: 9042
Example
temporal admin dlq purge --db_port <port>
--username
DB username.
Example
temporal admin dlq purge --username <username>
--password
DB password.
Example
temporal admin dlq purge --password <password>
--keyspace
Database keyspace
Default: "temporal"
Example
temporal admin dlq purge --keyspace <keyspace>
--cluster
Specify a Cluster name.
Example
Is your feature request related to a problem? Please describe.
Unable to add more than the small pre-allocated number of custom search attributes when using the CLI server:
https://github.com/temporalio/cli/issues/318
The main idea of the CLI server is an easy-to-use dev version of the server. This hard (unconfigurable) upper limit makes the CLI server unusable in dev for some use cases.
Describe the solution you'd like
Have a large upper limit—one that's much less likely to be run into.
Workaround
Going back to docker compose (worse DX and at this point much less discoverable, since we changed our docs/tutorials/samples to reference the CLI).