CLI Reference
The tensorify CLI is how you run, test, and export workflows from your terminal.
npm install -g @tensorify.io/cli
tensorify --version
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.io → Settings → API Keys.
Connect your local machine to the canvas editor for development and testing.
tensorify watch <workflowId> [options]
Registers a dev listener and waits for test execution signals from the canvas editor. When you click Test → Run 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.
| Flag | Description |
|---|---|
-d, --dev | Use the development API endpoint |
-p, --prod | Use the production API endpoint (default) |
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...
Run a workflow as a production listener that processes real incoming requests.
tensorify run <workflowId> [options]
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.
| Flag | Description |
|---|---|
-d, --dev | Use the development API endpoint |
-p, --prod | Use the production API endpoint (default) |
-v, --version <version> | Pin to a specific workflow version |
-b, --branch <branch> | Use a specific workflow branch |
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.
Export a workflow as a self-contained Docker-ready bundle.
tensorify export <workflowId> [options]
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.
| Flag | Description |
|---|---|
-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, --dev | Use the development API endpoint |
-p, --prod | Use the production API endpoint (default) |
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
Download the generated Python source code for a workflow to inspect or modify it.
tensorify clone <workflowId> [destination] [options]
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.
| Flag | Description |
|---|---|
-f, --force | Overwrite the destination if it already exists |
-d, --dev | Use the development API endpoint |
-p, --prod | Use the production API endpoint (default) |
-v, --version <version> | Clone a specific workflow version |
-b, --branch <branch> | Clone a specific workflow branch |
tensorify clone wf_abc123 ./workflow-source
# Output:
# ✓ Cloning workflow: my-workflow → ./workflow-source/
# ✓ Done
View your workspace's current usage and billing information.
tensorify usage [options]
Displays your current plan, webhook call count, and compute time usage for the billing period.
| Flag | Description |
|---|---|
-t, --teamspace-id <id> | Show usage for a specific teamspace |
-d, --dev | Use the development API endpoint |
-p, --prod | Use the production API endpoint (default) |
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
| Flag | Description |
|---|---|
-v, --version | Print the CLI version and exit |
--help | Show help for any command |
- Running Workflows — understand when to use
watchvsrunvsexport - Deploying Workflows — configure execution modes and triggers
