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_ACCOUNT_IDACC account ID β€” enables raps admin commands without --account flag. Find it in ACC Custom Integrations or via raps hub list.-
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 instead of OS keychain β€” recommended for headless servers and CI/CDfalse

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

# Required for raps admin commands (ACC account admin)
# Find this in ACC β†’ Account Admin β†’ Custom Integrations, or copy from raps hub list
APS_ACCOUNT_ID=your_account_id_here

# Recommended on headless servers (no OS keychain available)
RAPS_USE_FILE_STORAGE=true

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

Sticky Context (New in v4.5)

Set default context values to avoid repeating --account, --hub, or --project flags on every command.

# Set default account and project
raps config context set account_id abc-123
raps config context set project_id proj-456

# Show current context
raps config context show

# Clear all context
raps config context clear

Available keys:

  • hub_id β€” Default hub ID
  • project_id β€” Default project ID
  • account_id β€” Default account ID

Precedence: explicit flag > environment variable > profile context > none

Example workflow:

# Set context once
raps config context set account_id "b.acc-123"

# Now these commands auto-resolve the account
raps admin user list
raps report issues-summary
raps admin company-list

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