Configuration
Configure the Transactional CLI settings and preferences.
Configuration
The CLI stores its configuration in ~/.transactional/config.json.
View Configuration
Show all current settings:
transactional config showOutput:
Current Configuration
API URL https://api.usetransactional.com
Web URL https://usetransactional.com
Output Format table
Color enabled
File Locations
Config Directory /Users/you/.transactional
Credentials File /Users/you/.transactional/credentials.json
Set Configuration
Set individual configuration values:
transactional config set <key> <value>Available Settings
| Key | Description | Valid Values |
|---|---|---|
apiUrl | API endpoint URL | Any valid URL |
webUrl | Web dashboard URL | Any valid URL |
outputFormat | Default output format | table, json, yaml |
color | Enable colored output | true, false |
Examples
# Change output format to JSON
transactional config set outputFormat json
# Disable colored output
transactional config set color false
# Point to a different API (self-hosted)
transactional config set apiUrl https://api.mycompany.comGet Single Value
Retrieve a specific configuration value:
transactional config get apiUrlThis outputs just the value, useful for scripting:
# Use in scripts
API_URL=$(transactional config get apiUrl)Reset to Defaults
Reset all configuration to default values:
transactional config resetDefault values:
| Setting | Default |
|---|---|
apiUrl | https://api.usetransactional.com |
webUrl | https://usetransactional.com |
outputFormat | table |
color | true |
File Paths
Show configuration file locations:
transactional config pathOutput:
Config Directory: /Users/you/.transactional
Credentials File: /Users/you/.transactional/credentials.json
Environment Variables
Environment variables override configuration file settings:
| Variable | Description |
|---|---|
TRANSACTIONAL_API_URL | Override API URL |
TRANSACTIONAL_WEB_URL | Override Web URL |
NO_COLOR | Disable colored output (set to any value) |
FORCE_COLOR | Force colored output |
Example:
# Use staging API
TRANSACTIONAL_API_URL=https://staging-api.example.com transactional email send ...
# Disable colors in CI
NO_COLOR=1 transactional email templates listOutput Formats
Table (Default)
Human-readable tabular output:
transactional email templates listid name alias status updated
1 Welcome welcome-email ACTIVE 2024-01-15
2 Password Reset reset-password ACTIVE 2024-01-10
JSON
Machine-readable JSON output:
transactional email templates list --json[
{
"id": 1,
"name": "Welcome",
"alias": "welcome-email",
"status": "ACTIVE",
"updatedAt": "2024-01-15T10:30:00Z"
}
]YAML
YAML output (when configured):
transactional config set outputFormat yaml
transactional email templates list- id: 1
name: Welcome
alias: welcome-email
status: ACTIVE
updatedAt: '2024-01-15T10:30:00Z'Self-Hosted Setup
For self-hosted Transactional installations:
# Set custom API URL
transactional config set apiUrl https://api.yourdomain.com
# Set custom Web URL
transactional config set webUrl https://app.yourdomain.com
# Login to your instance
transactional loginCI/CD Usage
For automated environments, you can use environment variables and JSON output:
#!/bin/bash
# Disable colors
export NO_COLOR=1
# Check if logged in
if ! transactional whoami --json > /dev/null 2>&1; then
echo "Not authenticated"
exit 1
fi
# Get templates as JSON
TEMPLATES=$(transactional email templates list --json)
# Process with jq
echo "$TEMPLATES" | jq '.[].name'