Configuration

RAPS supports multiple configuration methods: environment variables, profiles, and .env files.

Precedence: CLI flags > Environment variables > Active profile > Defaults

Required Environment Variables

APS_CLIENT_ID

Your APS application Client ID from the APS Developer Portal.

# Windows PowerShell
$env:APS_CLIENT_ID = "your_client_id_here"
# macOS/Linux
export APS_CLIENT_ID="your_client_id_here"

APS_CLIENT_SECRET

Your APS application Client Secret.

# Windows PowerShell
$env:APS_CLIENT_SECRET = "your_client_secret_here"
# macOS/Linux
export APS_CLIENT_SECRET="your_client_secret_here"

Optional Environment Variables

VariableDescriptionDefault
APS_CALLBACK_URLCallback URL for 3-legged OAuthhttp://localhost:8080/callback
APS_DA_NICKNAMEDesign Automation nickname-
RAPS_TIMEOUTRequest timeout in seconds120
RAPS_CONCURRENCYMax parallel operations5
RAPS_USE_FILE_STORAGEUse plaintext file storage (insecure)false

Using .env File

Create a .env file in your working directory:

APS_CLIENT_ID=your_client_id_here
APS_CLIENT_SECRET=your_client_secret_here
APS_CALLBACK_URL=http://localhost:8080/callback

RAPS automatically loads from .env files in current and parent directories.

Security: Never commit .env files to version control. Add .env to .gitignore.

Profile Management

Profiles allow managing multiple environments (dev, staging, production).

# Create a profile
raps config profile create production

# Set values
raps config set client_id "your_production_client_id"
raps config set client_secret "your_production_client_secret"

# Switch profiles
raps config profile use production

# List all profiles
raps config profile list

# Export/import profiles
raps config profile export production --output ./prod-profile.json
raps config profile import ./prod-profile.json --name backup

Profile Storage Locations

  • Windows: %APPDATA%\raps\profiles.json
  • macOS: ~/Library/Application Support/raps/profiles.json
  • Linux: ~/.config/raps/profiles.json

Secure Token Storage (v3.7.0+)

RAPS now defaults to secure OS keychain storage for authentication tokens instead of plaintext files.

# Enable/disable keychain storage per profile
raps config set use_keychain true   # Default: true (secure)
raps config set use_keychain false  # Use plaintext files (insecure)

# Migrate existing tokens to keychain
raps config migrate-tokens

Token Storage Locations:

  • Keychain (Secure): OS-managed secure storage
    • Windows: Windows Credential Manager
    • macOS: macOS Keychain
    • Linux: Secret Service (gnome-keyring, kwallet)
  • File (Insecure): ~/.config/raps/tokens.json (⚠️ plaintext)

🔐 Security Best Practice: Use keychain storage (default). File storage stores tokens in plaintext and should only be used in secure environments.

Shell Completions

RAPS supports auto-completion for bash, zsh, fish, PowerShell, and elvish.

PowerShell

# Add to your PowerShell profile ($PROFILE)
raps completions powershell | Out-String | Invoke-Expression

Bash

# Add to ~/.bashrc
eval "$(raps completions bash)"

Zsh

# Add to ~/.zshrc
eval "$(raps completions zsh)"

Fish

raps completions fish > ~/.config/fish/completions/raps.fish

Test Configuration

Verify your setup:

raps auth test

If successful, you’re ready to use RAPS!

Next Steps