Skip to main content
Version: v5.6.1

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

-o json|yaml emits current (the active context's name, empty for local or ad-hoc targets) and the contexts entries. Exit codes: 0 on success, 1 for an unreadable contexts file, 2 for a stray argument.

Flags​

FlagMeaning
--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.