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 🙏

© 2024 – Pkg Stats / Ryan Hefner

buddhy-botkit

v0.0.2

Published

A botkit-based Slack bot for Zendesk Inbox

Downloads

3

Readme

Buddhy-botkit

A botkit-based Slack bot for Inbox development.

Running

The following environment variables are things you'll need. You can put them in a .env file. You can also use /secrets; a file called /secrets/FOO with content bar is the same as setting FOO=bar in the environment.

  • SLACK_TOKEN - REQUIRED This connects the app to a Slack bot user.
  • BRAIN_JSON_DIR - Stores Buddhy's brain in a directory of JSON files. (Useful for development.) Use ./brain for a clean git status.
  • BRAIN_REDIS_URL - Stores Buddhy's brain in Redis.
  • BING_ACCOUNT_KEY - for Bing search API, including images (and pugs).
  • WUNDERGROUND_KEY - for weather services

Hacking

Pull requests welcome.

Running locally

$ echo 'SHELLBOT=1' >> .env
$ npm install
$ npm run dev

This will start up nodemon, so it'll restart on file changes. You'll interact with the bot using the shell. Type \? to get help on the shell's commands.

If you're running VS Code, you can just hit F5, but you'll have to manually restart when you change something. The shellbot doesn't work so well in this mode, though.

Writing scripts

If you want to write a Buddhy script, here's what you need to know.

First, add a new file under the scripts directory. Every file in there is automatically loaded when the bot starts up. Your script file's module.exports should have these items in it:

  • init - a function that takes a Botkit controller as an argument. This is where you add listeners (using controller.hears) and reply to commands.
  • help - An array of strings, which describe the commands your module implements. This is searched when a user asks the bot for help.
  • web - a function that takes an Express application object as an argument. Here you can add handlers for HTTP endpoints on the bot, for configuration UI, OAuth, or anything else. (Experimental.)

You can export anything else at all, but it'll be ignored by the bot.

To preview what your message will look like in Slack

Use Slack's Message Builder.

Testing

Export testable functions or objects from your module, and write a test module in the tests directory. Run the tests with npm test, which will also run the StandardJS linter.