Throughwalls logothroughwalls

Config and Environment Variables

Configure the CLI with a config file or environment variables.

To avoid passing the same flags every time you use the CLI, you can save their values in environment variables or in the config file.

CLI Config Setup

You can configure the config file through the CLI with:

throughwalls config set <config-parameter> <value>

Or read the value of any parameter with:

throughwalls config get <config-parameter>

Available config parameters:

ip
workspace.username
workspace.password
workspace.ssh-key
workspace.ssh-passphrase
connect.auto-start

Manual Config Setup

You can configure the config file manually. Its location is:

Linux:   $XDG_CONFIG_HOME/throughwalls/config.yaml or ~/.config/throughwalls/config.yaml
macOS:   ~/Library/Application Support/throughwalls/config.yaml
Windows: %AppData%\throughwalls\config.yaml

If THROUGHWALLS_CONFIG_DIR is set, the CLI uses config.yaml inside that directory instead.

An empty config file looks like this:

ip:

workspace:
  username:
  password:
  ssh-key:
  ssh-passphrase:

connect:
  auto-start:

Environment Variables

The Throughwalls CLI uses the following environment variables:

Environment variablePurpose
THROUGHWALLS_CONFIG_DIROverrides the directory where CLI state files are stored.
THROUGHWALLS_IPHost IP address.
THROUGHWALLS_HOST_PASSWORDHost password for throughwalls host login.
THROUGHWALLS_NEW_PASSWORDNew host password for throughwalls host password set.
THROUGHWALLS_AUTO_STARTDefault value for connect auto-start.
THROUGHWALLS_WORKSPACE_USERNAMEWorkspace username.
THROUGHWALLS_WORKSPACE_PASSWORDWorkspace password.
THROUGHWALLS_WORKSPACE_SSH_KEYPath to the Workspace private SSH key.
THROUGHWALLS_WORKSPACE_SSH_PASSPHRASEPassphrase for the Workspace private SSH key.
PAGERPager used by commands that show line-style output.

Priority

When the same parameter is provided in multiple places, Throughwalls uses this priority: flag -> environment variable -> config file.

On this page