Read this in other languages: English, 中文
Get notified when your commands complete! Simply prefix any command with aa and receive notifications via Telegram, SMS, DingDing (钉钉), Ntfy, or Pushover.
Perfect for long-running builds, tests, deployments, or any command you want to monitor remotely.
- Super Simple: Just prefix your command with
aa - Multiple Channels: Telegram, SMS (Twilio), DingDing, Ntfy, Pushover
- Rich Notifications: Command status, duration, exit code, hostname
- Cross-platform: Works on Linux, macOS, and Windows
- Zero Dependencies: Minimal core dependencies
- Configurable: Optional command output capture, multiple simultaneous channels
pip install alert-after-proThat's it! One line installation.
Run the configuration wizard:
aa --setupChoose your notification channels and provide the necessary credentials.
Simply prefix any command with aa:
# Examples
aa make build
aa pytest tests/
aa docker-compose up
aa "sleep 10 && echo done"
aa npm install && npm run build- Create a bot via @BotFather
- Get your bot token
- Send a message to your bot
- Get your chat ID from:
https://api.telegram.org/bot<TOKEN>/getUpdates
- Server: Use
https://ntfy.shor your own server - Topic: Any topic name (e.g., "my-alerts")
- Auth: Optional username/password for private servers
- Create a robot in your DingDing group
- Get the webhook URL
- Optional: Enable signature verification with secret
- Sign up at Twilio
- Get your Account SID and Auth Token
- Get a phone number
- Sign up at Pushover
- Create an application
- Get your app token and user key
aa --help # Show help
aa --setup # Run configuration wizard
aa --test # Send test notification
aa --silent <command> # Run command without notificationsConfiguration is stored in ~/.aa/config.yaml:
enabled_notifiers:
- telegram
- ntfy
capture_output: false
telegram:
bot_token: "your_bot_token"
chat_id: "your_chat_id"
ntfy:
server: "https://ntfy.sh"
topic: "my-alerts"
username: "optional"
password: "optional"
dingding:
webhook: "https://oapi.dingtalk.com/robot/send?access_token=..."
secret: "optional_secret"
sms:
provider: "twilio"
account_sid: "your_account_sid"
auth_token: "your_auth_token"
from_number: "+1234567890"
to_number: "+0987654321"
pushover:
app_token: "your_app_token"
user_key: "your_user_key"Rich notifications include:
- ✅/❌ Command status (success/failure)
- 🖥️ Hostname
- 💻 Full command
- ⏱️ Execution duration
- 📊 Exit code
- 🕐 Start and end times
- 📋 Command output (optional)
- ❌ Error messages (on failure)
git clone https://github.com/alert-after-pro/alert-after-pro
cd alert-after-pro
pip install -e .# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Test specific notifier
aa --testalert-after-pro/
├── src/alert_after_pro/
│ ├── main.py # Entry point
│ ├── config.py # Configuration management
│ └── notifiers/ # Notification implementations
│ ├── base.py # Abstract base class
│ ├── telegram.py
│ ├── ntfy.py
│ ├── dingding.py
│ ├── sms.py
│ └── pushover.py
├── setup.py
└── requirements.txt
Contributions are welcome! Please feel free to submit a Pull Request. Areas for contribution:
- New notification channels
- Improved error handling
- Better message formatting
- Documentation improvements
- Testing
MIT License - see LICENSE file for details.
Inspired by alert-after. Built for developers who want to be notified when their long-running commands complete.
Happy coding! 🎉
Made with ❤️ for developers who like to step away from their terminals.