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

bun-scripty

v1.0.8

Published

Scripty for Bun

Downloads

16

Readme

Bun-Scripty

Bun-Scripty is a tool that enables you to define npm scripts in separate TypeScript files, designed specifically for use with Bun. This project is inspired by the excellent scripty by Test Double.

Why Bun-Scripty?

Instead of packing your package.json with a long list of scripts, Bun-Scripty allows you to organize each script into its own TypeScript file. This not only keeps your package.json cleaner but also makes each script easier to manage, debug, and scale.

Installation

To install Bun-Scripty, simply run:

bun add bun-scripty

Usage

  1. Create a scripts directory in your project root (you can customize this path later).

  2. Add your TypeScript script files inside this directory. For example, you could add scripts/test.ts for a test script.

  3. Make the script files executable with the following command:

    chmod +x scripts/test.ts
  4. Update your package.json to use Bun-Scripty for running your scripts:

    {
      "scripts": {
        "test": "bun-scripty"
      }
    }

Now, when you run bun run test, Bun-Scripty will execute the scripts/test.ts file.

Valid Script Delimiters

Bun-Scripty supports different delimiters for separating script segments, including :, and _. While : is the standard in npm scripts, it can cause issues with tab autocompletion in some environments, in which case _ may be more reliable.

For instance, the following package.json configuration will map to scripts/test/unit.ts:

{
  "scripts": {
    "test:unit": "bun-scripty",
    "test_unit": "bun-scripty"
  }
}

Customizing Script Path

By default, Bun-Scripty looks for script files in the scripts directory. To change this, you can customize the path by adding the following configuration to your package.json:

{
  "config": {
    "bun-scripty": {
      "scriptPath": "custom/path"
    }
  }
}

Alternatively, you can set the BUN_SCRIPTY_SCRIPT_PATH environment variable to the desired path.

export BUN_SCRIPTY_SCRIPT_PATH="custom/path"

Features

  • Organize npm scripts into separate, maintainable TypeScript files.
  • Support for nested directories for more complex script structures.
  • Works seamlessly with Bun.
  • Easily customizable script paths.

Limitations and Future Plans

  • Current Limitation: Bun-Scripty currently supports only TypeScript (.ts) files.
  • Future Plans: We aim to expand support to other languages, similar to the original scripty project.

Acknowledgements

This project is heavily inspired by scripty from Test Double. We extend our gratitude for their well-structured solution, which served as the basis for Bun-Scripty.

License

This project is licensed under the MIT License.

Contributing

We welcome contributions! Feel free to submit a pull request with your improvements or ideas.