Skip to content

Inspect runtime state with hyops show

  • Purpose: Inspect runtime state through the supported operator CLI instead of reading raw state files directly. Owner: Platform operations

  • Trigger: Day-to-day checks, bootstrap verification, drift review, or incident triage.

  • Impact: Faster operator checks with less reliance on ad hoc cat, jq, or path hunting.
  • Severity: P3 Pre-reqs: hyops installed and the target runtime env already created.

  • Rollback strategy: None required. hyops show is read-only.


Context

hyops show is the state-backed operator view on top of the runtime tree under ~/.hybridops/envs/<env>/.

Use it to inspect:

  • init readiness markers
  • normalized module state
  • a summarized environment view

This is the supported operator path for routine inspection. Directly opening latest.json files is still possible, but should be the exception rather than the normal workflow.


Commands

Show one init target

hyops show init --env dev gcp

Expected result:

  • target status
  • run id
  • key context fields
  • run record path

Show all init markers in an env

hyops show init --env dev

Expected result:

  • one line per init target
  • target name
  • current status
  • last run id when present

Show one module state

hyops show module --env dev platform/network/decision-service

You can also address a named instance:

hyops show module --env dev org/hetzner/shared-control-host#edge_control_host

Expected result:

  • module ref and state instance
  • status, run id, updated time
  • execution driver/profile/pack
  • input contract summary
  • output summary
  • run record path
  • rerun inputs path

Each successful module run now also records inputs_resolved.json inside the run record. Use that snapshot for recovery or audit when you need to reconstruct the exact resolved inputs that were executed, especially if the env-scoped rerun overlay was never created on an older state slot.

Show an env summary

hyops show env --env dev

Expected result:

  • runtime root
  • init marker counts
  • module-state counts
  • non-ok module summary
  • published capability summary

JSON output

Every show subcommand supports --json:

hyops show env --env dev --json
hyops show module --env dev platform/onprem/postgresql-ha --json

Use this when a script needs normalized state without reading runtime files directly.


Safety notes

  • hyops show is read-only.
  • It is state-backed by design. It does not perform live provider queries by default.
  • Use explicit runtime selection:
  • --env <name>
  • or --root <path>

This keeps operator checks aligned with the same env-boundary rules used by the rest of the platform.


Troubleshooting

ERR: init target not found

The env exists, but that init target has not been completed yet.

Action:

  • run the relevant init target, or
  • confirm you are inspecting the correct env

ERR: module state not found

The module has not been applied in that env, or you referenced the wrong state instance.

Action:

  • check the module ref
  • check the state instance suffix
  • confirm the expected env

I need live provider truth, not runtime state

hyops show is intentionally state-backed. If you need a live provider check, use the target provider CLI or the relevant runbook, and treat that as a separate action from normal runtime inspection.


References


License: MIT-0 for code, CC-BY-4.0 for documentation