
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
FCM(Firebase Cloud Messaging Client) Development tool working on CLI to avoid a troublesome testing of Push Notification on the terminal
$ yarn global add fcm-cli <or> npm install -g fcm-cli
$ fcm --help
$ fcm [command] <sources> <params> <configs...>
send: Sending push message only. It requires:
title and body should be exist if you'd use notification property. It's built on top of fcm-node, Please refer to get mode information.watch: Watching changes on database url and send push notification message. It requires:
Service Account Credential. You can get the credential file from Firebase Admin Setup
)# sending FCM push message by passed configs
$ fcm send --server-key $SERVER_KEY --to $TOKEN \
--notification.title hi \
--notification.body message
# save configs in global named by 'pwa-app1' after sending message
$ fcm send pwa-app1 --server-key $SERVER_KEY --to $TOKEN \
--notification.title hi \
--notification.body message
# loading configs by 'pwa-app1 and then sending message
$ fcm send pwa-app1 --notification.title hi --notification.body message
# loading configs by 'pwa-app1' and sending message to multiple peers
$ fcm send pwa-app1 --to $PEER1_TOKEN --to $PEER2_TOKEN \
--notification.title hi \
--notification.body message
# loading configs from firebaseConfig properties at firebase.json
$ fcm send firebase.json firebaseConfig \
--notification.title hi \
--notification.body message
# loading configs from .env file and strip out FIREBASE_ prefix in keys
$ fcm send .env FIREBASE_ --notification.title hi --notification.body message
# watch Firebase database and sending push when it's changed
fcm watch test1 --credential $PRJECT/conf/credential.json \
--database-url https://yourapp-id.firebaseio.com/
It's working in a similar way of other tools, are supporting RESTful APIs of Firebase, are working on terminal, like curl. However, those of another tools and commands is so hard and not handy to use while test as we frequently modify configurations on terminal. This package supports saving and loading pre-configuration by alias, loading from json with specific property and also .env which have simple key and value format. So, we don't need to pass all of configuration everytime. We can just put in simple updatable messages with alias
# first time, sending FCM push message with all of configs and alias for saving
$ fcm send test1 --server-key $SERVER_KEY --to $TOKEN \
--notification.title hi \
--notification.body message
# second time, we don't need to pass keys configuration its already saved before named by test1
$ fcm send test1 --notification.title hi --notification.body message2
# the next time or next day, we can just call alias to test
$ fcm send test1
# if you have json or env file having Firebase configurations, just pass its path to
$ fcm send .env --notification.title hi --notification.body message2
$ fcm send firebase.json --notification.title hi --notification.body message2
# may your configurations have parent property or prefix to distingush from other values. Just pass
# third param with .env or json files. It will works, remove prefix or find property depends on files type
$ fcm send .env FIREBASE_ --notification.title hi --notification.body message2
$ fcm send firebase.json firebaseConfig --notification.title hi --notification.body message2
fcm watch test1 --credential $PRJECT/conf/credential.json \
--database-url https://react-pwa-hello-world.firebaseio.com/
~/.config/configstore/, with package name, fcm-cli. You can have a look what is saved.cat ~/.config/configstore/fcm-cli.json
{
"test1": {
"serverKey": "SERVER-KEY",
"to": "LAST-SENT-TO-TOKEN",
"notification": {
"title": "hi",
"body": "Welcome Push World"
},
"credential": "/Users/ragingwind/Downloads/credential.json",
"apiKey": "-LADPTQtqD54TWdMzmZk",
"databaseURL": "https://react-pwa-hello-world.firebaseio.com/"
}
}
MIT © Jimmy Moon
FAQs
FCM(Firebase Cloud Messaging Client) for CLI
We found that fcm-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.