CLI Reference

The tensorify CLI authenticates with Tensorify, runs a runner on your machine, and exports workflow code.

Installation

Linux & macOS:

curl -fsSL https://cli.tensorify.io/install | sh

Windows (PowerShell):

irm https://cli.tensorify.io/install.ps1 | iex
tensorify --version

Setup flow

Local machine (has a browser):

tensorify init
tensorify login
tensorify runner start

VPS / headless server (no browser):

tensorify init --name my-vps --api-key tfk_your_key_here
tensorify runner start

Docker container:

docker run -e TENSORIFY_API_KEY=tfk_your_key my-runner

Get an API key from SettingsAPI Keys in the web app. On a VPS, use sudo tensorify runner install to run the runner as a systemd service instead of keeping a terminal open. See Installation for Docker image setup.


tensorify init

Create the local runner configuration file.

tensorify init [options]

What it does

Creates ~/.tensorify/config.json with your runner name, API endpoints, and optionally an API key. If --name is not passed and stdin is a terminal, you will be prompted interactively. On non-interactive shells (e.g. SSH scripts), it defaults to the hostname.

Flags

FlagDescription
--name <name>Runner name (defaults to hostname). Must be unique within your workspace.
--api-key <key>API key for authentication. Stored in config so you don't need tensorify login.
--devUse the development API endpoint

Example

# Local machine (browser login):
tensorify init
tensorify login
tensorify runner start

# VPS (API key, no browser needed):
tensorify init --name production-vps --api-key tfk_abc123
tensorify runner start

tensorify runner start

Start the multi-workflow runner in the foreground. One runner process can serve every workflow you deploy to it from the UI.

tensorify runner start [options]

What it does

Registers your machine with Tensorify and maintains a WebSocket connection. While connected:

  • Test runs from the canvas editor execute on your machine
  • Deployed workflows with CLI or Auto execution mode route real webhook and API triggers to this runner

Leave this process running during development. In production, use tensorify runner install or a process manager.

Flags

FlagDescription
-d, --devUse the development API endpoint

Example

tensorify runner start

Deploy workflows from the canvas Deploy dialog after the runner is connected. You do not pass a workflow ID on the command line.


tensorify runner install

Install the runner as a system service (systemd on Linux, launchd on macOS).

sudo tensorify runner install    # Linux
tensorify runner install          # macOS (user-level launchd)

What it does

Creates a service unit that starts tensorify runner start on boot and restarts it on failure. On Linux, it also runs systemctl daemon-reload, enables the service, and starts it immediately. Use this on VPS and production servers instead of keeping a terminal open.

runner install is supported on Linux (systemd) and macOS (launchd). Windows is not supported — use a process manager or run in Docker instead.

Example

# Full VPS setup (two commands):
tensorify init --name production-vps --api-key tfk_your_key_here
sudo tensorify runner install

# Verify:
systemctl status tensorify-runner

tensorify runner uninstall

Remove the systemd or launchd service installed by runner install.

sudo tensorify runner uninstall    # Linux
tensorify runner uninstall          # macOS

tensorify login

Authenticate the CLI with your Tensorify workspace.

tensorify login [options]

What it does

Without --api-key, opens a browser-based sign-in flow and stores your session locally. With --api-key, stores the key directly in config — no browser needed.

Flags

FlagDescription
--api-key <key>Authenticate with an API key instead of opening a browser. Ideal for VPS and headless environments.
-d, --devUse the development API endpoint

Example

# Browser login (desktop):
tensorify login

# Headless login (VPS):
tensorify login --api-key tfk_abc123

You can also pass --api-key directly to tensorify init to configure and authenticate in one step.


tensorify logout

Remove stored credentials from this machine.

tensorify logout

tensorify whoami

Show the current authenticated user and workspace.

tensorify whoami

tensorify export

Export a workflow as Python source code.

tensorify export <workflowId> [options]

export requires a Team or Enterprise plan. Free and Pro users can run workflows via a connected runner but cannot export the generated code. Upgrade your plan.

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)
-d, --devUse the development API endpoint

Example

tensorify export wf_abc123 --output ./my-workflow

cd my-workflow
pip install -r requirements.txt
python main.py

tensorify runtime list

Show cached Python runtime versions stored locally.

tensorify runtime list

What it does

Lists all runtime wheel versions downloaded to ~/.tensorify/runtimes/. The CLI downloads runtime packages from runtime.tensorify.io on first use and caches them locally.


tensorify runtime clear

Remove all cached runtimes and virtual environments.

tensorify runtime clear

What it does

Deletes ~/.tensorify/runtimes/ and ~/.tensorify/cache/. The next workflow execution will re-download the runtime and re-create virtual environments. Use this to free disk space or resolve corrupted environments.


tensorify self-update

Update the CLI binary to the latest version.

tensorify self-update

What it does

Checks cli.tensorify.io/releases/latest.txt for the newest version. If a newer version is available, downloads the binary for your platform, verifies its SHA256 checksum, and replaces the current binary in-place.


Global Flags

These flags are available on all commands:

FlagDescription
--versionPrint the CLI version and exit
--devUse development API endpoints (localhost)
--verboseEnable verbose/debug output
--helpShow help for any command

Environment Variables

VariableDescription
TENSORIFY_API_KEYAPI key for authentication (overrides config file value at runtime)
TENSORIFY_API_URLOverride the API base URL
TENSORIFY_HOOKS_URLOverride the hooks/triggers service URL
TENSORIFY_CDN_URLOverride the runtime CDN URL

Configuration File

The CLI stores its configuration at ~/.tensorify/config.json:

{
  "runnerName": "my-server",
  "teamspaceId": "...",
  "apiKey": "tfk_...",
  "apiUrl": "https://app.tensorify.io",
  "hooksUrl": "https://triggers.tensorify.io",
  "cdnUrl": "https://runtime.tensorify.io"
}

This file is created by tensorify init and updated by tensorify login. Environment variables override values from this file.

Next Steps

On this page