Introduction

Wuji CLI is a command-line tool for Wuji devices, built for terminals, scripts, and AI Agents. Scan devices, probe connectivity, read and write parameters, subscribe to real-time data, run health diagnostics, and upgrade firmware — all without leaving the terminal.

Command Overview

CommandPurpose
wuji devicesScan and list devices (USB/UDP)
wuji pingProbe device connectivity via full handshake, reporting SN, firmware version, and IP
wuji resourcesList readable/writable parameters and subscribable topics of a device
wuji get <path>Read a parameter
wuji set <path> <value>Write a parameter
wuji sub <topic>Subscribe to real-time data
wuji doctorRun a device health self-check
wuji upgradeCheck for and install firmware updates
wuji updateUpdate the CLI to the latest release
wuji completions <shell>Generate a shell auto-completion script

Add --help after any command for detailed usage.

Design Principles

  • Stateless: Each command completes its own connect-operate-disconnect cycle. No connection persists between commands, so there's no separate "connect" step.
  • Read-only fallback when occupied: Device firmware allows only one direct session at a time. When a host application such as Wuji Studio occupies the device, the CLI falls back to read-only access, and set operations are rejected.
  • Scriptable exit codes: 0 means success, and nonzero means failure. ping returns 1 if any device fails, and doctor returns 1 if it finds a fault — ready for script assertions.

Output Modes

All commands print tables or tree reports by default. Add a global flag to switch to structured output:

FlagOutputUse Case
--jsonPretty-printed JSONScript parsing, AI Agent consumption
--jsonlOne compact JSON object per lineStream capture, pipelines