Operating on Tier0 with Agents
Tier0 provides Skills and CLI commands that allow AI agents to operate on the platform.
Installing Skills and CLI
Section titled “Installing Skills and CLI”Choose the installer that matches your environment.
With Node.js
Section titled “With Node.js”If Node.js 16 or later is available, use npx to install the CLI and skills.
npx -y @tier0/cli@latest installThis runs the full installer and does two things:
- Installs the
tier0CLI binary into~/.tier0/bin/. - Installs the embedded Tier0 Skill baseline and synchronizes it to detected agents such as Codex, Claude Code, and more.
Without Node.js
Section titled “Without Node.js”-
Install the
tier0CLI binary.Terminal window curl -fsSL https://raw.githubusercontent.com/FREEZONEX/Tier0-cli/main/install.sh | bashTerminal window iwr https://raw.githubusercontent.com/FREEZONEX/Tier0-cli/main/install.ps1 | iex -
Download the latest Tier0 Skills and synchronize them to detected agents.
Terminal window tier0 skills update -
Verify the installed Skill version and health.
Terminal window tier0 skills status
Managing Skills
Section titled “Managing Skills”- Check the installed Skill version and health:
Terminal window tier0 skills status - Repair a missing or damaged embedded Skill baseline:
Terminal window tier0 skills install - Update to the latest Tier0 Skill:
Terminal window tier0 skills update
How Skills and CLI Work Together
Section titled “How Skills and CLI Work Together”Tier0 CLI provides executable commands, and Skills guide agents in choosing and safely using these commands.
Example
Section titled “Example”- Prompt: Check the current temperature of
Plant/Line1/Metric/Temperature. - Skill
tier0-uns- It tells the agent that a current value should be read from a full topic path, and selects the appropriate UNS read operation.
- CLI:
tier0 uns read Plant/Line1/Metric/Temperature --json
Skills
Section titled “Skills”| Skill | Purpose |
|---|---|
tier0 |
Routes Tier0 tasks to the appropriate skill and provides shared setup, authentication, and safety rules. |
tier0-uns |
Guides agents through UNS operations, including browse, read, write, history, search, create, update, delete, and restore. |
tier0-flow |
Guides agents through SourceFlow and EventFlow management, including inspection, export, creation, update, deployment, and deletion. |
tier0-mqtt |
Guides agents through MQTT credential management, publishing, and bounded real-time subscriptions. |
tier0-files |
Guides agents through Tier0 file operations, including upload, download, access URL generation, and deletion. |
CLI Operations
Section titled “CLI Operations”Setting Operating Instance
Section titled “Setting Operating Instance”Private deployments must configure the base URL before login. Once it’s configured, all the following commands will be executed on that instance.
tier0 config --base-url https://your-tier0.example.comtier0 login # interactive browser loginAuthentication
Section titled “Authentication”-
Set the API key you got from the operating Tier0 instance.
Terminal window tier0 config --api-key <api-key> -
Verify the API key identity and permissions.
Terminal window tier0 auth whoami --json -
Perform other operations with the
tier0CLI.
-
Get the browser authentication link.
Terminal window tier0 login --no-wait --json -
Go through authentication on the browser by accessing the returned
verification_url. -
Poll for the login result with the returned
setup_code.Terminal window tier0 login --setup-code <setup_code>
Previewing Operations
Section titled “Previewing Operations”Use --dry-run to validate and preview supported write operations without sending a request to Tier0.
Supported Operations
Section titled “Supported Operations”- UNS:
write/create/update/delete/restore - Flow:
create/update/delete/deploy - API:
tier0 api - MQTT:
auth create/auth delete/publish - Files:
delete
Examples
Section titled “Examples”tier0 uns write --topic demo --value '{"value":1}' --dry-runtier0 flow deploy --id 1 --flows-file flows.json --dry-run --jsontier0 api /openapi/v1/uns/write --body-file body.json --dry-run --jsontier0 mqtt auth create --name my-client --save my-client --dry-run --jsontier0 assets delete --file-path workspace/path/to/file.csv --dry-run --jsonReturned Previews
Section titled “Returned Previews”{ "ok": true, "dry_run": true, "data": { "api": [ {"method": "POST", "url": "https://tier0.dev/openapi/v1/uns/write", "body": {}} ] }}Handling Errors
Section titled “Handling Errors”With --json, command failures return a JSON object with the error message and code.
{"ok":false,"error":{"type":"validation","subtype":"invalid_argument","param":"--qos","message":"--qos must be 0, 1, or 2"}}Uninstalling Skills and CLI
Section titled “Uninstalling Skills and CLI”- Uninstallation Commands
# Remove the Tier0 CLI while keeping local configuration and skills.npx @tier0/cli@latest uninstall
# Remove the Tier0 CLI and delete local configuration, credentials and cache, but keep skills.npx @tier0/cli@latest uninstall --purge
# Remove skillsnpx @tier0/cli@latest uninstall --remove-skills
# Remove all of the abovenpx @tier0/cli@latest uninstall --purge --remove-skills- Global NPM Uninstallation
npm uninstall -g @tier0/cli- Manual Cleanup
rm -rf ~/.tier0/bin/tier0 ~/.tier0/skillsnpx -y --package=skills -- skills remove tier0 -y -gCLI Reference
Section titled “CLI Reference”Tier0 CLI Reference lists all CLI commands.
- Working with UNS Data — How to operate on your UNS model through MQTT and APIs.