Environment Variables

Reference for environment variables that affect config, cache, profiles, editors, terminal behavior, and HTTP transport.

Environment variables are useful for local defaults and automation, but command line flags should be used when one invocation must be explicit.

Generated from production source environment-variable usage plus Go’s standard proxy environment contract.

Config And Profiles

VariablePurposeSource
RSH_CONFIGExplicit config file path. It selects one config file for the invocation.config paths
RSH_CONFIG_DIRConfig directory override; Restish uses restish.json inside this directory.config paths
RSH_CACHE_DIRHTTP/spec cache directory override.config paths
XDG_CONFIG_HOMEBase config directory; Restish uses $XDG_CONFIG_HOME/restish/restish.json.config paths
XDG_CACHE_HOMEBase cache directory; Restish uses $XDG_CACHE_HOME/restish.config paths
RSH_PROFILEDefault API profile name. The --rsh-profile flag wins for one command.global flags
RSH_AUTHDefault generated-operation auth override, such as PartnerKey or UserOAuth+PartnerKey.global flags

Request Defaults

VariablePurposeSource
RSH_HEADERComma-separated default request headers in Name: Value form; escape literal commas as \,.global flags
RSH_QUERYComma-separated default query parameters in key=value form; escape literal commas as \,.global flags
RSH_TIMEOUTDefault request timeout such as 15s.global flags
RSH_FILTERDefault response filter expression.global flags
RSH_NO_CACHEBypass HTTP cache where supported.global flags
RSH_INSECUREDisable TLS certificate verification when truthy.global flags
RSH_RETRYDefault retry count where supported.global flags
RSH_RETRY_UNSAFEAllow retry replay for POST, PUT, PATCH, and DELETE when truthy.global flags
RSH_RETRY_MAX_WAITDefault cap for Retry-After / X-Retry-In, such as 30s.global flags

Editor And Terminal

VariablePurposeSource
RSH_OUTPUT_FORMATDefault rendered body format for -o / --rsh-output-format.global flags
RSH_PRINTDefault --rsh-print output parts, such as b for compact rendered output in scripts.global flags
VISUALPreferred editor for config edit and edit.editor
EDITORFallback editor for config edit and edit.editor
GLAMOUR_STYLEMarkdown rendering style for markdown-formatted terminal output.output
RSH_IMAGE_PROTOCOLForce terminal image rendering protocol: kitty, iterm2, or halfblock.output
KITTY_WINDOW_IDUsed to auto-detect Kitty image support.output
TERMUsed to auto-detect Kitty terminal support.output
TERM_PROGRAMUsed to auto-detect iTerm2-style image support.output
COLUMNSTerminal width hint for half-block image rendering.output
SHELLUsed for first-run shell setup hints.shell setup
NO_COLORDisable color where respected.output
NOCOLORDisable color; supported as an older spelling alongside NO_COLOR.output
COLORForce color where respected.output

Plugin Runtime

VariablePurposeSource
RSH_COMMAND_PLUGIN_DISCOVERY_TIMEOUTOverride command-plugin startup discovery timeout.plugin runtime
RSH_COMMAND_PLUGIN_SHUTDOWN_GRACEOverride command-plugin shutdown grace period.plugin runtime

Plugin Installation

VariablePurposeSource
GITHUB_TOKENBearer token used for GitHub release API requests during restish plugin install owner/repo plugin.plugin install

Proxies

VariablePurposeSource
HTTPS_PROXYStandard Go HTTPS proxy setting used by Restish HTTP transports.Go HTTP transport
HTTP_PROXYStandard Go HTTP proxy setting used by Restish HTTP transports.Go HTTP transport
NO_PROXYStandard Go proxy bypass list used by Restish HTTP transports.Go HTTP transport

Flags override environment defaults for one command. Restish also uses Go’s standard proxy environment behavior:

export HTTPS_PROXY=https://proxy.corp.test:8080
export HTTP_PROXY=http://proxy.corp.test:8080
export NO_PROXY=localhost,127.0.0.1,.corp.test