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 🙏

© 2025 – Pkg Stats / Ryan Hefner

aido

v0.3.5

Published

Slack Applications Made Simple

Downloads

16

Readme

Aido

Slack applications made simple !

Aido is a javascript framework to write Slack applications in a clean and simple way. Its intent is to take away the specificities of the Slack API, and make Slack applications code more like regular old web applications.

You can think of Aido as being a basic Single Page App framework, where your app renders as Slack messages instead of a page in a browser :

  • Design your views using a subset of HTML
  • Write your controllers as javascript classes
  • Aido handles all user interactions (button clicks, slash command invocations) for you, and updates the view accordingly

A basic example

Complete documentation can be found in the Aido wiki

Let's create a very simple Slack application :

  • It handles 1 slash command, /number
  • When the user calls it, it will display a view with a Number (initialized at 0) and two buttons
  • When the user clicks one of the buttons, it will increment / decrement the Number and refresh the view

It will render on Slack as such :

Number slash command

First we describe our view using the Pug templating language

# views/number.pug
body
  section
    p #{state.number}
  section
    button(name="increment") Add 1
    button(name="decrement") Remove 1

Then we create our Javascript program :

// index.js
const { Slash } = require('aido')

// This is our controller. In Aido it is called a Slash because it represents one slash command on the Slack workspace
class Number extends Slash {
  /**
   * Initializes the internal state of the application
   */
  initState() {
    return {
      number: 0
    }
  }

  /**
   * Increments the number. This method will be called by clicking the first button.
   * (because it has the same `name` as the button)
   */
  increment() {
    this.state.number += 1
  }

  /**
   * Decrements the number. This method will be called by clicking the second button.
   * (because it has the same `name` as the button)
   */
  decrement() {
    this.state.number -= 1
  }

  /**
   * Bonus feature : if the user types a number next to the command (`/number 6`)
   * then it will be used as a start value instead of 0
   */
  handleText() {
    const int = parseInt(this.args(0), 10) // arguments are passed as strings so they need to be parsed
    if (int) {
      this.state.number = int
    }
  }
}

// Initialize aido
aido.init({
  slash: { number: Number },
})

// Start the aido server (on port 3000 by default)
aido.start()

Digging deeper

Like what you see ?

⌨️ Jump right in the code by taking a look at the examples folder

📚 Or read the documentation in the Aido wiki