Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/contribute/contribution-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ The trees below displays the main files and folders and their intended use.
β”œβ”€β”€ .gitignore # Files to not track in `git`
β”œβ”€β”€ renovate.json # Track dependency versions
β”œβ”€β”€ src # The main directory for image assets and build steps
β”‚ β”œβ”€β”€ build # Helper scripts and dependency definitions
β”‚ β”œβ”€β”€ home # Directory mapped to `~` in the container
β”‚ β”œβ”€β”€ ipc-server # IPC server extension for Kloud Workspace
β”‚ └── rootfs # Directory mapped to `/` in the container
β”‚ β”œβ”€β”€ build # Helper scripts and dependency definitions
β”‚ β”œβ”€β”€ home # Directory mapped to `~` in the container
β”‚ β”œβ”€β”€ rootfs # Directory mapped to `/` in the container
β”‚ └── ws-extension # Integration extension for Kloud Workspace
└── tests # Test bench
β”œβ”€β”€ browser # Browser tests using playwright
β”œβ”€β”€ helpers # Fixtures, consts, utilities, and test bootstrapping
Expand Down
6 changes: 4 additions & 2 deletions docs/settings/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ containers:
:::

::: tip
`ws-cli show env <KEY>` reports where the value came from: `env-set`, `env-file`,
`secret-file-default`, or `yaml-default`.
`ws-cli show env <group.prop>` (e.g. `ws-cli show env server.port`) reports where the
value came from: `env-set`, `env-file`, `secret-file-default`, or `yaml-default`.
Query the dotted key β€” the matching `WS_*` variable (e.g. `WS_SERVER_PORT`) is what you
`export` to set it.
:::

<!--@include: ../partials/environment-variables.md -->
Expand Down
28 changes: 19 additions & 9 deletions docs/tools/ws-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,29 @@ Serve internal assets.

Display information about the current workspace instance.

- **`env <key>`:** Display the resolved value of a `WS_*` environment variable. Falls back to the default
declared in `env.reference.yaml` when unset.
- *(no flags)* β€” pretty mode: shows the key, schema description, markdown-rendered `longDescription`,
resolved value, and source label (`env-set` / `deprecated-alias` / `yaml-default`).
- `--value` β€” print the resolved value as a single line (script-friendly).
- **`env <group.prop>`:** Display the resolved value of a setting, queried by its canonical **dotted** key
(e.g. `ws-cli show env server.port`). Falls back to the default declared in `env.reference.yaml` when unset.
The matching `WS_*` variable (`WS_SERVER_PORT`) is the environment binding you `export` to set it β€” it is
not a query key (`ws-cli show env WS_SERVER_PORT` exits `2` with a hint pointing at the dotted form).
- *(no flags)* β€” pretty mode: shows the dotted key (and its `WS_*` binding), schema description,
markdown-rendered `longDescription`, resolved value, and source label (`env-set` / `deprecated-alias` / `yaml-default`).
- `--value` β€” print the resolved value as a single line (script-friendly). Combinable with `--check`
to emit the value only when the operator has set the variable (`--value --check`).
- `--as bool|int|list` β€” validate and emit the resolved value as the requested type
(`bool` exits `0` truthy / `1` falsy / error on garbage; `int` prints canonical int10;
`list` newline-splits using the YAML `delimiter:` or `--delimiter` override). Mutually exclusive with `--value` / `--check`.
- `--check [--deprecated <alias>]` β€” existence probe. Exits `0` when the preferred variable is set;
`list` newline-splits using the YAML `delimiter:` or `--delimiter` override). Mutually exclusive with `--value`.
- `--check [--deprecated <WS_ALIAS>]` β€” existence probe. `--deprecated` takes a **raw `WS_*` alias** (deprecated
aliases have no dotted form). Exits `0` when the preferred variable is set;
`1` when unset (stderr carries a deprecation warning if `--deprecated` is supplied and the alias
is set); `2` when both the preferred variable and the deprecated alias are set (aborts to stderr).
- Unknown keys (not declared in `env.reference.yaml`) exit non-zero with stderr
`Unknown env var [<KEY>]` in all non-`--check` modes.
- `--or-skip` β€” modifier on `--value` / `--value --check` / `--as bool`: exit `1` (not an error) on the
natural absence of the chosen projection, emitting a `Skipped: env [<KEY>] not set` debug breadcrumb to
stderr. Lets a script guard with `if val=$(ws-cli show env <group.prop> --value --or-skip); then …`.
- `--validate <regex>` β€” modifier on `--as list`: each token must full-match the anchored caller-supplied
charset; on any miss the whole list fails **closed** (no tokens emitted, exit `3`, stderr
`Rejected: invalid item [<token>]`). Centralizes token rejection for untrusted delimited sinks.
- Unknown dotted keys (not declared in `env.reference.yaml`) exit non-zero with stderr
`Unknown env var [<group.prop>]` (echoing the typed dotted form) in all non-`--check` modes.
- **`ip`:**
- **`internal`:** Display the internal IP address.
- **`node`:** Display the node/host IP address.
Expand Down
Loading