Skip to main content

Auth Command

The auth command manages authentication credentials and profiles for the AhaSend CLI.

Overview

Available subcommands:
  • login - Authenticate with AhaSend
  • status - Show authentication status
  • switch - Switch between profiles
  • logout - Remove authentication

Login

Authenticate with your AhaSend API credentials:

Interactive Login

You’ll be prompted for:
  • API Key
  • Account ID
  • Profile name (optional)

Direct Login

Flags

  • --api-key: Your AhaSend API key
  • --account-id: Your AhaSend Account ID
  • --profile: Profile name (default: “default”)
  • --api-url: Custom API URL (default: https://api.ahasend.com)

Status

Check current authentication status and available profiles:
Output:
JSON output for scripting:

Switch

Change the active profile:

Logout

Remove authentication credentials:

Profile Management

Multiple Environments

Set up profiles for different environments:

Using Profiles

Security Notes

  • Credentials are stored in ~/.ahasend/config.yaml
  • File permissions are set to 600 (read/write for owner only)
  • Never commit credentials to version control
  • Use environment variables for CI/CD

Next Steps