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

subaya

v1.0.6

Published

A CLI tool for generating boilerplate code for Next.js projects.

Readme

Subaya

A CLI tool for frontend development that automates image optimization, state management, API configuration, and more.

Installation

npm i subaya

Usage

Run commands with npx subaya from your project root.

Single-command categories

| Command | Description | | ------------------------- | ------------------------------------------------- | | npx subaya route | Generate Next.js route files | | npx subaya icon | Convert SVG files to React components | | npx subaya api | Generate API client files (oRPC) | | npx subaya env | Generate .env template and env type definitions | | npx subaya localstorage | Generate LocalStorage state utility | | npx subaya state | Generate global state (Zustand-based) | | npx subaya supabase | Connect and configure Supabase | | npx subaya share | Generate SNS sharing utility and hook |

Image subcommands

| Command | Description | | --------------------------- | --------------------------------------------------------------------- | | npx subaya image optimize | Optimize images (WebP conversion; optional resize by filename suffix) | | npx subaya image removebg | Remove background from PNG images | | npx subaya image resize | Resize specific images |


Configuration

Configuration is optional. Create subaya.config.js in your project root (the directory where you run npx subaya). If the file is missing, defaults are used and a warning is printed.

Location: ./subaya.config.js (resolved from the current working directory)
Format: CommonJS module exporting a default object.

Schema

// subaya.config.js
module.exports = {
  image: {
    optimize: {
      // Optional. Max width (px) for images whose filename ends with _bg, _mbg, _thumb, or _icon.
      // Only the keys below are read; values must be numbers.
      maxWidth: {
        bg: 1920, // e.g. hero_bg.png → resized to max 1920px width
        mbg: 800, // e.g. section_mbg.png
        thumb: 400, // e.g. photo_thumb.png
        icon: 64, // e.g. logo_icon.png
      },
    },
    removebg: {
      // Required for `subaya image removebg`. API key for the background-removal service.
      removebgApiKey: process.env.REMOVEBG_API_KEY || null,
    },
  },
  api: {
    // Used by `subaya api` (oRPC) to fetch schema from your API.
    baseUrl: process.env.API_BASE_URL || null,
    consistentTypeImports: true, // for eslint
    infiniteParams: ["latestDate", "earliestDate"], // for react infinity query params
  },
}

Config reference

| Field | Used by | Description | | ------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | image.optimize.maxWidth | subaya image optimize | When an image filename ends with _bg, _mbg, _thumb, or _icon, the image is resized so its width does not exceed the corresponding value (in pixels). Omitted keys are ignored. Percent-based resize (e.g. _50%) is handled automatically and does not use this config. | | image.removebg.removebgApiKey | subaya image removebg | API key for the background-removal service. If not set, the command will warn and skip API-based removal. | | api.baseUrl | subaya api | Base URL of your API. Used by the oRPC generator to fetch the schema. If not set, the command will warn. |


Requirements

  • Node.js (see your project’s supported version).
  • Optional: @imgly/background-removal-node is a peer dependency for subaya image removebg. Install it in your project if you use background removal.

License

ISC