Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Tracktile CLI

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

Install globally via npm:

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

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

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

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

Control output format with --output:

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

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"
}

Manage inventory locations and flow nodes.

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

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

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"

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"

Get help for any command:

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

Check the installed CLI version:

tt --version