Tendrl CLI: Strand Commands

Everything under tendrl-cli strand uses your Strand API key (STRAND_API_KEY). Bodies go via --data '<json>' / --file body.json; fields marked required are enforced by the API.

workflows#

workflows create / update#

bash

tendrl-cli strand workflows create -d '{
  "account_id": "377036796",
  "name": "temp-alerts",
  "description": "Alert when a sensor runs hot",
  "tags": ["telemetry"],
  "is_active": true
}'
Field Type Notes
account_id string required — your account number (see tendrl-cli whoami)
name string required, ≤ 200 chars
description string ≤ 2000 chars
tags array 1–10 tags; Contact messages carrying a matching tag can trigger the workflow
exposed_to_contact bool show this workflow in the Contact console (default false)
allowed_sources array entity-name patterns allowed to trigger it
is_active bool default true
schedule_type / schedule_expr / schedule_timezone / schedule_payload built-in scheduler; see workflows schedule-presets for ready-made expressions

update takes the same fields, all optional (account_id still required by the API).

workflows save#

Every save mints a new immutable version of the graph:

bash

tendrl-cli strand workflows save <workflow-id> -f graph.json

Body — the graph itself:

Field Type Notes
nodes object required — node id → node config ({"type": "...", "config": {...}}); node types from tendrl-cli api strand GET /node-types
edges array required — [{"from": "n1", "to": "n2"}, ...]
variables object workflow variables available to templates

workflows run#

bash

tendrl-cli strand workflows run <workflow-id> -d '{"temp": 71.2}'
tendrl-cli strand workflows run <workflow-id> --version <version-id>

The payload you pass with -d becomes the run's input data. Runs are queued — a 503 means the run queue is full; retry after the retry_after it reports.

workflows export / import / versions / delete#

bash

tendrl-cli strand workflows export <workflow-id> --out backup.json
tendrl-cli strand workflows import backup.json --name restored-copy
tendrl-cli strand workflows versions <workflow-id>
tendrl-cli strand workflows delete <workflow-id> -y

export/import round-trip as JSON files — the natural way to move a workflow between accounts or keep it in git.

runs#

bash

tendrl-cli strand runs list --status running --limit 20
tendrl-cli strand runs get <run-id>
tendrl-cli strand runs steps <run-id>
tendrl-cli strand runs cancel <run-id> --reason "bad input"

list filters: --status (queued, running, waiting_approval, completed, completed_with_errors, failed, cancelled), --limit, --offset.

Workflow runs in tendrl-cli — completed in green, failed in red with the run's error

runs approve / reject#

A run paused on an approval node shows a step with status waiting_approval in runs steps:

bash

tendrl-cli strand runs approve <run-id> <step-run-id> --comment "looks right"
tendrl-cli strand runs reject <run-id> <step-run-id> --comment "wrong target"

connectors#

bash

tendrl-cli strand connectors types        # what connector types exist
tendrl-cli strand connectors ai-models    # available AI models by provider

connectors create / test#

bash

tendrl-cli strand connectors create -d '{
  "name": "internal-api",
  "connector_type": "http",
  "config": {"base_url": "https://api.example.com"}
}'
Field Type Notes
name string required
connector_type string required — from connectors types (e.g. http, ai-anthropic, postgres, slack)
config object required — type-specific; each type's fields are documented under Connectors
description string
is_active bool default true

connectors test -d '{...}' takes the same connector_type + config and checks connectivity without saving.

bash

tendrl-cli strand connectors list --type http
tendrl-cli strand connectors get <connector-id>
tendrl-cli strand connectors delete <connector-id> -y

functions#

Reusable Python, callable from workflow nodes.

bash

tendrl-cli strand functions create -d '{"name":"double","code":"def handler(data):\n    return {\"x\": data.get(\"x\", 0) * 2}"}'
tendrl-cli strand functions test <function-id> -d '{"x": 21}'
tendrl-cli strand functions test --code-file ./fn.py -d '{"x": 21}'   # test unsaved code

Create body: name (required), code (required, ≤ 10 000 chars, must define handler(data)), description. test's -d is the test payload passed to handler.

vault#

Encrypted secrets, referenced from workflow configs; values are never returned by the API.

bash

tendrl-cli strand vault set SLACK_TOKEN            # value prompted, hidden
tendrl-cli strand vault set DB_PASSWORD 's3cret' --description "prod read replica"
tendrl-cli strand vault list
tendrl-cli strand vault delete <vault-id> -y

configurations#

Named JSON blobs workflows can read.

bash

tendrl-cli strand configurations create -d '{"name":"thresholds","config_type":"generic","config_data":{"temp_max":80}}'

Body: name (required), config_type (required), config_data (required, object).

templates#

bash

tendrl-cli strand templates list --category monitoring
tendrl-cli strand templates get <template-id>
tendrl-cli strand templates readiness <template-id>   # what it needs before it can run for you
tendrl-cli strand templates use <template-id> --name my-copy

keys, team, roles#

bash

tendrl-cli strand keys create -d '{"name":"ci-key","role_id":"<role-id>"}'
tendrl-cli strand keys rotate <key-id>

Key body: name (required), description, role_id (from roles list; defaults to the Editor role). Tokens shown once. Creating keys requires an account admin/owner.

bash

tendrl-cli strand team list
tendrl-cli strand team invite [email protected] --role Viewer   # role names resolve to ids
tendrl-cli strand team set-role <user-id> Editor
tendrl-cli strand team remove <user-id> -y
tendrl-cli strand roles list
tendrl-cli strand roles permissions      # every assignable permission id

usage, audit, whoami#

bash

tendrl-cli strand usage current | history | breakdown | summary
tendrl-cli strand audit --resource-type workflow --limit 50    # Standard plan and up
tendrl-cli strand whoami                                       # account + role behind your key