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

skaffy

v1.1.0

Published

Tired of creating the same folders and files, well... Say hi to skaffy

Downloads

3

Readme

skaffy

A simple little boilerplate generator for rapid development

Are you tired of creating the same structure of files and directories, then copying the same old snippets to those files again and again ??

Here is what you can do:

Create boilerplates > Save it > Re-use it again a million times !!

Try it out !!

$ npm install skaffy -g  # install it globally
$ skaffy -l t # list existing templates
$ skaffy -u <template-name>  # use a template
$ skaffy -s <template-name>  # preview a templates output

Features

  • Craft and re-use boilerplates instantly
  • Preview a templates output before deploying
  • Fork templates from a directory or a repo (Coming soon...).

What are boiler plates ?

Boilerplates are repeated pieces of code, distribtued in one or more files and directories while possessing similar structures.

You can find them anywhere in any programing language. Mainly in structures that follow a definite software design pattern.

Here is a quick example:

└─── Controllers
     ├──── PotatoController.cs
└─── Models
     ├──── PotatoModels.cs
└─── Views
     └─── Potato
          ├──── Potato.aspx
          ├──── PotatoSuccess.aspx
└─── Scripts
     ├──── Potato.js
└─── Styles     
     ├──── Potato.css

These kinds of patterns can be found in almost any programming language or software components, from Ruby on Rails to .NET MVC to your typical React, Vue or Angular component.

Step by Step

Using skaffy is as simple as the following steps:

Step 1

Install skaffy on your working machine.

$ npm install skaffy

Step 2

Initialize your skaffy_templates directory. (This is where skaffy stores all your boilerplates)

$ skaffy

On the first run, skaffy will try to initialize itself by setting up a templates directory and loading existing samples templates in that directory.

It will ask you for a path to store your templates as shown in the image below.

If you do not provide a storage path, skaffy automatically assignes a default storage path (i.e the your home folder).

You can leave it as default or update it later on. ( Pressing enter and moving forward is recommended for now )

Here is how the procedure looks like:

skaffy_init

Running skaffy for the first time will automatically execute the following command:

$ scaff -i new

Scaffy comes with a number of pre-defined templates as samples which you can use or improvise upon as per your need. This command will load those templates in your templates folder at your disposal.

Once the templates folder gets initialized, you will start seeing a different message when executing the skaffy command.

Something like this :

skaffy_after_init

Step 3

Since skaffy comes with a couple of commonly used boiler plates. You can instantly see it in action.

Do check out the samples directory in the project repo to see how the templates are crafted.

List all the existing templates

# syntax :
$ skaffy [-l|--list] [t|templates]

# example :
$ skaffy -l t  # short approach

Here is what it looks like :

skaffy_init

Using an existing template

In order to use a template, you need to navigate to the directory where you wish to use the template.

Once in that directory, you can execute the following command:

# syntax :
$ skaffy [-u|--use] <template-name>

# example :
$ skaffy -u basic-html  # short approach

Here is how it looks like in action:

skaffy_init

Preview the output before use

It is always recommended to preview the results before you use a skaffy template.

It will provide you with the necessary insights like

  • what directories will get created,
  • where and with what names,
  • how many files will be created,
  • what will the files contain etc.

In your workspace directory where you will actually use the template, you can execute the following command:

# syntax :
$ skaffy [-s|--show] <template-name>

# example :
$ skaffy -s basic-html  # short approach

Here is how it looks like in action:

skaffy_show_template

A basic skaffy template

A bare minimum skaffy template consists of your boilerplate files (optional) and a template.json file that controls it.

Here is a quick look at one of the pre-existing templates folder structure i.e basic-html template

└─── skaffy_templates
    └─── basic-html
         ├──── {{file_name}}.html
         ├──── template.json
    └─── . . .

Here {{file_name}} is a template string that is replaced when the template is executed. It is defined in the template.json file along with rest of the other template strings that are used by the template.

The template is controlled by the template.json file and what ever configurations you have provided in that file.

{
  "name": "basic-html",
  "pre-delimeter": "{{",
  "post-delimeter": "}}",
  "tags": [
    "html",
    "web"
  ],
  "description": "A basic html5 template",
  "keys": [
    {
      "kid": "s1",
      "name": "file_name",
      "default": "index",
      "required": true,
      "description": "Your HTML File name: "
    },
    {
      "kid": "s2",
      "name": "title",
      "default": "HTML",
      "required": true,
      "description": "Page title: "
    },
    {
      "kid": "s3",
      "name": "description",
      "default": ""
    },
    {
      "kid": "s4",
      "name": "author",
      "default": ""
    }
  ]
}

Crafting your own skaffy boilerplate/template

Crafting a boiler plate is as simple as creating your own template folder in the skaffy_templates directory and adding up a couple of files. Here is how you can do it :

Manual approach

  1. In your skaffy_templates directory, start by creating a directory with a meaningful name. lets say: potato-template.

    └─── skaffy_templates
       └─── potato-template  #your-template-name
  2. Within your template folder create a template.json file. You can copy the template.json data from above for now and add up more template strings as per your requirements.

  3. Craft your template structure. Your template can be of any structure. It can be as simple as this :

    └─── skaffy_templates
         └─── potato-template 
             ├──── {{file_name}}.html
             ├──── template.json

    or as complex as this :

    └─── skaffy_templates
         └─── potato-template
             └─── Controllers
                  ├──── {{module_name}}Controller.cs
             └─── Models
                  ├──── {{module_name}}Models.cs
             └─── Views
                  └─── Potato
                       ├──── {{module_name}}.aspx
                       ├──── {{module_name}}Success.aspx
             └─── Scripts
                  ├──── {{module_name}}.js
             └─── Styles     
                  ├──── {{module_name}}.css
             ├──── template.json

Check out the samples folder in the project repo to get the idea of creating various types of templates as per your need.

  1. Invoke skaffy and you will already find your template in the list
$ skaffy -l t  # short approach
└─── basic-html
└─── potato-template   #your template
  1. Use your template. Head over to your projects directory and use the template
$ skaffy -u potato-html

Thats it!!

To Do

  • [ ] Initialize template directory from terminal.
  • [ ] Create more standard and popular templates
  • [ ] Implement template forking and pulling from git repos.