Sending Firebase push notifications should be simple.
But in reality, it usually means:
- setting up Firebase Admin SDK
- writing boilerplate code
- managing credentials
- rebuilding scripts again and again
So I built a tool to fix that.
β‘ Meet FCM CLI
A lightweight CLI to send Firebase Cloud Messaging (FCM) notifications directly from your terminal, CI/CD pipelines, or backend scripts.
fcm -t TOKEN -n '{"title":"Hi","body":"Hello"}'
Thatβs it.
π‘ Why I built it
As a developer, I kept running into the same problems:
- I just wanted to test a push notification quickly
- I didnβt want to write a full Firebase script
- CI/CD pipelines needed a simple way to send notifications
- Existing tools felt heavy or overcomplicated
So I created something:
- simple
- fast
- developer-friendly
π₯ Features
- π Send notifications in seconds
- β‘ Works in CI/CD pipelines
- π¦ Single binary (no dependencies)
- π§© YAML config + profiles
- π
.envsupport - π Batch sending (
--tokens-file) - π― Supports token, topic, and conditions
- π Retry with exponential backoff
- π€ Structured JSON output for automation
- π Works from any language through CLI execution
π§© YAML config (game changer)
Instead of writing scripts, you can define everything in fcm.yaml:
notification:
title: Hello
body: World
profiles:
prod:
topic: production
notification:
title: Deploy
body: New version released
Run:
fcm --config fcm.yaml --profile prod
β‘ Batch sending
fcm --tokens-file tokens.txt -n '{"title":"Hello","body":"Batch"}'
π§ Use cases
- Testing push notifications
- CI/CD automation
- Backend scripts
- Debugging Firebase messaging
- Bulk notifications
π― Goal
Make push notifications:
- simpler
- faster
- less painful
π¦ Installation
curl -fsSL https://raw.githubusercontent.com/interdev7/fcm-cli/main/install.sh | bash
or:
brew tap interdev7/fcm
brew install fcm
β€οΈ Open Source
The project is fully open-source.
If it saves you time or helps your workflow β consider supporting it.
π GitHub
π https://github.com/interdev7/fcm-cli
π¬ Feedback
Would love to hear what you think π
Top comments (0)