Olares/cli/cmd/ctl
Peng Peng 61d793e4c6
cli, daemon: add olares-cli status backed by olaresd /system/status (#2917)
* cli, daemon: add `olares-cli status` backed by olaresd /system/status

Adds a new top-level `olares-cli status` command that calls the local
olaresd daemon's `/system/status` HTTP endpoint and prints either a
grouped, annotated human-readable report or raw JSON.

To avoid duplicating the response schema, the daemon's `state` struct
and related enums are extracted into a new shared package
`cli/pkg/daemon/state`. The daemon now type-aliases those types so all
existing daemon call sites keep compiling unchanged.

Made-with: Cursor

* cli: drop unused state.APIResponse envelope type

The HTTP client in cli/pkg/daemon/api/client.go intentionally uses an
inline anonymous envelope with json.RawMessage for the data field so
that --json mode can passthrough the bytes verbatim, so the public
APIResponse{Data State} type defined here had zero references. Remove
it; if a strongly-typed consumer ever shows up, re-add then.

Addresses Cursor Bugbot feedback on PR #2917.

Made-with: Cursor
2026-04-21 00:29:50 +08:00
..
amdgpu cli: feat amdgpu install (#2430) 2026-01-22 00:05:01 +08:00
app feat(cli): add commands to manage applications (#2811) 2026-04-03 19:34:37 +08:00
disk cli: add disk management commands for extending and listing unmounted disks (#2078) 2025-11-17 23:54:15 +08:00
gpu refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
node refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
os cli, daemon: add olares-cli status backed by olaresd /system/status (#2917) 2026-04-21 00:29:50 +08:00
osinfo cli: add a command of olares-cli to show full system info (#1658) 2025-07-31 22:32:40 +08:00
user fix(cli): update module appservice dependency to fix security issues (#2325) 2025-12-25 17:20:47 +08:00
root.go feat(cli): add commands to manage applications (#2811) 2026-04-03 19:34:37 +08:00