用于 Unraid 服务器 GraphQL API 的 TypeScript CLI,包含 12 条命令组,涵盖系统、阵列、磁盘、容器、虚拟机、共享、日志和诊断等功能,专为人性化使用而打造。
CLI: ucli [global flags] <group> <command> [args...]
bash
ucli --output json --quiet <group> <command>
--output json for machine-readable output--quiet to suppress decorative text--fields to shrink payloads--filter and --sort to shape data before it hits your context--yes only in deliberate automation paths, never speculatively.0 as success. Non-zero: capture stderr, retry only on transient failures.GroupTypical usesystem``info, health, status, resources, uptime``array``status, devices, parity, parity-check actionsdisksInventory, SMART, temp, usage, mountcontainers``list, inspect, logs, stats, lifecycle actionsnotifications``list, latest, get, create, archive``vms``list, inspect, lifecycle actionsshares``list, get, usagelogs``list, get, system, tail, search``services``list, get, status``networkInterfaces, statusschemaAPI introspectiondiagnostics``ping, latency, env, doctor
bash
ucli system info --output json --quiet
ucli system health --output json --quiet
ucli array status --output json --quiet
ucli services status --output json --quiet
bash
# list running
ucli containers list --output json --quiet --fields id,names,state,status --sort names:asc
# inspect one
ucli containers inspect <id> --output json --quiet
# restart
ucli containers restart <id> --yes --output json --quiet
id or names.--yes when confirmation would block automation.--output json.--fields on large result sets. Token waste adds up fast.--force unless you understand exactly what it skips.Default config path: ~/.config/ucli/config.yaml
yaml
default_profile: lab
profiles:
lab:
host: http://192.168.1.10:7777
apiKey: YOUR_API_KEY
output: json
timeout: 30
Prefer --host and --api-key explicitly for isolated jobs, --profile <name> for stable environments.
CLI: ucli [global flags] <group> <command> [args...]
bash
ucli --output json --quiet <group> <command>
--output json for machine-readable output--quiet to suppress decorative text--fields to shrink payloads--filter and --sort to shape data before it hits your context--yes only in deliberate automation paths, never speculatively.0 as success. Non-zero: capture stderr, retry only on transient failures.GroupTypical usesystem``info, health, status, resources, uptime``array``status, devices, parity, parity-check actionsdisksInventory, SMART, temp, usage, mountcontainers``list, inspect, logs, stats, lifecycle actionsnotifications``list, latest, get, create, archive``vms``list, inspect, lifecycle actionsshares``list, get, usagelogs``list, get, system, tail, search``services``list, get, status``networkInterfaces, statusschemaAPI introspectiondiagnostics``ping, latency, env, doctor
bash
ucli system info --output json --quiet
ucli system health --output json --quiet
ucli array status --output json --quiet
ucli services status --output json --quiet
bash
# list running
ucli containers list --output json --quiet --fields id,names,state,status --sort names:asc
# inspect one
ucli containers inspect <id> --output json --quiet
# restart
ucli containers restart <id> --yes --output json --quiet
id or names.--yes when confirmation would block automation.--output json.--fields on large result sets. Token waste adds up fast.--force unless you understand exactly what it skips.Default config path: ~/.config/ucli/config.yaml
yaml
default_profile: lab
profiles:
lab:
host: http://192.168.1.10:7777
apiKey: YOUR_API_KEY
output: json
timeout: 30
Prefer --host and --api-key explicitly for isolated jobs, --profile <name> for stable environments.