npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

foxtail

v0.2.0

Published

Twitter bot generator for node.js. You can easily add plugin.

Readme

FoxTail

みこーん。

Twitter bot generator for node.js
You can easily add plugin to your bot.

Installation

npm install foxtail

Easy Example

1. Setup FoxTail.

index.js

var FoxTail = require('foxtail');

var fox = new FoxTail({
    consumer_key: ...,
    consumer_secret: ...,
    access_token: ...,
    access_token_secret: ...
});

// show timeline
fox.add(function (res) {
    console.log("@" + res.screen_name + "(" + res.user_name + ") " + res.text + "\n");
});

// reply to words
fox.add(function (res) {
    if (res.text === 'hello') res.reply('world');
});

fox.run();

2. Run

$ node index.js

Example

If you want to separate plugins, you can place the plugin file into the plugin folder.

plugin/hello.js

module.exports = function (fox) {
  fox.add(function (res) {
    if (res.text === 'hello') res.reply('world');
  });
};

index.js

var FoxTail = require('foxtail');
var Path = require('path');

var fox = new FoxTail({
    consumer_key: ...,
    consumer_secret: ...,
    access_token: ...,
    access_token_secret: ...
});

fox.load(Path.resolve(__dirname, 'plugin'));
fox.run();

Very Easy!

Using foxtail npm plugins

If you want to create bot more easily, You can use the npm plugins.

This is an example.
This plugin is that reply 'hello' to 'world' in the timeline.
First, Install foxtail plugin.

$ npm install foxtail-hello-world

Add plugin name into json file.

fox.json

['foxtail-hello-world']

Add loadNpmScript to index.js.

index.js

var FoxTail = require('foxtail');
var Path = require('path');

var fox = new FoxTail({
    consumer_key: ...,
    consumer_secret: ...,
    access_token: ...,
    access_token_secret: ...
});

fox.loadNpmScript(Path.resolve(__dirname, 'fox.json'));
fox.run();

YEAR!!!!

Response Action

Tweet

fox.add(function (res) {
    if (res.text === 'foo') res.post('bar');
});

Reply

fox.add(function (res) {
    if (res.text === 'hello') res.reply('world');
});

Retweet

fox.add(function(res) {
    if (res.screen_name === 'akameco') res.retweet();
});

Favorite

fox.add(function(res) {
    if (/happy/.test(res.text)) res.favorite();
});

Schedule Tweet

install node-cron

$ npm install cron --save
var cron = require('cron');

var job = new cron.cronJob('0 0 0 * * *', function () {
  fox.post('hello');
}, null, false);

module.exports = function (fox) {
  fox.add(function () {
    job.start();
  });
};

Development

# watch
npm run watch
# build
npm run build
# test
npm test

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT