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

create-yiffspace

v0.0.1

Published

A utility for creating various types of projects

Readme

create-yiffspace

A project generator for YiffSpace projects. Run it with Bun to scaffold a new project from a template.

Usage

bunx create-yiffspace <template> <project-name> [options]

If you have already cloned this repository, you can run it directly:

bun lib/cli.ts <template> <project-name> [options]

To scaffold into the current directory instead of creating a new one, pass . as the name and provide --name separately:

bunx create-yiffspace <template> . --name <project-name> [options]

Templates

| Template | Description | |---|---| | bun-library | Publishable Bun library with TypeScript, ESLint, build scripts, and type declarations | | bun-project | Private Bun project with TypeScript and ESLint | | node-npm-library | Publishable Node library managed with npm | | node-npm-project | Node project managed with npm | | node-pnpm-library | Publishable Node library managed with pnpm | | node-pnpm-project | Private Node project managed with pnpm |

Common options

All templates accept these options:

| Option | Type | Description | |---|---|---| | --description | string | Package description | | --repository-url | string | Git repository URL | | --homepage-url | string | Package homepage URL | | --bugs-url | string | Bug tracker URL | | --[no-]tests | boolean | Include test directory and test workflow (default: true) |

bun-library

bunx create-yiffspace bun-library <project-name> [options]

| Option | Type | Default | Description | |---|---|---|---| | --bun-version | string | 1.3.0 | Bun version to pin in packageManager and .bun-version | | --[no-]publish | boolean | true | Include npm publish workflow; removes private: true |

bun-project

bunx create-yiffspace bun-project <project-name> [options]

| Option | Type | Default | Description | |---|---|---|---| | --bun-version | string | 1.3.0 | Bun version to pin in packageManager and .bun-version |

node-npm-library

bunx create-yiffspace node-npm-library <project-name> [options]

| Option | Type | Default | Description | |---|---|---|---| | --node-version | string | 24.16.0 | Node version to pin in .node-version and workflows | | --npm-version | string | 11.15.0 | npm version to pin in packageManager | | --[no-]publish | boolean | true | Include npm publish workflow; removes private: true |

node-npm-project

bunx create-yiffspace node-npm-project <project-name> [options]

| Option | Type | Default | Description | |---|---|---|---| | --node-version | string | 24.16.0 | Node version to pin in .node-version and workflows | | --npm-version | string | 11.15.0 | npm version to pin in packageManager | | --[no-]publish | boolean | true | Include npm publish workflow; removes private: true |

node-pnpm-library

bunx create-yiffspace node-pnpm-library <project-name> [options]

| Option | Type | Default | Description | |---|---|---|---| | --node-version | string | 24.16.0 | Node version to pin in .node-version and workflows | | --pnpm-version | string | 11.3.0 | pnpm version to pin in packageManager | | --[no-]publish | boolean | true | Include npm publish workflow; removes private: true |

node-pnpm-project

bunx create-yiffspace node-pnpm-project <project-name> [options]

| Option | Type | Default | Description | |---|---|---|---| | --node-version | string | 24.16.0 | Node version to pin in .node-version and workflows | | --pnpm-version | string | 11.3.0 | pnpm version to pin in packageManager |

Global Flags

| Flag | Description | |---|---| | --name <string> | Project display name when using . as the directory (required with .) | | --package-name <string> | npm package name; defaults to the project name with spaces replaced by dashes | | --update-templates | Re-download templates from the repository into the local cache | | --help, -h | Show help |

How Templates Are Resolved

The CLI looks for templates in this order:

  1. templates/ adjacent to the script (present when the repo is cloned locally)
  2. ~/.cache/create-yiffspace/templates/ (populated on first run when the above is absent)
  3. Downloads from GitHub and populates the cache

To refresh a stale cache:

bunx create-yiffspace --update-templates

Adding a Template

Each template lives in templates/<slug>/ and consists of three parts:

options.json

Describes the template and its options. The scripts array lists shell scripts (from templates/<slug>/scripts/) to run in the generated directory after files are copied.

{
  "description": "Human-readable description shown in help",
  "args": [
    { "name": "flag-name",  "type": "boolean", "required": false, "default": true },
    { "name": "some-value", "type": "string",  "required": true,  "default": "value" }
  ],
  "scripts": ["install.sh"]
}

Supported type values: string, boolean, number.

Arg names are kebab-case in options.json and converted to camelCase in the options object (bun-versionbunVersion, repository-urlrepositoryUrl).

main.ts

A Bun script run after options are parsed, responsible for copying files from files/ into outDirectory and rendering any .eta template files. A single options object is injected as a global at runtime:

declare const options: {
    // always present
    name: string;         // project display name
    packageName: string;  // npm package name
    outDirectory: string; // absolute path to the output directory
    template: string;     // template slug

    // template-specific args (camelCase)
    bunVersion: string;
    tests: boolean;
    // ...
};

See any existing main.ts for a reference implementation.

files/

Static files copied into outDirectory. Files with a .eta extension are rendered as Eta templates with it bound to the options object, and written without the .eta suffix.

Examplefiles/package.json.eta:

{
  "name": "<%= it.packageName %>",
  "packageManager": "bun@<%= it.bunVersion %>"
}

scripts/

Shell scripts listed in options.json that execute in outDirectory after main.ts completes. If a script exits non-zero, the output directory is deleted (unless . mode was used) and the error is reported.

License

MIT