| name | tuya-iot-platform |
| description | Operate the Tuya Developer Platform via tuya-devplat-cli: create products, search products, manage DPs, and more. Wi-Fi + Bluetooth dual-mode only. |
| when_to_use | Use when the user asks to create a Tuya product, get a PID, search products, query or modify DPs (功能点), or perform any operation on the Tuya Developer Platform (platform.tuya.com). |
| id | tuya-iot-platform |
| surfaces | ["cloud"] |
| tags | ["cloud","product","dp","pid","tuya-devplat-cli"] |
| command | tuyaopen.skill.tuyaIotPlatform |
| fallback_commands | [] |
| default_enabled | false |
| related | ["tuyaopen/device-auth"] |
Tuya IoT Platform
Operate the Tuya Developer Platform via tuya-devplat-cli.
Communication type: This skill only targets Wi-Fi + Bluetooth (wf_ble_*) dual-mode solutions.
Operations
Common conventions
CLI binary
The CLI wrapper is generated by TuyaOpen IDE at .tuyaopen/ide/bin/tuya-devplat-cli
(.tuyaopen/ide/bin/tuya-devplat-cli.cmd on Windows). Use this path directly when
tuya-devplat-cli is not in PATH:
.tuyaopen/ide/bin/tuya-devplat-cli --help
The Python helper scripts (scripts/product.py, scripts/manage_dp.py) auto-detect
this binary by searching upward from the current working directory. You can also override
the path via the TUYA_DEVPLAT_CLI environment variable.
Auth
Always verify auth before any operation:
tuya-devplat-cli auth status
If not authenticated, ask the developer to sign in via TuyaOpen IDE → Developer Platform sidebar.
Never run auth login directly — it requires interactive browser input and will hang.
Output format
Always pass --format json for machine-readable output.
Use --fields a,b,c and --max-items N to limit large responses:
tuya-devplat-cli product list --format json --fields id,name,categoryName --max-items 20
Write operations: dry-run → confirm
All mutating commands require a two-phase flow:
tuya-devplat-cli <group> <command> [flags] --dry-run --format json
tuya-devplat-cli <group> <command> [flags] --confirm <token> --format json
Rules:
confirm_token is one-time. Re-run --dry-run if the token expires or is lost.
- All flags between
--dry-run and --confirm calls must be identical.
--raw-body is mutually exclusive with named flags. Use it only for complex payloads.
Discover commands
tuya-devplat-cli schema list --format table
tuya-devplat-cli schema get --group <g> --command <c> --format json
Fallback: use --help to explore
When a command fails or parameters are unclear, always fall back to --help before giving up:
tuya-devplat-cli --help
tuya-devplat-cli <group> --help
tuya-devplat-cli <group> <command> --help
--help output shows required vs optional flags, types, defaults, and usage examples.
Use it whenever an error says "unknown flag", "missing parameter", or the schema alone is insufficient.
Reference data
Category codes (Wi-Fi + BT)
| Chinese name | category code | frontend category | solution ID | DP note |
|---|
| 其他 | qt | wf_ble_qt | 10019526 | Default. No standard DP catalog — full freedom, DP IDs start from 1. |
| 插座 | cz | wf_ble_cz | 134001 | Standard DPs 1–100; custom DPs start at 101. |
| 灯具 | dj | wf_ble_dj | — (look up via Case A: custom-list --category-code dj → solutionModuleVOS[].code) | Standard DPs 1–100; custom DPs start at 101. |
For categories not listed, follow the lookup steps in ops/product.md.
Note: product solution-list always returns empty — do not use it.
Use product custom-list or product communication-list instead.