Environment Variables
kortex-cli supports environment variables for configuring default behavior.
KORTEX_CLI_DEFAULT_RUNTIME¶
Sets the default runtime to use when registering a workspace with the init command.
Usage:
Priority:
The runtime is determined in the following order (highest to lowest priority):
--runtimeflag (if specified)KORTEX_CLI_DEFAULT_RUNTIMEenvironment variable (if set)- Error if neither is set (runtime is required)
Example:
# Set the default runtime for the current shell session
export KORTEX_CLI_DEFAULT_RUNTIME=fake
# Register a workspace using the environment variable
kortex-cli init /path/to/project --agent claude
# Override the environment variable with the flag
kortex-cli init /path/to/another-project --agent claude --runtime podman
Notes:
- The runtime parameter is mandatory when registering workspaces
- If neither the flag nor the environment variable is set, the
initcommand will fail with an error - Supported runtime types depend on the available runtime implementations
- Setting this environment variable is useful for automation scripts or when you consistently use the same runtime
KORTEX_CLI_DEFAULT_AGENT¶
Sets the default agent to use when registering a workspace with the init command.
Usage:
Priority:
The agent is determined in the following order (highest to lowest priority):
--agentflag (if specified)KORTEX_CLI_DEFAULT_AGENTenvironment variable (if set)- Error if neither is set (agent is required)
Example:
# Set the default agent for the current shell session
export KORTEX_CLI_DEFAULT_AGENT=claude
# Register a workspace using the environment variable
kortex-cli init /path/to/project --runtime fake
# Override the environment variable with the flag
kortex-cli init /path/to/another-project --runtime fake --agent goose
Notes:
- The agent parameter is mandatory when registering workspaces
- If neither the flag nor the environment variable is set, the
initcommand will fail with an error - Supported agent types depend on the available agent configurations in the runtime
- Agent names must contain only alphanumeric characters or underscores (e.g.,
claude,goose,my_agent) - Setting this environment variable is useful for automation scripts or when you consistently use the same agent
KORTEX_CLI_STORAGE¶
Sets the default storage directory where kortex-cli stores its data files.
Usage:
export KORTEX_CLI_STORAGE=/custom/path/to/storage
kortex-cli init /path/to/project --runtime fake --agent claude
Priority:
The storage directory is determined in the following order (highest to lowest priority):
--storageflag (if specified)KORTEX_CLI_STORAGEenvironment variable (if set)- Default:
$HOME/.kortex-cli
Example: