
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
twitter-stream-cli
Advanced tools
Twitter streams. This is a cli tool and also a npm lib.
Firebase Databasepm2This tool requires node.js. I suggest you to use nvm
npm install twitter-stream-cli -g
.env file:touch .env
# or use wget
wget https://raw.githubusercontent.com/saitodisse/twitter-stream-cli/master/.env-example -O .env
.env file:# Twitter API keys: https://apps.twitter.com
CONSUMER_KEY=__XXX__
CONSUMER_SECRET=__XXX__
TOKEN=__XXX__
TOKEN_SECRET=__XXX__
# [optional] Firebase: https://console.firebase.google.com
FIREBASE_APIKEY=__XXX__
FIREBASE_DATABASEURL=__XXX__
# will track banana
twitter-stream-cli banana
# will track banana tweets OR chocolate tweets
twitter-stream-cli banana chocolate
# will track banana and chocolate in the same tweet message
twitter-stream-cli "banana chocolate"
twitter-stream-cli banana --short #output: @user (lang): 80 char tweet text
twitter-stream-cli banana --long #output: @user (lang, id, date): full tweet text
twitter-stream-cli banana --json #output: full json result
twitter-stream-cli banana --json-formatted #output: full formatted json result
twitter-stream-cli banana --json-inspect #output: inspect json result with colors
Edit .env file. Replace __XXX__ on FIREBASE_URL=https://__XXX__.firebaseio.com:
Send results
twitter-stream-cli banana --send
We can easily run multiples instances of this tool with pm2.
npm i pm2 -g
Create app.json
mkdir pm2
touch pm2/app.json
Edit app.json:
{
"apps" : [
{
"name" : "banana",
"script" : "twitter-stream-cli",
"args" : ["banana"],
"log_date_format" : "YYYY-MM-DD HH:mm:ss Z",
"autorestart" : true,
"exec_mode" : "fork",
"max_memory_restart": "100M",
},
{
"name" : "chocolate",
"script" : "twitter-stream-cli",
"args" : ["chocolate"],
"log_date_format" : "YYYY-MM-DD HH:mm:ss Z",
"autorestart" : true,
"exec_mode" : "fork",
"max_memory_restart": "100M",
},
]
}
Now you can start watching banana & cholocate in separeted instances. This will send to differents firebase URLs.
# edit pm2/app.json with your tracking terms
pm2 start pm2/app.json
Check is everything is running ok:
# you can see logs and monitore
pm2 list
pm2 monit
# delete and stop all instances
pm2 delete all
npm install twitter-stream-cli --save
// ES5
var TwiterStream require('twitter-stream-cli');
var twiterStream = new TwiterStream({
track: 'banana'
});
return twiterStream.run();
// ES6
import TwiterStream from 'twitter-stream-cli';
const twiterStream = new TwiterStream({
track: 'banana'
});
return twiterStream.run();
git clone git@github.com:saitodisse/twitter-stream-cli.git
cd twitter-stream-cli
npm install
npm test
node ./bin/twitter-stream-cli.js -h
# all available tasks
gulp help
FAQs
Twitter streams cli tool
We found that twitter-stream-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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.