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.
curl -fsSL https://apt.apialerts.com/key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/apialerts.gpg
echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/apialerts.gpg] https://apt.apialerts.com stable main" | sudo tee /etc/apt/sources.list.d/apialerts.list
sudo apt update && sudo apt install apialertsSupports Debian, Ubuntu, and derivatives.
sudo rpm --import https://rpm.apialerts.com/key.gpg
sudo tee /etc/yum.repos.d/apialerts.repo <<EOF
[apialerts]
name=API Alerts
baseurl=https://rpm.apialerts.com
enabled=1
gpgcheck=1
gpgkey=https://rpm.apialerts.com/key.gpg
EOF
sudo dnf install apialertsSupports Fedora, RHEL, CentOS, and derivatives.
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.
.deb and .rpm packages are also available on the releases page and can be installed directly without adding a repository:
sudo dpkg -i apialerts_<version>_linux_amd64.debNote: packages installed this way won’t receive updates via apt upgrade or dnf upgrade.
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
GitHub Actions — Native GitHub Actions integration for your workflows.
cURL / HTTP — Send notifications from any environment with a one-liner.