Skip to main content
The AhaSend CLI stores configuration in ~/.ahasend/config.yaml and reads credentials from profiles or explicit command-line flags. Before running the examples, log in with a full API key, use your verified sender domain, and replace YOUR_RESOURCE_ID with a resource UUID from your test account. Create any named template, recipient, attachment, or JSON files first. Shell examples use Bash; examples that read JSON with jq need jq installed. Sends use sandbox mode.

Configuration File

The configuration file is automatically created when you authenticate and contains your profiles and preferences:

CI Credentials

The CLI reads no environment variables for credentials. It authenticates through ahasend auth login profiles, --profile, or --api-key with --account-id. In CI, store secrets as environment variables and pass them explicitly through flags:

Output Formats

The current CLI’s printer reads --output, whose default is plain; preferences.output_format does not override it. Pass the flag for each command. Credentials are plaintext in ~/.ahasend/config.yaml (Windows: %USERPROFILE%\.ahasend\config.yaml); protect this file.

Global Flags

Available for all commands:

Next Steps