Skip to main content
Version: v5.7.0

opschain context show

Included from Basic tier

opschain context show [name]

Without an argument, show the resolved active target — which honours the full precedence, so with --server or OPSCHAIN_SERVER set it reports that ad-hoc target (Context: (ad-hoc flag) / (ad-hoc env)) rather than the contexts file's current entry:

opschain context show
Context: production
Server: https://opschain.example.com

In local mode it prints Context: local (local mode). With a name, show that defined context regardless of what is active; the reserved name local always shows local mode. -o json|yaml emits context, server (null in local mode) and source (flag, env, context or local).

A name that is not defined errors with context "<name>" is not defined — the full message names the opschain login invocation that creates it (exit 1).

Exit codes: 0 on success, 1 for an undefined name or an unreadable contexts file, 2 for a usage error.

See also​

  • opschain docs cli/context-list — all contexts at once.
  • opschain docs cli/context-use — make one active.