CLI & Sandbox Guide

Every workflow shares the same /v1 API across Web Console, CLI, MCP, and SDKs.

1. Try in browser without an account

Open https://app.iot.dev/try to run the real console against a simulated device inside an isolated browser Web Worker with zero network access. Drag safety ranges to replay 7-day history, trigger an out-of-scope approval and lease fallback, and inject a fixed forged-signature frame to watch the local device lock reject it.

2. Local four-process stack (iot dev)

Run iot dev to launch PostgreSQL 16, iot-authority, iot-gateway, iot-api, iot-worker, and the device simulator using ephemeral dev trust roots rejected by release firmware.

iot dev
iot dev --json
# Launches PostgreSQL 16 + iot-authority + iot-gateway + iot-api + iot-worker + fw-sim

3. Core CLI commands

iot CLI reference
iot login                              # Browser OAuth 2.1 PKCE login
iot project list | create              # Manage workspace projects
iot validate | plan | apply | export   # Declarative iot.yaml GitOps
iot device add | verify | rekey        # Enroll CSR, verify TSL, rotate cert
iot firmware keygen | sign             # Offline Ed25519 firmware signing
iot approvals open                     # Open independent approve.<host> link
iot sim --replay <trace> --fault <k>   # Deterministic fault-injection replay
iot mcp                                # Local MCP server for validation/signing

4. Exit codes & JSON output

All commands support --json. Exit codes are stable: 0 success, 1 error, 2 usage error, 3 login required, 4 verification failed.

5. Remote diagnostics handoff & offline audit verification

CLI diagnostic helpers hand off to the authenticated console diagnostics tab (/p/{project}/devices/{device}?tab=diagnostics&debug_cmd=<log_tail|sys_info|net_diag|heap_stats|tsl_dump>&follow=1), where the signed-in human explicitly submits the request and approves it with Passkey on approve.<host>. Exported JSONL audit logs can be verified offline with iot audit verify --file <export.jsonl>.