Skip to content

tlm-cli pms devices

Commands for browsing and managing manufacturing devices in the Product Management System (PMS).

tlm-cli pms devices [COMMAND] [OPTIONS]

list

List devices sorted by serial number with interactive pagination.

tlm-cli pms devices list [OPTIONS]

Fetches devices in batches of 200 and displays 25 at a time. Navigate with keyboard shortcuts.

Option Type Description
--serial TEXT string Filter by serial number (fuzzy match).
--part TEXT string Filter by part number (exact match).

Output columns

Mode Columns
Compact Serial Number, Status, Part, Customer
Detail (d) + Batch ID, Production Date, Provisioned

Keyboard shortcuts

Key Action
Enter Next page
d Toggle detail view
q or Esc Quit

Example

# List all devices
tlm-cli pms devices list

# Filter by serial number prefix
tlm-cli pms devices list --serial "SN-001"

# Filter by part number
tlm-cli pms devices list --part "PART-XYZ"

show

Show full attributes and relationships for a single device.

tlm-cli pms devices show SERIAL_NUMBER
Argument Description
SERIAL_NUMBER Serial number of the device.

Keyboard shortcuts

Key Action
d Toggle detail view (adds Batch ID, Production Date, Production Data JSON, Public Events, Internal Events)
q, Esc, Enter Quit

Example

tlm-cli pms devices show SN-001234

subdevices

List the sub-devices of a given device.

tlm-cli pms devices subdevices SERIAL_NUMBER
Argument Description
SERIAL_NUMBER Serial number of the parent device.

Example

tlm-cli pms devices subdevices SN-001234

Output is a table with columns: SN, Batch ID, Part.


set-model

Assign an IoT model to a single device by model name.

tlm-cli pms devices set-model SERIAL_NUMBER --model TEXT [OPTIONS]
Argument / Option Type Required Description
SERIAL_NUMBER string yes Serial number of the device to update.
--model TEXT string yes Model name to assign (exact match).
--dry-run flag no Show the change without applying it.

Example

tlm-cli pms devices set-model SN-001234 --model "gateway-v2"

# Preview the change
tlm-cli pms devices set-model SN-001234 --model "gateway-v2" --dry-run

set-model-batch

Assign an IoT model to all devices in a batch that match a given part number.

tlm-cli pms devices set-model-batch BATCH_ID --part TEXT --model TEXT [OPTIONS]
Argument / Option Type Required Description
BATCH_ID string yes Batch ID to filter devices.
--part TEXT string yes Part number (exact match) to narrow the batch.
--model TEXT string yes Model name to assign (exact match).
--dry-run flag no Show what would change without applying it.
--yes / -y flag no Skip the confirmation prompt.

Fetches all matching devices across pages (up to 1500 per page). Failed updates are reported in the summary table.

Example

# Dry run to preview changes
tlm-cli pms devices set-model-batch B2024-01 --part "PART-XYZ" --model "gateway-v2" --dry-run

# Apply with confirmation prompt
tlm-cli pms devices set-model-batch B2024-01 --part "PART-XYZ" --model "gateway-v2"

# Apply without prompt
tlm-cli pms devices set-model-batch B2024-01 --part "PART-XYZ" --model "gateway-v2" --yes