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

cmdlook

v1.0.0

Published

Watch a directory and run commands when files change.

Readme

cmdlook

Watch files and run commands when they change

A tiny file watcher that runs a command whenever files in a directory are updated. Perfect for development workflows where you need to automatically rebuild, test, or restart processes when source code changes.

Usage

You get one parameter to specify what to watch, the rest is your full command.

# Specify directory to watch all files recursively
cmdlook . bun test

# Use globs to be more specific
cmdlook "./**/*.{ts,tsx}" bun run build

# Remember globs are powerful
cmdlook "{src,test,styles}/**/*.{ts,tsx,css,js,jsx,tsx,ts}" bun run format

Install

Or install locally and use with bunx:

bun install cmdlook
# or
bunx cmdlook ./src bun run build

Usage

Just use the command line arguments as you would normally - don't put it all in quotes.

]

Good to know

  • If the command is currently running while files are being updated, it will run again after the current run is finished - but only once no matter how many files got updated.
  • Press Ctrl+C to stop watching and exit cleanly

Features

  • Directory watching for monitoring specified directories recursively
  • Glob pattern support for using * and {} patterns to watch specific files
  • Command queuing for preventing overlapping executions
  • Clean exit for properly handling Ctrl+C
  • Zero dependencies for lightweight and fast operation
  • Bun optimization for using Bun.spawn for best performance

Glob Patterns

When the first parameter contains * or {, cmdlook treats it as a glob pattern:

  • **/*.ts - All TypeScript files recursively
  • *.{js,ts} - All JavaScript and TypeScript files in current directory
  • src/**/*.css - All CSS files in src directory and subdirectories
  • test/*.test.js - All test files in test directory

The tool automatically determines which directories to watch based on the matching files.

Note: Glob patterns are evaluated once at startup. New files that match the pattern created after cmdlook starts will not be detected until you restart cmdlook.

test