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

hubot-better-help

v0.1.1

Published

A friendlier help command

Downloads

11

Readme

hubot-better-help

Join the chat at https://gitter.im/CruAlbania/hubot-better-help

Build Status npm version npm License: MIT

A more friendly help command.

hubot-better-help provides a better help experience than the out-of-the-box hubot standard help. Command options are organized by the script in which they are found, which reduces noise when a user is trying to figure out what hubot can do.

bob  > hubot help
hubot> bob: I can do a lot of things!  Which would you like to know more about? You can say:  

* hubot help hangouts - Create hangouts with Hubot.  
* hubot help meme - Get a meme from http://memecaptain.com/  
* hubot help pugme - Pugme is the most important thing in life  
* hubot help maps - Interacts with the Google Maps API.  
* hubot help rules - Make sure that hubot knows the rules.  
* hubot help rss-reader - Hubot RSS Reader  
* hubot help youtube - YouTube video search  
* hubot help shipit - Rodent Motivation  


Or you can see all commands by typing `hubot help all`.

The user can dive in deeper by specifying the name of the script or module in which the commands are defined:

bob  > hubot help meme
hubot> bob: Get a meme from http://memecaptain.com/  

* hubot <text> (SUCCESS|NAILED IT) - Meme: Success kid w/ top caption  
* hubot <text> ALL the <things> - Meme: ALL THE THINGS  
* hubot <text> TOO DAMN <high> - Meme: THE RENT IS TOO DAMN HIGH guy  
* hubot <text>, <text> EVERYWHERE - Meme: Generates Buzz Lightyear  
* hubot <text>, AND IT'S GONE - Meme: Bank Teller  
* hubot <text>, BITCH PLEASE <text> - Meme: Yao Ming  
* hubot <text>, COURAGE <text> - Meme: Courage Wolf  
* hubot Aliens guy <text> - Meme: Aliens guy  
* hubot All your <text> are belong to <text> - Meme: All your <text> are belong to <text>  
* hubot Brace yourself <text> - Meme: Ned Stark braces for <text>  
* hubot I don't always <something> but when i do <text> - Meme: The Most Interesting man in the World  
* hubot IF <text> THAT'D BE GREAT - Meme: Generates Lumberg  
* hubot IF YOU <text> GONNA HAVE A BAD TIME - Meme: Ski Instructor  
* hubot IF YOU <text> TROLLFACE <text> - Meme: Troll Face  
* hubot If <text>, <question> <text>? - Meme: Philosoraptor  
* hubot Iron Price <text> - Meme: To get <text>? Pay the iron price!  
* hubot MUCH <text> (SO|VERY) <text> - Meme: Generates Doge  
* hubot Not sure if <something> or <something else> - Meme: Futurama Fry  
* hubot ONE DOES NOT SIMPLY <text> - Meme: Boromir  
* hubot WHAT IF I TOLD YOU <text> - Meme: Morpheus "What if I told you"  
* hubot WTF <text> - Meme: Picard WTF  
* hubot Y U NO <text> - Meme: Y U NO GUY w/ bottom caption  
* hubot Yo dawg <text> so <text> - Meme: Yo Dawg  
* hubot khanify <text> - Meme: Has Shatner yell your phrase  
* hubot pun | bad joke eel <text> / <text> - Meme: Bad joke eel  
* hubot pun | bad joke eel <text>? <text> - Meme: Bad joke eel

If the user messes up a command then the help module tries to figure out what they meant:

bob  > hubot brace your self for awesome help!
hubot> bob: Sorry, I didn't catch that.  Try one of these?
* hubot Brace yourself <text> - Meme: Ned Stark braces for <text>

The module also responds to mentions or greetings in order to introduce itself, so that new users can discover hubot and learn what it can do

*sally has entered the room
bob  > Hi sally!  Welcome to the chat.  If you need help with anything you can always ask hubot.
hubot> Hi, I'm hubot.  Nice to meet you!
You can ask me a question by typing my name, or even direct messaging me!
Try it now by typing this:
`hubot help`

sally> hi hubot
hubot> Hiya!  Want to ask me a question?  Just type `hubot help`

hubot-better-help accomplishes all this by re-implementing the parsing logic of Hubot. Normally Hubot parses the header files of scripts and then combines all the commands in one array. hubot-better-help instead maintains an associative array of module names to commands, and combines them on the fly. This allows to to reduce a lot of noise when you start including a significant number of modules, or those modules like "hubot-memes" which have a lot of commands.

Installation

In hubot project repo, run:

npm install hubot-better-help --save

Then add hubot-better-help to your external-scripts.json:

["hubot-better-help"]