Proud winners of the 2026 CFIN Foodtech Frontier Awards. Learn more →

Tracktile CLI

Command-line interface for the Tracktile platform

The Tracktile CLI (tt) provides command-line access to the Tracktile platform for automation, scripting, and device management.

#Installation

Install globally via npm:

# npm
npm install -g @tracktile/cli
 
# pnpm
pnpm install -g @tracktile/cli
 
# yarn
yarn global add @tracktile/cli

#Configuration

#API Token

The CLI requires a valid Tracktile API token. Provide it via the TRACKTILE_TOKEN environment variable or the --token flag:

# Environment variable (recommended)
export TRACKTILE_TOKEN=cli-YOUR_TOKEN_HERE
 
# Command-line flag
tt --token=cli-YOUR_TOKEN_HERE auth identity

#Endpoint

The CLI defaults to https://api.tracktile.io. Override with --endpoint:

tt --endpoint=https://api-next.dev.tracktile.io auth identity

#Output Format

Control output format with --output:

FormatDescription
jsonJSON output (default)
tableHuman-readable table
tt --output=table locations list

#Commands

#auth

Identity management commands.

# Check current identity
tt auth identity

Example output:

{
  "id": "57cf9a81-1054-4bf1-8a3e-41304ff1b9f1",
  "tenantId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john@example.com"
}

#locations

Manage inventory locations and flow nodes.

# List all locations/stages in your flow
tt locations list

Output includes: name, behaviour type, traits, and status.

#webhooks

Manage webhook subscriptions.

# List all webhooks
tt webhooks list
 
# Register a new webhook
tt webhooks register --name="My Webhook" --on="inventory.received" --url="https://example.com/webhook"

#devices

Manage IoT devices and relays.

# List all devices in your registry
tt devices registry list
 
# List all relays
tt devices relays list
 
# Register a new relay
tt devices relays register --hardwareId="RELAY-001"

#subscribe

Stream your tenant's events to stdout as JSON.

# One event
tt subscribe --pattern="order.created"
 
# Every event in a category
tt subscribe --pattern="shipment.*"
 
# Every event
tt subscribe --pattern="*"

#Help

Get help for any command:

tt --help
tt auth --help
tt webhooks --help
tt devices --help

#Version

Check the installed CLI version:

tt --version