opschain context list
Included from Basic tier
List the contexts defined in $OPSCHAIN_HOME/contexts.json, always
beginning with the implicit local row, and mark the resolved active
target with * — so when --server or OPSCHAIN_SERVER overrides the
contexts file, no named row is starred:
opschain context list
NAME SERVER ACTIVE
local (local mode)
production https://opschain.example.com *
staging https://staging.example.com
Home: /opt/opschain (from OPSCHAIN_HOME)
The table is followed by the target: footer when --server or
OPSCHAIN_SERVER overrides the contexts file, and always by a Home: line
naming the home whose contexts.json was listed and how it was chosen
(from --home, from OPSCHAIN_HOME, the per-OS default).
-o json|yaml emits current (the active context's name, empty for local
or ad-hoc targets), the contexts entries, target, home and
home_source (flag, OPSCHAIN_HOME or default). Exit codes: 0 on success,
1 for an unreadable contexts file, 2 for a stray argument.
Flags
| Flag | Meaning |
|---|---|
--filter <column>[!]=<value> | Keep only rows matching the term (repeatable; terms AND). Columns are the printed table headers lowercased (spaces/dashes fold to _); * wildcards match the whole cell case-insensitively, != negates, commas mean any-of. Applied client-side. Grammar: opschain docs cli. |
See also
opschain docs cli/context-use— switch the starred row.opschain docs cli/login— add a row.