Skip to main content
Version: v5.7.0

opschain context

Included from Basic tier

Show and switch the execution context: local mode, or one of the named server targets recorded in $OPSCHAIN_HOME/contexts.json (written by opschain login and opschain context use). Every command resolves its target by the same precedence — --server flag, then OPSCHAIN_SERVER, then the active context, then local mode — and --local short-circuits the whole chain back to the local repository. A bare opschain context shows the active context, exactly like opschain context show.

SubcommandManualPurpose
show [name]opschain docs cli/context-showShow the active context, or a named one
listopschain docs cli/context-listList the defined contexts, marking the active one
use <name>opschain docs cli/context-useSwitch the active context (local returns to local mode)

The name local is reserved: it is the implicit context addressing local mode and can never be recorded as a server context.

See also​

  • opschain docs cli/login — record a context (and its credential) for a server.
  • opschain docs cli/config — the full effective-configuration view.