Olares/cli/pkg
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
..
binaries cli: change the module name of the cli (#1431) 2025-06-11 23:06:24 +08:00
bootstrap cli, daemon: enhance DGX Spark support and update GPU type handling (#2496) 2026-02-28 11:44:02 +08:00
certs fix(cli): make the timer for renewing K8s certs persistent (#1612) 2025-07-25 00:03:29 +08:00
clientset chore(cli): clean up some unused code (#1777) 2025-09-02 00:24:35 +08:00
common fix(cli): allow release version ovverride for local test (#2902) 2026-04-17 00:11:05 +08:00
container feat: upgrade containerd to v2.1.3 (#1603) 2025-07-24 00:50:35 +08:00
core cli: add functions to detect MThreads AI Book (#2883) 2026-04-14 19:53:08 +08:00
daemon cli, daemon: add olares-cli status backed by olaresd /system/status (#2917) 2026-04-21 00:29:50 +08:00
etcd cli: update etcd service template to use network-online.target (#2603) 2026-03-03 15:00:56 +08:00
files chore: clean up and migrate from legacy envs (#1946) 2025-10-18 00:13:50 +08:00
filesystem cli: change the module name of the cli (#1431) 2025-06-11 23:06:24 +08:00
gpu cli: add functions to detect MThreads AI Book (#2883) 2026-04-14 19:53:08 +08:00
images fix(cli): skip importing images with no support for current arch (#2796) 2026-04-01 15:32:40 +08:00
k3s refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
kubernetes refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
kubesphere feat(cli): add cpu rapl constraint metric (#2845) 2026-04-09 23:41:38 +08:00
manifest cli: change the module name of the cli (#1431) 2025-06-11 23:06:24 +08:00
phase cli: add functions to detect MThreads AI Book (#2883) 2026-04-14 19:53:08 +08:00
pipelines cli: add functions to detect MThreads AI Book (#2883) 2026-04-14 19:53:08 +08:00
plugins refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
registry cli: change the module name of the cli (#1431) 2025-06-11 23:06:24 +08:00
release feat: support more scheme update to env crs (#2473) 2026-02-03 20:09:19 +08:00
signals refactor: integrate CLI's code & CI into main repo (#1343) 2025-05-26 17:21:25 +08:00
storage refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
terminus fix(cli): also check readiness of k8s pods when installing (#2806) 2026-04-02 18:59:27 +08:00
upgrade feat(cli): add daily upgrader to migrate master node affinity (#2865) 2026-04-13 19:19:38 +08:00
utils cli, daemon: enhance DGX Spark support and update GPU type handling (#2496) 2026-02-28 11:44:02 +08:00
version refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
web5 cli: update ResolveOlaresName and CheckJWS to accept gateUrl parameter (#2352) 2025-12-31 00:11:35 +08:00
windows refactor(cli): unify config of command line options and envs (#2453) 2026-01-28 23:53:11 +08:00
wizard cli: fix some user activation bugs (#1992) 2025-10-27 18:52:14 +08:00