A simple, powerful CLI tool for sending notifications across multiple platforms
In today's fast-paced development world, staying informed about your applications, deployments, and system events is crucial. Whether you're:
- π Deploying applications and need to notify your team
- π Monitoring systems and want alerts in your favorite chat platform
- π€ Running automated scripts that need to report their status
- π― Building CI/CD pipelines with notification requirements
pushr makes it incredibly easy to send notifications to Discord, Telegram, and other platforms with a single, unified command-line interface. No more juggling multiple APIs, webhook URLs, or platform-specific tools!
- π― Multi-platform support: Discord, Telegram (more coming soon!)
- π Zero-config start: Automatic setup on first run
- π» Cross-platform: Works on Linux, macOS, and Windows
- π§ Flexible configuration: JSON-based config with environment variable support
- π¨ Rich formatting: Support for markdown, embeds, and platform-specific features
- π¦ Easy installation: Use with
npx- no global installation required - π Secure: Keep your tokens safe in local configuration
The easiest way to get started is with npx - no installation required!
# First run - automatically creates configuration
npx pushr
# After configuration, send your first notification
npx pushr -m "Hello from pushr! π"If you prefer to install globally:
npm install -g pushrOn your first run, pushr will automatically create a configuration file at ~/.pushr/config.json. Here's what you need to set up:
- Create a Discord application at Discord Developer Portal
- Create a bot and copy the bot token
- Invite the bot to your server with "Send Messages" permission
- Get your channel ID (enable Developer Mode in Discord, right-click channel β Copy ID)
- Create a bot by messaging @BotFather on Telegram
- Copy the bot token
- Add the bot to your channel/group
- Get your chat ID (you can use @userinfobot)
{
"platforms": {
"discord": {
"token": "your_discord_bot_token",
"channels": {
"alerts": "123456789012345678",
"general": "987654321098765432"
}
},
"telegram": {
"token": "your_telegram_bot_token",
"channels": {
"alerts": "-1001234567890",
"general": "@your_channel_username"
}
}
},
"defaults": {
"platform": "discord",
"channel": "general"
}
}# Send to default platform and channel
npx pushr -m "Deployment completed successfully! β
"
# Send to specific platform
npx pushr --discord -m "Server is back online"
npx pushr --telegram -m "Build finished"
# Send to specific channel
npx pushr --discord --channel alerts -m "Critical error detected!"# Dry run (see what would be sent without actually sending)
npx pushr --dry-run -m "Test message"
# Send with custom formatting (Discord)
npx pushr --discord -m "**Bold text** and *italic text*"
# Send to multiple platforms (coming soon!)
npx pushr --all -m "Important announcement"You can override the config file location using:
export PUSHR_CONFIG_PATH=/path/to/your/config.jsonUsage: pushr [options]
Options:
-m, --message <text> Message to send (required)
--discord Send to Discord
--telegram Send to Telegram
--channel <name> Target channel name
--channelID <id> Direct channel/chat ID
--format <type> Message format (plain, markdown, embed)
--silent Silent mode (no output)
--config <path> Custom config file path
--dry-run Show what would be sent without sending
-h, --help Show help
-v, --version Show version
git clone https://github.com/juunnx/pushr.git
cd pushr
npm installnpm run build# Test the built CLI
node dist/index.js --help
# Test with npx
npm pack
npm install -g pushr-*.tgzWe love contributions! Whether it's:
- π Bug reports
- π‘ Feature requests
- π Documentation improvements
- π§ Code contributions
Please feel free to open an issue or submit a pull request.
Want to add support for Slack, Microsoft Teams, or other platforms? Check out our contribution guide for details on how to implement new platform integrations.
# GitHub Actions
- name: Notify deployment
run: npx pushr --discord --channel deployments -m "π Production deployment completed for ${{ github.sha }}"
# GitLab CI
script:
- npx pushr --telegram -m "β
Pipeline $CI_PIPELINE_ID completed successfully"# Cron job for disk space monitoring
0 */6 * * * /usr/bin/npx pushr -m "πΎ Disk usage: $(df -h / | awk 'NR==2{print $5}')"
# Docker container health check
npx pushr --discord --channel alerts -m "π³ Container $CONTAINER_NAME is healthy"# After successful tests
npm test && npx pushr -m "β
All tests passed!"
# Database backup completion
pg_dump mydb > backup.sql && npx pushr -m "πΎ Database backup completed"- π Tokens are stored locally in your home directory
- π« No data is sent to external services except the target platforms
- π‘οΈ Configuration files have restricted permissions (600)
- π Use
--dry-runto verify messages before sending
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Bun for blazing fast performance
- Powered by yargs for excellent CLI experience
- Inspired by the need for simple, unified notifications
Made with β€οΈ for developers who love staying connected