Skip to main content

Temporal CLI nexus command reference

View Markdown

This page provides a reference for the temporal CLI nexus command. The flags applicable to each subcommand are presented in a table within the heading for the subcommand. Refer to Global Flags for flags that you can use with every subcommand.

operation

These commands manage Nexus Operation Executions.

Nexus Operation commands follow this syntax:

temporal nexus operation [command] [options]

cancel

Request cancellation of a Nexus Operation.

temporal nexus operation cancel \
--operation-id YourOperationId

The Operation handler determines how to handle the cancellation request.

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--operation-idYesstring Nexus Operation ID.
--reasonNostring Reason for cancellation.
--run-id, -rNostring Run ID of the Nexus Operation.

count

Return a count of Nexus Operations. Use --query to filter the operations to be counted.

temporal nexus operation count \
--query 'Endpoint="YourEndpoint"'

Visit https://docs.temporal.io/visibility to read more about Search Attributes and queries.

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--query, -qNostring Query to filter Nexus Operation Executions to count.

describe

Display detailed information about a specific Nexus Operation Execution.

temporal nexus operation describe \
--operation-id YourOperationId

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--operation-idYesstring Nexus Operation ID.
--rawNobool Print properties without changing their format.
--run-id, -rNostring Run ID of the Nexus Operation.

execute

Start a new Nexus Operation Execution and block until it completes. The result is output to stdout.

temporal nexus operation execute \
--endpoint YourEndpoint \
--service YourService \
--operation YourOperation \
--operation-id YourOperationId \
--input '{"some-key": "some-value"}'

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--endpointYesstring Nexus Endpoint name.
--id-conflict-policyNostring-enum Policy for handling an Operation ID conflict with a running operation. Accepted values: Fail, UseExisting, TerminateExisting.
--id-reuse-policyNostring-enum Policy for re-using an Operation ID from a previously closed operation. Accepted values: AllowDuplicate, RejectDuplicate.
--input, -iNostring[] Input value. Use JSON content or set --input-meta to override. Can't be combined with --input-file. Can be passed multiple times to pass multiple arguments.
--input-base64Nobool Assume inputs are base64-encoded and attempt to decode them.
--input-fileNostring[] A path or paths for input file(s). Use JSON content or set --input-meta to override. Can't be combined with --input. Can be passed multiple times to pass multiple arguments.
--input-metaNostring[] Input payload metadata as a KEY=VALUE pair. When the KEY is "encoding", this overrides the default ("json/plain"). Can be passed multiple times. Repeated metadata keys are applied to the corresponding inputs in the provided order.
--operationYesstring Nexus Operation name.
--operation-idYesstring Nexus Operation ID.
--schedule-to-close-timeoutNoduration Total time the operation is allowed to run.
--schedule-to-start-timeoutNoduration Maximum time to wait for an operation to be started (or completed synchronously) by a handler.
--search-attributeNostring[] Search Attribute in KEY=VALUE format. Keys must be identifiers, and values must be JSON values. For example: 'YourKey={"your": "value"}'. Can be passed multiple times.
--serviceYesstring Nexus Service name.
--start-to-close-timeoutNoduration Maximum time to wait for an asynchronous operation to complete after it has been started.
--static-summaryNostring Static summary for the Nexus Operation for human consumption in UIs. Uses Temporal Markdown formatting, should be a single line. (Experimental)

list

List Nexus Operations. Use --query to filter results.

temporal nexus operation list \
--query 'Endpoint="YourEndpoint"'

Visit https://docs.temporal.io/visibility to read more about Search Attributes and queries.

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--limitNoint Maximum number of Nexus Operation Executions to display.
--page-sizeNoint Maximum number of Nexus Operation Executions to fetch at a time from the server.
--query, -qNostring Query to filter the Nexus Operation Executions to list.

result

Wait for a Nexus Operation to complete and output the result.

temporal nexus operation result \
--operation-id YourOperationId

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--operation-idYesstring Nexus Operation ID.
--run-id, -rNostring Run ID of the Nexus Operation.

start

Start a new Nexus Operation. Outputs the Operation ID and Run ID.

temporal nexus operation start \
--endpoint YourEndpoint \
--service YourService \
--operation YourOperation \
--operation-id YourOperationId \
--input '{"some-key": "some-value"}'

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--endpointYesstring Nexus Endpoint name.
--id-conflict-policyNostring-enum Policy for handling an Operation ID conflict with a running operation. Accepted values: Fail, UseExisting, TerminateExisting.
--id-reuse-policyNostring-enum Policy for re-using an Operation ID from a previously closed operation. Accepted values: AllowDuplicate, RejectDuplicate.
--input, -iNostring[] Input value. Use JSON content or set --input-meta to override. Can't be combined with --input-file. Can be passed multiple times to pass multiple arguments.
--input-base64Nobool Assume inputs are base64-encoded and attempt to decode them.
--input-fileNostring[] A path or paths for input file(s). Use JSON content or set --input-meta to override. Can't be combined with --input. Can be passed multiple times to pass multiple arguments.
--input-metaNostring[] Input payload metadata as a KEY=VALUE pair. When the KEY is "encoding", this overrides the default ("json/plain"). Can be passed multiple times. Repeated metadata keys are applied to the corresponding inputs in the provided order.
--operationYesstring Nexus Operation name.
--operation-idYesstring Nexus Operation ID.
--schedule-to-close-timeoutNoduration Total time the operation is allowed to run.
--schedule-to-start-timeoutNoduration Maximum time to wait for an operation to be started (or completed synchronously) by a handler.
--search-attributeNostring[] Search Attribute in KEY=VALUE format. Keys must be identifiers, and values must be JSON values. For example: 'YourKey={"your": "value"}'. Can be passed multiple times.
--serviceYesstring Nexus Service name.
--start-to-close-timeoutNoduration Maximum time to wait for an asynchronous operation to complete after it has been started.
--static-summaryNostring Static summary for the Nexus Operation for human consumption in UIs. Uses Temporal Markdown formatting, should be a single line. (Experimental)

terminate

Terminate a Nexus Operation.

temporal nexus operation terminate \
--operation-id YourOperationId \
--reason YourReason

Operation handlers cannot see or respond to terminations.

Use the following options to change the behavior of this command. You can also use any of the global flags that apply to all subcommands.

FlagRequiredDescription
--operation-idYesstring Nexus Operation ID.
--reasonNostring Reason for termination. Defaults to a message with the current user's name.
--run-id, -rNostring Run ID of the Nexus Operation.

Global Flags

The following options can be used with any command.

FlagRequiredDescriptionDefault
--addressNostring Temporal Service gRPC endpoint.localhost:7233
--api-keyNostring API key for request.
--client-authorityNostring Temporal gRPC client :authority pseudoheader.
--client-connect-timeoutNoduration Client connection timeout.
--codec-authNostring Authorization header for Codec Server requests.
--codec-endpointNostring Remote Codec Server endpoint.
--codec-headerNostring[] HTTP headers for codec server (KEY=VALUE, repeatable).
--colorNostring-enum Output coloring. Accepted values: always, never, auto.auto
--command-timeoutNoduration Command execution timeout.
--config-fileNostring TOML config file path.
--disable-config-envNobool Disable loading config from environment variables.
--disable-config-fileNobool Disable loading config from file.
--envNostring Active environment name (ENV).default
--env-fileNostring Path to environment settings file.
--grpc-metaNostring[] HTTP headers for requests (KEY=VALUE, repeatable).
--identityNostring Identity of the client submitting requests.
--log-formatNostring-enum Log format. Accepted values: text, json.text
--log-levelNostring-enum Log level. Default is "never" for most commands and "warn" for "server start-dev". Accepted values: debug, info, warn, error, never.never
--namespace, -nNostring Temporal Service Namespace.default
--no-json-shorthand-payloadsNobool Raw payload output, even if the JSON option was used.
--output, -oNostring-enum Non-logging data output format. Accepted values: text, json, jsonl, none.text
--profileNostring Configuration profile to use. Overrides the TEMPORAL_PROFILE environment variable and defaults to "default".
--time-formatNostring-enum Time format. Accepted values: relative, iso, raw.relative
--tlsNobool Enable base TLS encryption. Auto-enabled when api-key or TLS options are set.
--tls-ca-dataNostring Inline server CA certificate data.
--tls-ca-pathNostring Path to server CA certificate.
--tls-cert-dataNostring Inline x509 certificate data.
--tls-cert-pathNostring Path to x509 certificate.
--tls-disable-host-verificationNobool Disable TLS host-name verification.
--tls-key-dataNostring Inline x509 private key data.
--tls-key-pathNostring Path to x509 private key.
--tls-server-nameNostring Override target TLS server name.