CLI Reference

The tensorify CLI is how you run, test, and export workflows from your terminal.

Installation

npm install -g @tensorify.io/cli
tensorify --version

Authentication

All commands require a TENSORIFY_API_KEY. Set it once in your shell:

export TENSORIFY_API_KEY="your_key_here"

Get your key from app.tensorify.ioSettingsAPI Keys.


tensorify watch

Connect your local machine to the canvas editor for development and testing.

tensorify watch <workflowId> [options]

What it does

Registers a dev listener and waits for test execution signals from the canvas editor. When you click TestRun to Selected in the editor, the workflow executes on your machine up to the node you selected. Outputs appear in both the terminal and the editor.

watch only processes test signals from the editor. It does not handle real incoming webhooks or API requests. Use tensorify run for production.

Flags

FlagDescription
-d, --devUse the development API endpoint
-p, --prodUse the production API endpoint (default)

Example

export TENSORIFY_API_KEY=re_live_...
tensorify watch wf_abc123

# Output:
# ✓ Connected to Tensorify
# ✓ Watching workflow: my-workflow
#   Waiting for test signals from the editor...

tensorify run

Run a workflow as a production listener that processes real incoming requests.

tensorify run <workflowId> [options]

What it does

Registers your machine as an active runner in Tensorify's system. Any real webhook or API trigger request routed to this workflow will be forwarded to your process via WebSocket and executed locally.

Keep this process alive in production using pm2, systemd, a Docker container, or a similar process manager.

Flags

FlagDescription
-d, --devUse the development API endpoint
-p, --prodUse the production API endpoint (default)
-v, --version <version>Pin to a specific workflow version
-b, --branch <branch>Use a specific workflow branch

Example

tensorify run wf_abc123

# Output:
# ✓ Connected to Tensorify
# ✓ Runner registered for workflow: my-workflow
#   Listening for incoming triggers...

# When a webhook fires:
# → Received trigger: POST /webhook
# ✓ Execution completed in 342ms

Your workflow's execution mode must be set to CLI or Auto for run to receive requests. If it is set to Managed, requests go to the Tensorify cloud, not your runner. See Deploying Workflows.


tensorify export

Export a workflow as a self-contained Docker-ready bundle.

tensorify export <workflowId> [options]

What it does

Downloads the compiled Python files and a requirements.txt for the workflow. The output can be run as a standalone process or built into a Docker image without the Tensorify CLI.

Flags

FlagDescription
-o, --output <dir>Output directory (default: ./tensorify-export)
-v, --version <version>Export a specific workflow version
-b, --branch <branch>Export a specific workflow branch
-d, --devUse the development API endpoint
-p, --prodUse the production API endpoint (default)

Example

tensorify export wf_abc123 --output ./my-workflow

# Output:
# ✓ Exporting workflow: my-workflow
# ✓ Writing main.py
# ✓ Writing utils.py
# ✓ Writing requirements.txt
# ✓ Export complete → ./my-workflow/

# Run locally:
cd my-workflow
pip install -r requirements.txt
python main.py

tensorify clone

Download the generated Python source code for a workflow to inspect or modify it.

tensorify clone <workflowId> [destination] [options]

What it does

Fetches the Python code generated from your workflow graph and writes it to disk. Use this to understand what Tensorify generates, audit the code, or use it as a starting point for a custom implementation.

Flags

FlagDescription
-f, --forceOverwrite the destination if it already exists
-d, --devUse the development API endpoint
-p, --prodUse the production API endpoint (default)
-v, --version <version>Clone a specific workflow version
-b, --branch <branch>Clone a specific workflow branch

Example

tensorify clone wf_abc123 ./workflow-source

# Output:
# ✓ Cloning workflow: my-workflow → ./workflow-source/
# ✓ Done

tensorify usage

View your workspace's current usage and billing information.

tensorify usage [options]

What it does

Displays your current plan, webhook call count, and compute time usage for the billing period.

Flags

FlagDescription
-t, --teamspace-id <id>Show usage for a specific teamspace
-d, --devUse the development API endpoint
-p, --prodUse the production API endpoint (default)

Example

tensorify usage

# Output:
# Workspace: my-team
# Plan: Pro
# Period: May 1 – May 31, 2026
# Webhook calls: 4,821 / 50,000
# Compute time: 12m 30s / unlimited

Global Flags

FlagDescription
-v, --versionPrint the CLI version and exit
--helpShow help for any command

Next Steps

On this page