CLI reference / service / env / show

stado service env show

Invocation

stado service env show [OPTIONS] <NAME>

Purpose

Show a managed unit's environment. Without `--env-file`: the effective environment the unit runs with, parsed from the plist or systemd unit and its drop-ins; a value whose variable name looks like a credential is replaced, in the table and in `--json` alike. With `--env-file` (and `--host`): the owner-controlled file a launcher `.`-sources, which on this fleet is where the interesting values live. Every assignment is listed in FILE ORDER with its line number, and a key assigned twice is reported twice — `effective` for the last assignment, `shadowed` for every earlier one — because a sourced file assigns top to bottom and a later duplicate silently wins. A value whose key looks like a credential is withheld, and a URL carrying userinfo is withheld whatever its key is called; an endpoint, a port, a flag or a `$REFERENCE` is shown whatever its key is called. The decision is made ON THE HOST, so a withheld value never crosses the channel.

Required inputs and options

Input or optionContract
<NAME>Service name, or the host's own name for the unit
--host <HOST>Registry host to read. Required with `--env-file`; without it, omit to read every host that manages the unit
--env-file <ENV_FILE>Environment file on the target, absolute or rooted at $HOME
--reveal <REVEAL>With `--env-file`: show this one variable's value in full, whatever its name suggests. The key name travels; no secret is ever placed in a remote command line either way
--jsonCommand option; required or optional as shown in the invocation.

Output and state effect

This is an inspection/reporting operation. It emits the result described above and does not change managed state unless an explicit option in this page says otherwise. Pass `--json` when the command exposes that machine-readable option.

Refusals

  • Required with `--env-file`; without it, omit to read every host that manages the unit
  • Before dispatch, Stado refuses a missing required token shown in the invocation, an unknown option, or a value outside a listed value set; argument-usage failures exit with code 2.