Environment Variables
xcsh can be configured using environment variables.
Authentication Variables
Section titled “Authentication Variables”| Variable | Description |
|---|---|
F5XC_API_TOKEN | API token for authenticating with F5 Distributed Cloud services |
F5XC_API_URL | F5 Distributed Cloud API endpoint URL |
Output Variables
Section titled “Output Variables”| Variable | Description |
|---|---|
F5XC_OUTPUT | Default output format for command results (json, yaml, table, text, tsv) |
Usage Examples
Section titled “Usage Examples”Basic Setup
Section titled “Basic Setup”Mac/Linux
Section titled “Mac/Linux”# Set API credentialsexport F5XC_API_URL="https://your-tenant.console.ves.volterra.io"export F5XC_API_TOKEN="your-api-token"
# Run commandxcsh virtual list http_loadbalancerWindows
Section titled “Windows”# Set API credentials$env:F5XC_API_URL = "https://your-tenant.console.ves.volterra.io"$env:F5XC_API_TOKEN = "your-api-token"
# Run commandxcsh virtual list http_loadbalancerJSON Output Default
Section titled “JSON Output Default”Mac/Linux
Section titled “Mac/Linux”export F5XC_OUTPUT="json"
# All commands now output JSON by defaultxcsh virtual list http_loadbalancerWindows
Section titled “Windows”$env:F5XC_OUTPUT = "json"
# All commands now output JSON by defaultxcsh virtual list http_loadbalancerShell Configuration
Section titled “Shell Configuration”Add to your shell profile for persistent configuration:
Bash (~/.bashrc)
Section titled “Bash (~/.bashrc)”export F5XC_API_URL="https://your-tenant.console.ves.volterra.io"export F5XC_API_TOKEN="your-api-token"Zsh (~/.zshrc)
Section titled “Zsh (~/.zshrc)”export F5XC_API_URL="https://your-tenant.console.ves.volterra.io"export F5XC_API_TOKEN="your-api-token"Fish (~/.config/fish/config.fish)
Section titled “Fish (~/.config/fish/config.fish)”set -x F5XC_API_URL "https://your-tenant.console.ves.volterra.io"set -x F5XC_API_TOKEN "your-api-token"PowerShell ($PROFILE)
Section titled “PowerShell ($PROFILE)”$env:F5XC_API_URL = "https://your-tenant.console.ves.volterra.io"$env:F5XC_API_TOKEN = "your-api-token"Precedence
Section titled “Precedence”Environment variables override connection profile settings:
- Environment variables (highest priority)
- Active connection profile
- Default values (lowest priority)
Security Considerations
Section titled “Security Considerations”- Never commit environment variables with secrets to version control
- Use secret management tools for production environments
- Consider using
.envrcwith direnv for project-specific settings - Ensure proper file permissions on shell configuration files