CLI Configuration
Advanced configuration and customization options for the Syaala CLI.
Configuration File
The CLI stores configuration in a JSON file:
- macOS/Linux:
~/.config/syaala/config.json - Windows:
%APPDATA%\syaala\config.json
Default Configuration
{
"profiles": {
"default": {
"apiKey": "sk_live_...",
"orgId": "org_...",
"apiUrl": "https://api.syaala.com",
"timeout": 30000,
"retries": 3
}
},
"activeProfile": "default",
"outputFormat": "table",
"debug": false
}Multiple Profiles
Manage multiple environments with profiles:
{
"profiles": {
"production": {
"apiKey": "sk_live_...",
"orgId": "org_prod",
"apiUrl": "https://api.syaala.com"
},
"staging": {
"apiKey": "sk_test_...",
"orgId": "org_staging",
"apiUrl": "https://staging-api.syaala.com"
},
"development": {
"apiKey": "sk_dev_...",
"orgId": "org_dev",
"apiUrl": "http://localhost:3001/api"
}
},
"activeProfile": "production"
}Switching Profiles
# Set active profile
syaala config set-profile staging
# List all profiles
syaala config profiles
# Use specific profile for one command
syaala deployments list --profile developmentEnvironment Variables
Environment variables override configuration file settings:
| Variable | Description | Example |
|---|---|---|
SYAALA_API_KEY | API authentication key | sk_live_abc123... |
SYAALA_API_URL | API base URL | https://api.syaala.com |
SYAALA_ORG_ID | Default organization ID | org_abc123 |
SYAALA_PROFILE | Active profile name | production |
SYAALA_DEBUG | Enable debug logging | true |
SYAALA_TIMEOUT | Request timeout (ms) | 30000 |
SYAALA_RETRIES | Number of retry attempts | 3 |
SYAALA_OUTPUT_FORMAT | Default output format | json |
Priority Order
Configuration is resolved in this order (highest to lowest priority):
- Command-line flags (
--api-key,--org-id) - Environment variables (
SYAALA_API_KEY) - Active profile in config file
- Default values
Output Formats
The CLI supports multiple output formats:
Table Format (Default)
syaala deployments list --format tableOutput:
ID NAME STATE GPU TYPE REPLICAS CREATED
dep_abc123 my-llm HEALTHY A100 2/10 2024-01-15
dep_xyz789 api-server SCALING A6000 5/20 2024-01-14JSON Format
syaala deployments list --format jsonOutput:
{
"deployments": [
{
"id": "dep_abc123",
"name": "my-llm",
"state": "HEALTHY",
"gpuType": "A100",
"currentReplicas": 2,
"maxReplicas": 10,
"createdAt": "2024-01-15T10:30:00Z"
}
]
}YAML Format
syaala deployments list --format yamlOutput:
deployments:
- id: dep_abc123
name: my-llm
state: HEALTHY
gpuType: A100
currentReplicas: 2
maxReplicas: 10
createdAt: 2024-01-15T10:30:00ZDebug Mode
Enable verbose logging for troubleshooting:
# Enable for one command
syaala deployments list --debug
# Enable globally via environment
export SYAALA_DEBUG=true
syaala deployments list
# Enable in config file
syaala config set debug trueDebug output includes:
- HTTP request/response details
- GraphQL queries and mutations
- Authentication token validation
- Retry attempts and backoff timing
Network Configuration
Timeout Settings
Configure request timeout:
# Via environment variable (milliseconds)
export SYAALA_TIMEOUT=60000
# Via config file
syaala config set timeout 60000Retry Configuration
Configure retry behavior:
# Set maximum retry attempts
syaala config set retries 5
# Via environment
export SYAALA_RETRIES=5Retry strategy:
- Exponential backoff: 1s, 2s, 4s, 8s, 16s
- Retryable errors: 429 (rate limit), 500, 502, 503, 504
- Non-retryable: 400, 401, 403, 404
Proxy Configuration
Use HTTP proxy for all requests:
# HTTP proxy
export HTTP_PROXY=http://proxy.example.com:8080
# HTTPS proxy
export HTTPS_PROXY=https://proxy.example.com:8080
# No proxy for specific domains
export NO_PROXY=localhost,127.0.0.1Security
API Key Storage
API keys are stored in the configuration file. Secure the file:
# Set restrictive permissions (Unix)
chmod 600 ~/.config/syaala/config.json
# Verify permissions
ls -la ~/.config/syaala/config.jsonExpected output:
-rw------- 1 user user 1234 Jan 15 10:30 config.jsonAPI Key Masking
API keys are automatically masked in logs:
✓ Authenticated with API key sk_live_abc...xyzCredential Helpers
Use system keychain for API key storage:
# macOS Keychain
syaala config set-credential-helper keychain
# Linux Secret Service
syaala config set-credential-helper secretservice
# Windows Credential Manager
syaala config set-credential-helper wincredAdvanced Options
Custom API Endpoints
Override specific API endpoints:
{
"profiles": {
"custom": {
"apiKey": "sk_live_...",
"endpoints": {
"deployments": "https://deployments-api.example.com",
"models": "https://models-api.example.com",
"inference": "https://inference-api.example.com"
}
}
}
}Request Headers
Add custom headers to all requests:
{
"profiles": {
"default": {
"apiKey": "sk_live_...",
"headers": {
"X-Custom-Header": "value",
"X-Request-ID": "custom-id"
}
}
}
}User Agent
Customize the user agent string:
export SYAALA_USER_AGENT="MyApp/1.0 (Syaala CLI)"Configuration Commands
syaala config get
Get configuration value:
syaala config get apiUrl
syaala config get timeoutsyaala config set
Set configuration value:
syaala config set apiUrl https://api.syaala.com
syaala config set timeout 60000
syaala config set outputFormat jsonsyaala config list
List all configuration:
syaala config listsyaala config reset
Reset configuration to defaults:
# Reset specific value
syaala config reset timeout
# Reset entire profile
syaala config reset --profile staging
# Reset everything
syaala config reset --allShell Integration
Bash Completion
# Add to ~/.bashrc
eval "$(syaala completion bash)"Zsh Completion
# Add to ~/.zshrc
eval "$(syaala completion zsh)"Fish Completion
# Add to ~/.config/fish/config.fish
syaala completion fish | sourcePowerShell Completion
# Add to $PROFILE
Invoke-Expression (syaala completion powershell)Troubleshooting
Reset Configuration
# Backup current config
cp ~/.config/syaala/config.json ~/.config/syaala/config.json.backup
# Remove config file
rm ~/.config/syaala/config.json
# Reconfigure
syaala auth login --api-key sk_live_...Verify Configuration
# Show active configuration
syaala config list --debug
# Test API connectivity
syaala auth status --debugCommon Issues
Permission Denied
# Fix config file permissions
chmod 600 ~/.config/syaala/config.jsonInvalid API Key
# Update API key
syaala config set apiKey sk_live_new_key
# Or re-authenticate
syaala auth logout
syaala auth login --api-key sk_live_new_keyNetwork Errors
# Test connectivity
curl https://api.syaala.com/api/health
# Increase timeout
syaala config set timeout 60000
# Enable retries
syaala config set retries 5Next Steps
- CLI Commands - Complete command reference
- Authentication Guide - Generate API keys
- TypeScript SDK - Programmatic API access