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

@eyk/cook

v1.3.0

Published

Create your own boilerplate files, folders and more

Readme

Key Features

  • Create boilerplates containing files and folders with one command
  • Use unlimited variables / placeholders which will be filled on creation
  • Runs on Windows, MacOS and Linux

Installation

With yarn:

yarn global add @eyk/cook

With npm:

npm install -g @eyk/cook

Usage

Creating a Boilerplate

All boilerplates are stored in a newly created directory at HOMEDIR/.cook. You can create a new boilerplate by either creating a folder in this directory or using the following command.

cook create <name>

This command will create a new (empty) directory with the given name. You can modify the content by navigating into it.

Furthermore, you got the option to copy an existing directory into the newly created boilerplate folder automatically. This can be done by using the --copy flag.

Example:

# Copying the current working directory
cook create test --copy

# Copying a specific folder
cook create test --copy preparedFolder/

Cloning Boilerplates from Github

The remote boilerplate needs to be stored inside a folder called template.

template
└─── [any template files or folders]
│ [any other files]

Afterwards, you can copy/download it by using the copy flag.

cook create <name> --copy user/repo

Variables

Cook's boilerplates aren't static. You can use variables inside of folder names, file names and the files' content.

Syntax:

  • {{ variableName }} for using variables in file & folder names
  • c{{ variableName }} for using variables inside of files

The c letter in front of the curly-braces has no special meaning, but it ensures there won't be any conflicts with other curly-braces like in Vue.js files.

Example of creating a boilerplate for a React.js component:

# Current working directory
my-boilerplate
└─── {{name}}
    │   {{name}}.js
    │   {{name}}.css
// {{name}}.js file
import React from 'react';
import 'c{{name}}.css';

export default props => {
  return <div className="c{{name}}"></div>;
};

Command:

cook create rc --copy my-boilerplate

Applying Boilerplates

To apply a boilerplate, use the following command.

cook <name> [targetDir]

This will copy the named boilerplate into the target dir (or, if not specified, into the current working directory)

If you have used any variables, you can specify their value by using flags.

Optionally, you are able to not use any flags to set variables. You'll be prompted to fill in a value for any missing variable flag.

Example:

Specified variables: name, counter

Command:

cook <name> [targetDir] --name HelloWorld --counter 0

This will replace all occurrences of name and counter inside of pathnames and content.

Listing existing Boilerplates

If you want to get a list of all existing boilerplates, you can use the following command.

cook list

Removing Boilerplates

To remove a boilerplate, use the following command.

cook remove <name>

License

MIT