CLI Reference
The tensorify CLI authenticates with Tensorify, runs a runner on your machine, and exports workflow code.
Linux & macOS:
curl -fsSL https://cli.tensorify.io/install | sh
Windows (PowerShell):
irm https://cli.tensorify.io/install.ps1 | iex
tensorify --version
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 Settings → API 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.
Create the local runner configuration file.
tensorify init [options]
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.
| Flag | Description |
|---|---|
--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. |
--dev | Use the development API endpoint |
# 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
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]
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.
| Flag | Description |
|---|---|
-d, --dev | Use the development API endpoint |
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.
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)
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.
# 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
Remove the systemd or launchd service installed by runner install.
sudo tensorify runner uninstall # Linux
tensorify runner uninstall # macOS
Authenticate the CLI with your Tensorify workspace.
tensorify login [options]
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.
| Flag | Description |
|---|---|
--api-key <key> | Authenticate with an API key instead of opening a browser. Ideal for VPS and headless environments. |
-d, --dev | Use the development API endpoint |
# 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.
Remove stored credentials from this machine.
tensorify logout
Show the current authenticated user and workspace.
tensorify whoami
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.
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) |
-d, --dev | Use the development API endpoint |
tensorify export wf_abc123 --output ./my-workflow
cd my-workflow
pip install -r requirements.txt
python main.py
Show cached Python runtime versions stored locally.
tensorify runtime list
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.
Remove all cached runtimes and virtual environments.
tensorify runtime clear
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.
Update the CLI binary to the latest version.
tensorify self-update
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.
These flags are available on all commands:
| Flag | Description |
|---|---|
--version | Print the CLI version and exit |
--dev | Use development API endpoints (localhost) |
--verbose | Enable verbose/debug output |
--help | Show help for any command |
| Variable | Description |
|---|---|
TENSORIFY_API_KEY | API key for authentication (overrides config file value at runtime) |
TENSORIFY_API_URL | Override the API base URL |
TENSORIFY_HOOKS_URL | Override the hooks/triggers service URL |
TENSORIFY_CDN_URL | Override the runtime CDN URL |
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.
- Running Workflows — runner setup, testing from the canvas, and production execution
- Deploying Workflows — configure execution modes and triggers from the UI
