CLI
A command-line interface for API Alerts. Send events from your terminal, shell scripts, cron jobs, and CI/CD pipelines.
Installation
brew tap apialerts/tap
brew install --cask apialertsSupports macOS and Linux.
scoop bucket add apialerts https://github.com/apialerts/scoop-bucket
scoop install apialerts go install github.com/apialerts/cli@latest Download the latest binary from the Releases page.
Setup
You’ll need an API key from your workspace. After logging in, navigate to your workspace and open the API Keys section. Your key is stored locally in ~/.apialerts/config.json.
Interactive setup (recommended)
apialerts init
Non-interactive (CI/CD or scripts)
apialerts config --key YOUR_API_KEY
View your current key
apialerts config
Remove your key
apialerts config --unset
Usage
# Simple notification
apialerts send -m "Deployment successful"
# With all options
apialerts send -e user.purchase -t "New Sale" -m "$49.99 from [email protected]" -c payments -g billing,sales -l https://dashboard.example.com
# With additional JSON data
apialerts send -e user.signup -m "New user registered" -d '{"plan":"pro","source":"organic"}'
Flags
| Flag | Short | Description |
|---|---|---|
--message | -m | Event message (required) |
--event | -e | Event name for routing |
--title | -t | Event title |
--channel | -c | Target channel (defaults to workspace default) |
--tags | -g | Comma-separated tags |
--link | -l | Associated URL |
--data | -d | JSON object with additional event data |
--key | API key override for a single request |
Test Connectivity
Send a test event to verify your API key and connection:
apialerts test
CI/CD Pipelines
The CLI currently supports macOS and Windows. For Linux-based CI/CD pipelines, use cURL or the GitHub Actions integration instead.
GitHub Actions — Native GitHub Actions integration for your workflows.
cURL / HTTP — Send notifications from any environment with a one-liner.