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-startManual 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.yamlIf 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 variable | Purpose |
|---|---|
THROUGHWALLS_CONFIG_DIR | Overrides the directory where CLI state files are stored. |
THROUGHWALLS_IP | Host IP address. |
THROUGHWALLS_HOST_PASSWORD | Host password for throughwalls host login. |
THROUGHWALLS_NEW_PASSWORD | New host password for throughwalls host password set. |
THROUGHWALLS_AUTO_START | Default value for connect auto-start. |
THROUGHWALLS_WORKSPACE_USERNAME | Workspace username. |
THROUGHWALLS_WORKSPACE_PASSWORD | Workspace password. |
THROUGHWALLS_WORKSPACE_SSH_KEY | Path to the Workspace private SSH key. |
THROUGHWALLS_WORKSPACE_SSH_PASSPHRASE | Passphrase for the Workspace private SSH key. |
PAGER | Pager 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.