Skip to content

CLI Commands Reference

Global flagsThese flags can be used with any tier0 command.
--jsonOutput raw JSON--debugPrint HTTP request/response details

Basic operations

tier0 doctorDiagnose local Tier0 CLI connectivity and auth

Usage

Terminal window
tier0 doctor

Notes

  • Checks local configuration, OpenAPI connectivity, API key presence, and API key identity.

Example

Terminal window
tier0 doctor
tier0 configView or update configuration

Usage

Terminal window
tier0 config

Flags

--base-url
Set the platform base URL
--api-key
Set the API key (alternative to tier0 login)
--lang
Deprecated compatibility flag; CLI output is English-onlydeprecated

Examples

Terminal window
tier0 config
Terminal window
tier0 config --base-url https://tier0.dev
Terminal window
tier0 config --api-key sk-per-xxxxxx
tier0 loginAuthenticate via Device Flow

Usage

Terminal window
tier0 login

Flags

--no-wait
Print the authorization URL and exit without polling
--setup-code
Poll for an existing setup code instead of creating a new one
--base-url
Override the platform base URL

Notes

  • Without --no-wait, the CLI polls every 5 seconds for up to 10 minutes.
  • With --no-wait --json, the CLI returns verification_url, setup_code, and expires_in.

Examples

Terminal window
tier0 login
Terminal window
tier0 login --no-wait --json
Terminal window
tier0 login --setup-code <setup_code>
tier0 apiCall an API endpoint directly

Usage

Terminal window
tier0 api <endpoint>

Flags

--body
Request body JSON string
--body-file
Read request body from file
--method
HTTP method (GET|POST|PUT|DELETE)default: POST
--dry-run
Preview the request without executing it

Notes

  • --body and --body-file are mutually exclusive.

Examples

Terminal window
tier0 api /openapi/v1/uns/browse --body '{"path":"/"}'
Terminal window
tier0 api /openapi/v1/uns/read --body '{"topics":["demo"]}'
Terminal window
tier0 api /openapi/v1/uns/write --body-file body.json
tier0 upgradeUpgrade CLI to the latest version

Usage

Terminal window
tier0 upgrade

Flags

--dry-run
Check for updates without installing
-v, --version
Upgrade to a specific version (default: latest)

Examples

Terminal window
tier0 upgrade
Terminal window
tier0 upgrade --dry-run
tier0 uninstallUninstall tier0 CLI

Usage

Terminal window
tier0 uninstall

Flags

--purge
Also delete config file (credentials)
--remove-skills
Also remove the Tier0 Skill from detected AI agents
--keep-skills
Keep agent skills (deprecated; this is now the default)deprecated

Notes

  • Agent Skills and config are kept by default.
  • The local bundled skills directory is removed during CLI uninstall.

Examples

Terminal window
tier0 uninstall
Terminal window
tier0 uninstall --purge
Terminal window
tier0 uninstall --remove-skills
Terminal window
tier0 uninstall --purge --remove-skills
tier0 versionShow version

Usage

Terminal window
tier0 version

Example

Terminal window
tier0 version

Skills

tier0 skills installInstall or repair the Skill embedded in this CLI

Usage

Terminal window
tier0 skills install

Flags

--force
Replace the active Skill with the embedded baseline
--no-sync
Install locally without syncing detected AI agents

Examples

Terminal window
tier0 skills install
Terminal window
tier0 skills install --force
tier0 skills listList installed skillsalias: ls

Usage

Terminal window
tier0 skills list

Example

Terminal window
tier0 skills list
tier0 skills updateUpgrade skills to the latest versionalias: upgrade

Usage

Terminal window
tier0 skills update

Flags

--dry-run
Check for updates without installing

Examples

Terminal window
tier0 skills update
Terminal window
tier0 skills update --dry-run
tier0 skills versionShow skills version infoalias: ver

Usage

Terminal window
tier0 skills version

Example

Terminal window
tier0 skills version
tier0 skills statusShow active and embedded Skill status

Usage

Terminal window
tier0 skills status

Example

Terminal window
tier0 skills status
tier0 skills syncSync the active Skill to detected AI agents

Usage

Terminal window
tier0 skills sync

Example

Terminal window
tier0 skills sync

Auth

tier0 auth whoamiShow current API key identity

Usage

Terminal window
tier0 auth whoami

Notes

  • Shows user, workspace, key name, key type, roles, and permissions.

Examples

Terminal window
tier0 auth whoami
Terminal window
tier0 auth whoami --json

UNS

tier0 uns browseBrowse UNS namespace tree

Usage

Terminal window
tier0 uns browse

Flags

-p, --path
Path to browse in the UNS treedefault: /
-d, --max-depth
Max recursion depth (0 = unlimited)default: 1
--include-metadata
Include node metadata
--include-leaf-value
Include leaf node values

Examples

Terminal window
tier0 uns browse
Terminal window
tier0 uns browse --path /devices
Terminal window
tier0 uns browse --path / --max-depth 2
tier0 uns searchSearch UNS topics

Usage

Terminal window
tier0 uns search

Flags

-k, --keyword
Search by name keyword
--path-prefix
Filter by path prefixdefault: /
--topic-type
Filter by topic type
--page
Page numberdefault: 1
-l, --size
Page size (max results)default: 20
--include-metadata
Include node metadata
--include-leaf-value
Include leaf node values

Examples

Terminal window
tier0 uns search --keyword temp
Terminal window
tier0 uns search --path-prefix /devices --size 50
Terminal window
tier0 uns search --keyword temp --include-metadata
tier0 uns readRead current value of UNS topics

Usage

Terminal window
tier0 uns read [topic...]
Terminal window
tier0 uns read --topic <topic>

Flags

-t, --topic
Topic name(s) to read (repeatable; positional args are also accepted)repeatable
--include-metadata
Include topic metadata (topicType, fields, description)
--include-leaf-value
Include leaf node values

Notes

  • At least one topic is required via positional args or --topic.

Examples

Terminal window
tier0 uns read demo
Terminal window
tier0 uns read --topic demo
Terminal window
tier0 uns read temp humidity
Terminal window
tier0 uns read --topic sensor1 --include-metadata
tier0 uns writeWrite value to a UNS topic

Usage

Terminal window
tier0 uns write

Flags

-t, --topic
Topic name to write to (required)required
-v, --value
JSON value string (mutually exclusive with --file)
-f, --file
Read value from file (mutually exclusive with --value)
--qos
MQTT QoS level (0/1/2)default: 0
--retain
Set MQTT retain flag
--dry-run
Preview the request without executing it

Notes

  • --value and --file are mutually exclusive.
  • The value must be a valid JSON object matching the topic fields.

Examples

Terminal window
tier0 uns write --topic demo --value '{"temp":25}'
Terminal window
tier0 uns write --topic demo --file payload.json
Terminal window
tier0 uns write --topic sensor1 --value '{"on":true}' --qos 1 --retain
tier0 uns historyQuery historical data for topics

Usage

Terminal window
tier0 uns history

Flags

-t, --topic
Topic name(s) (repeatable, required)requiredrepeatable
--start
Start time: relative (-1h/-30m/-7d), ISO 8601, or 'now' (required)required
--end
End time: relative, ISO 8601, or 'now' (default: now)default: now
--page
Page numberdefault: 1
-l, --size
Page size (max data points)default: 100
--interval
Aggregation interval (e.g. 1m, 1h, 1d)
--fn
Aggregation function (avg/max/min/sum/count)
--field
Aggregation field name

Examples

Terminal window
tier0 uns history -t demo --start -1h
Terminal window
tier0 uns history -t demo --start -24h --end now --fn avg --interval 1h
Terminal window
tier0 uns history -t demo --start 2026-01-01T00:00:00Z --end 2026-01-02T00:00:00Z
tier0 uns createCreate UNS namespace nodes

Usage

Terminal window
tier0 uns create

Flags

-t, --topic
Topic path or leaf name (required if not using --file)
--parent
Parent path prefix (optional, combined with --topic)
--type
Node type: 'path' (folder) or 'topic' (data point)
-d, --display-name
Display name
--description
Description
--alias
Alias
-f, --file
Read namespace definition from JSON file ({"namespace":[]} or bare array)
--topic-type
Deprecated: topic type is now derived from the path (Metric/Action/State folder before leaf)deprecated
--fields
Schema fields JSON array
--fields-file
Read schema fields JSON array from file
--dry-run
Preview the request without executing it

Notes

  • When not using --file, --topic and --type are required.
  • --fields and --fields-file are mutually exclusive.
  • For topic nodes, the segment immediately before the leaf must be Metric, Action, or State.

Examples

Terminal window
tier0 uns create --topic Plant/Line1/Metric/Temperature --type topic
Terminal window
tier0 uns create --parent Factory1/Line1/Station1 --topic Metric/ProductionCount --type topic
Terminal window
tier0 uns create --topic Plant/Line1 --type path --display-name 'Line 1'
Terminal window
tier0 uns create --file namespace.json
tier0 uns updateUpdate UNS topic metadata

Usage

Terminal window
tier0 uns update

Flags

-p, --path
Topic path to update (required)required
-n, --name
New name
--alias
New alias
--description
New description
--clear-description
Clear the description without relying on an empty shell argument
-d, --display-name
New display name
--extend-properties
Extended properties JSON object
--fields
Schema fields JSON array
--fields-file
Read schema fields JSON array from file
--update-mask
Fields to update (repeatable, e.g. name,description,fields)repeatable
--dry-run
Preview the request without executing it

Notes

  • --description and --clear-description are mutually exclusive.
  • --fields and --fields-file are mutually exclusive.
  • At least one field to update is required.

Examples

Terminal window
tier0 uns update --path Plant/Line1/Metric/Temperature --display-name 'Line 1 Temp'
Terminal window
tier0 uns update --path Plant/Line1 --description 'Production line 1' --update-mask description
Terminal window
tier0 uns update --path Plant/Line1/Metric/Temperature --fields '[{"name":"temp","type":"float","unit":"C"}]' --update-mask fields
tier0 uns deleteDelete UNS node(s)

Usage

Terminal window
tier0 uns delete

Flags

-p, --path
Node path(s) to delete (repeatable, required)requiredrepeatable
--hard
Hard delete (irreversible)
-y, --yes
Confirm high-risk operation (required)required
--dry-run
Preview the request without executing it

Notes

  • Soft delete is the default and can be restored.
  • --hard is irreversible.
  • High-risk execution requires --yes unless using --dry-run.

Examples

Terminal window
tier0 uns delete --path factory/line1/sensor/temp --yes
Terminal window
tier0 uns delete --path factory/line1/sensor/temp --path factory/line1/sensor/humi --yes
Terminal window
tier0 uns delete --path factory/line1/sensor/temp --hard --yes
tier0 uns restoreRestore topic from history

Usage

Terminal window
tier0 uns restore

Flags

-p, --path
Topic path to restore (required)required
-y, --yes
Confirm high-risk operation (required)required
--dry-run
Preview the request without executing it

Notes

  • High-risk execution requires --yes unless using --dry-run.

Example

Terminal window
tier0 uns restore --path Plant/Line1/Metric/Temperature --yes

Node-RED Flow

tier0 flow listList flowsalias: ls

Usage

Terminal window
tier0 flow list

Flags

-k, --keyword
Filter by name keyword
-t, --type
Filter by type (SourceFlow/EventFlow)
--source
Show SourceFlow only
--event
Show EventFlow only

Notes

  • --source and --event are mutually exclusive.
  • --type cannot be combined with --source or --event.

Examples

Terminal window
tier0 flow list
Terminal window
tier0 flow list --source --json
tier0 flow getGet flow details

Usage

Terminal window
tier0 flow get --id <id>
Terminal window
tier0 flow get <id>

Flags

--id
Flow IDdefault: 0

Notes

  • A positive Flow ID is required via --id or as a positional argument.

Examples

Terminal window
tier0 flow get --id 1 --json
Terminal window
tier0 flow get 1 --json
tier0 flow createCreate a new flow

Usage

Terminal window
tier0 flow create

Flags

-n, --name
Flow name (required)required
-t, --type
Flow type: SourceFlow | EventFlow (required)required
--source
Set type to SourceFlow
--event
Set type to EventFlow
--desc
Description
--template
Initial template JSON string
--template-file
Read initial template from file
--dry-run
Preview the request without executing it

Notes

  • Use exactly one of --type, --source, or --event to select a Flow type.
  • --template and --template-file are mutually exclusive.

Examples

Terminal window
tier0 flow create --name "modbus-collector" --source --desc "Modbus TCP collector"
Terminal window
tier0 flow create --name "alert-handler" --event --desc "Temperature alarm processor"
tier0 flow updateUpdate flow metadata

Usage

Terminal window
tier0 flow update --id <id>
Terminal window
tier0 flow update <id>

Flags

--id
Flow ID (required)default: 0
-n, --name
New name
--desc
New description
--template
New template JSON string
--template-file
Read new template from file
--favorite
Mark as favorite
--unfavorite
Remove from favorites
--dry-run
Preview the request without executing it

Notes

  • A positive Flow ID is required via --id or as a positional argument.
  • --template and --template-file are mutually exclusive.
  • --favorite and --unfavorite are mutually exclusive.
  • At least one field to update is required.

Examples

Terminal window
tier0 flow update --id 1 --name "line1-collector"
Terminal window
tier0 flow update --id 1 --favorite
tier0 flow dataGet Node-RED canvas JSON

Usage

Terminal window
tier0 flow data --id <id>
Terminal window
tier0 flow data <id>

Flags

--id
Flow IDdefault: 0
-o, --out
Save output to file

Notes

  • A positive Flow ID is required via --id or as a positional argument.

Example

Terminal window
tier0 flow data --id 1 --out flows.json
tier0 flow deployDeploy Node-RED canvas JSON

Usage

Terminal window
tier0 flow deploy --id <id>
Terminal window
tier0 flow deploy <id>

Flags

--id
Flow ID (required)default: 0
--flows-json
Node-RED canvas JSON string
-f, --flows-file
Read Node-RED canvas JSON from file (recommended)
-y, --yes
Confirm high-risk operation (required)required
--dry-run
Preview the request without executing it

Notes

  • A positive Flow ID is required via --id or as a positional argument.
  • --flows-json and --flows-file are mutually exclusive.
  • Deployment replaces all existing Node-RED nodes in the Flow.
  • High-risk execution requires --yes unless using --dry-run.

Examples

Terminal window
tier0 flow deploy --id 1 -f flows.json --dry-run --json
Terminal window
tier0 flow deploy --id 1 -f flows.json --yes
tier0 flow deleteDelete flow(s)alias: del, rm

Usage

Terminal window
tier0 flow delete --id <id>
Terminal window
tier0 flow delete <id>[,<id>...]

Flags

--id
Flow ID(s) to delete (repeatable)repeatable
-y, --yes
Confirm high-risk operation (required)required
--dry-run
Preview the request without executing it

Notes

  • Positional arguments may contain comma-separated Flow IDs.
  • Deletion stops the Node-RED container(s) and cannot be undone.
  • High-risk execution requires --yes unless using --dry-run.

Example

Terminal window
tier0 flow delete --id 1 --yes
tier0 flow nodesList available Node-RED node types

Usage

Terminal window
tier0 flow nodes [source|event]
Terminal window
tier0 flow nodes --type <SourceFlow|EventFlow>
Terminal window
tier0 flow nodes --source
Terminal window
tier0 flow nodes --event

Flags

-t, --type
Flow type (SourceFlow/EventFlow)
--source
Show SourceFlow nodes
--event
Show EventFlow nodes

Notes

  • Accepts at most one positional Flow type.
  • --source and --event are mutually exclusive.
  • Do not combine positional/type input with --source or --event.

Examples

Terminal window
tier0 flow nodes source --json
Terminal window
tier0 flow nodes --source --json
Terminal window
tier0 flow nodes --event --json

Assets

tier0 assets uploadUpload a file to Tier0 object storage

Usage

Terminal window
tier0 assets upload <local-file>

Flags

--business
Business scenedefault: attachment
--use-by
Usage scope: user|workspace|platformdefault: workspace
--visibility
Visibility: public|privatedefault: private
--app-instance-id
AI app instance ID
--session-id
AI session ID
--multipart-size
Multipart part size (e.g. 10MB, min 5MB)default: CLI-defined default
--concurrency
Multipart upload concurrency (number of parallel parts)default: 4
--resume
Resume an interrupted multipart upload
--abort
Abort an interrupted multipart upload and clean up its state

Notes

  • Exactly one local file argument is required.
  • Files larger than 100MB automatically use multipart upload.
  • The CLI does not enforce a hard maximum file size; the server applies plan/quota limits.

Examples

Terminal window
tier0 assets upload ./report.csv
Terminal window
tier0 assets upload ./report.csv --visibility public --business attachment
Terminal window
tier0 assets upload ./report.csv --use-by workspace --visibility private
Terminal window
tier0 assets upload ./large-backup.tar.gz
Terminal window
tier0 assets upload ./large-backup.tar.gz --resume
Terminal window
tier0 assets upload ./large-backup.tar.gz --abort
Terminal window
tier0 assets upload ./large-backup.tar.gz --multipart-size 20MB --concurrency 8
tier0 assets downloadDownload a file from Tier0 object storage

Usage

Terminal window
tier0 assets download

Flags

--file-path
File path returned by uploadrequired
-o, --output
Output file path (default: stdout)
--content-disposition
Custom Content-Disposition

Examples

Terminal window
tier0 assets download --file-path workspace/.../report.csv -o ./report.csv
Terminal window
tier0 assets download --file-path workspace/.../report.csv
tier0 assets urlGet file access URL from Tier0 object storage

Usage

Terminal window
tier0 assets url

Flags

--file-path
File path returned by uploadrequired
--expired-sec
Presigned URL expiration secondsdefault: 3600
--content-disposition
Custom Content-Disposition

Examples

Terminal window
tier0 assets url --file-path workspace/.../report.csv
Terminal window
tier0 assets url --file-path workspace/.../report.csv --expired-sec 300
tier0 assets deleteDelete a file from Tier0 object storage

Usage

Terminal window
tier0 assets delete

Flags

--file-path
File path returned by uploadrequired
-y, --yes
Confirm high-risk operation (required)required
--dry-run
Preview the request without executing it

Notes

  • Deletion cannot be undone.
  • High-risk execution requires --yes unless using --dry-run.

Examples

Terminal window
tier0 assets delete --file-path workspace/.../report.csv --dry-run --json
Terminal window
tier0 assets delete --file-path workspace/.../report.csv --yes