Skip to main content
Version: 1.0

wash ctx

wash ctx provides a user with tools to interact with wasmCloud host configuration contexts. By default, the host configuration context is stored in a host_config.json file in your $HOME/.wash/contexts directory. This command will help you to interactively manage host contexts by performing operations such as addition, removal and editing of contexts. Following are the available subcommands under wash ctx:

  • list
  • del
  • new
  • default
  • edit

list

Lists all of the stored contexts available in $HOME/.wash/contexts except index.json.

Usage

wash ctx list

Options

--directory Location of context files for managing. Defaults to $WASH_CONTEXTS ($HOME/.wash/contexts) [env: WASH_CONTEXTS]

--output(Alias -o) Specify output format (text or json) [default: text]

del

Delete a context stored in the contexts directory. The user may supply the name of the context to delete or will be prompted to select an existing one

Usage

wash contexts del <context-name>

Options

--directory Location of context files for managing. Defaults to $WASH_CONTEXTS ($HOME/.wash/contexts) [env: WASH_CONTEXTS]

--output (Alias -o) Specify output format (text or json) [default: text]

new

Create a new host configuration context. The user may provide a custom name for their context and can also go through the create process in an interactive way by supplying the --interactive flag. By default, a context is created with default values.

Usage

wash ctx new <context-name>

Options

--directory Location of context files for managing. Defaults to $WASH_CONTEXTS ($HOME/.wash/contexts) [env: WASH_CONTEXTS]

--output (Alias -o) Specify output format (text or json) [default: text]

--interactive (Alias -i) Create the context in an interactive terminal prompt, instead of an autogenerated default context

default

Set the default context for use in your lattice operations.

Usage

wash ctx default <context-name>

Options

--directory Location of context files for managing. Defaults to $WASH_CONTEXTS ($HOME/.wash/contexts) [env: WASH_CONTEXTS]

--output (Alias -o) Specify output format (text or json) [default: text]

edit

Edit a context using an editor. You may pick a text editor of your editor of choice using the --editor flag.

Usage

wash ctx edit <context-name> --editor=nano

Options

--directory Location of context files for managing. Defaults to $WASH_CONTEXTS ($HOME/.wash/contexts) [env: WASH_CONTEXTS]

--output (Alias -o) Specify output format (text or json) [default: text]

--editor (Alias -e) Your terminal text editor of choice. This editor must be present in your $PATH, or an absolute filepath [env: EDITOR=]