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.js

v1.8.0

Published

A small robot written in Javascript (He does not like coffeescript)

Downloads

23

Readme

hubot.js

Build Status npm Coverage Status Maintainability dependencies-badge devDependencies Status Docker Stars Docker Pulls image-size

A small robot written in Javascript (He doesn't like coffeescript)

Hello world

Hello! My name is Hubot. I'm a robot and my job is to do stuff in Slack chats. At first, I don't know many things, but when gears are attached everything is possible. I love new gears. Feel free to create them.

start-deploy-gif

How to turn me on?

The first step is to have a bot user in Slack. If you don't have a bot yet click here to create one. With a bot user created get the token that was generated in the bot creation and go to the next step.

npm

Very simple. Run the command below.

npm install -g hubot.js

Docker

To enable me with Docker it's a piece of cake. I have a recipe of how to build me in Dockerhub. Just run the following command:

docker run -d -e BOT_API_TOKEN=bot_token \
              -e BOT_NAME=bot_name \
              -v ~/hubot.js/data:/home/node/hubot.js/data \
              -v /var/run/docker.sock:/var/run/docker.sock \
              --group-add=$(stat -c %g /var/run/docker.sock) \
              --restart="unless-stopped" \
              --name=hubot \
              robsonbittencourt/hubot.js

Usage

After you install me through npm some commands are avaliable in your command line. If you start me with Docker these commands won't are available. Help and configure are commands exclusively for console with npm installation. The other commands can be executed with Docker commands - like docker start/stop/restart.

CLI Commands Overview

# Show the help with available commands
$ hubot help                              

# Saves the required settings. These settings are stored, so you just need to do them once.
# But if necessary can make them again.
$ hubot configure -t botToken -n botName  

# Start the hubot. To use this command, the settings must have been already set up.
$ hubot start                             

# Start the hubot. This command saves the configuration and starts. 
$ hubot start -t botToken -n botName      

# Stop the hubot.
$ hubot stop                              

# Restart the hubot.
$ hubot restart                           

First iteration

After you start me call me by my name in private chat. With this I show to you some first instructions.

first-iteraction

An important detail. To ask me things on a channel I have to be participating in it.

Database

I store my configuration data in a database. This database is set to "~ home / hubot.js / data / hubot.db". It is important that you back up this file so that I do not lose my memory.

If you run me using Docker you can map the database file as shown in the runtime sample with Docker.

Activate/Deactivate Gears

You don't want to use some gear? You can disable it. If you want to activate it again it is also possible. Use activate gear-name or deactivate gear-name.

activate-deactivate-gear

Configure Gears

Some gears need to be set up before first use. Use configure gear-name command.

configure-gear

Gears

For now, I don't know how to do many things. But I'm able to understand and to use new gears (features). You can create your own gears. If you think they can be useful for other users, please share it with the world.

Jenkins

I know how to invoke your jobs in Jenkins.

hubot start job my-deploy

start-job

More details here.

Docker

I know how to manipulate your Docker containers.

restart containerName

restart-operation

More details here.

Code Review

I know how to ask for code review.

code review

code-review

More details here.

Help

If you have doubt about the available commands, please ask me for help. I'll be glad to use my gears and knowledge to answer your questions.

hubot help

help

Development setup

  • Fork and clone this project
  • In the main directory run npm installto install dependencies.
  • Write your code
  • To run tests use npm test command

Contributors

Robson Rosa

Meta

Robson Bittencourt - @rluizv - [email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/hubot-js/hubot.js