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

@dev-belts/core

v0.1.3

Published

Fast command launcher with fuzzy search

Downloads

258

Readme

cmd — Command Launcher

Fast terminal command launcher with fuzzy search, live output, form inputs, and cwd-aware detection.

TypeScript React Node.js


Install

npm install -g @dev-belts/core

That's it. The cmd binary is now in your PATH.

cmd                  # open TUI in current terminal
cmd -e               # open command explorer in floating Alacritty (bind to Ctrl+/)
cmd -L btop          # open any app in floating Alacritty
cmd -L lazygit

Features

| Feature | Description | |---|---| | Fuzzy search | Search by name, description, or short alias (code) | | Filter bar | Tab through ALL / LOCAL / NPM / MAKE categories | | Form inputs | Commands can prompt for text, number, password, or choice before running | | CWD-aware | Detects the focused terminal's cwd — commands run there | | Global + local commands | ~/.commands/ global + .commands/ per-project | | NPM scripts | Auto-detects package.json scripts in current directory | | Makefile targets | Auto-detects Makefile targets annotated with ## descriptions | | Live output panel | Background runs stream stdout/stderr inline in the TUI | | System notifications | Desktop notification on command success or failure | | Clipboard | copy: commands put text straight into the clipboard | | Floating launcher | Alfred/Raycast-style with cmd --launcher | | Folder history | Recently opened directories saved to ~/.cmd/folders_history | | Cross-platform | macOS (Hammerspoon) and Linux (Hyprland, X11, Wayland) |


Hotkey Setup

macOS

cmd --setup-keys

This checks for Hammerspoon, installs the Ctrl+/ binding, and reloads the config. If anything is missing, it tells you exactly what to do (and makes it fun).

Hyprland

Add to ~/.config/hypr/hyprland.conf:

bind = CTRL, slash, exec, cmd -e

Other Linux (sxhkd, i3/Sway, GNOME, KDE)

# sxhkd (~/.config/sxhkd/sxhkdrc)
ctrl + slash
    cmd -e

# i3 / Sway
bindsym Ctrl+slash exec cmd -e

The launcher auto-detects available terminals: alacritty → kitty → foot → wezterm → gnome-terminal → konsole → xterm.

Floating window for any app

Use cmd --launcher (or -L) to open any TUI app in a floating Alacritty window:

cmd -L btop
cmd -L lazygit
cmd -L htop
WIDTH=1400 HEIGHT=900 cmd -L htop   # custom window size

Keyboard Shortcuts

Main TUI

| Key | Action | |---|---| | ↑ / ↓ | Navigate the command list | | Tab / Shift+Tab | Next / previous filter category | | Enter | Execute selected command | | Esc or Ctrl+C | Quit |

While a Command is Running

| Key | Action | |---|---| | PgUp / PgDn | Scroll live output panel | | Ctrl+X | Kill the running process | | Esc or Ctrl+C | Quit (process continues detached) |

Input Form (when a command has inputs:)

| Key | Action | |---|---| | Enter | Confirm current field and advance | | ↑ / ↓ | Navigate choices (for choice type) | | Backspace | Delete last character | | Esc | Cancel and return to list |

Confirm Dialog

| Key | Action | |---|---| | Enter | Execute the command | | P | Toggle password visibility | | Esc | Cancel |


Command Format

Commands are YAML files in ~/.commands/ (global) or .commands/ inside any project (local).

name: "My Command"
description: "Optional description shown in the list"
code: "mc"          # short alias for fuzzy search (optional)
run: "echo hello"   # execute in shell  ← mutually exclusive
copy: "some text"   # copy to clipboard ←

Basic Examples

# ~/.commands/gs.yml
name: "Git Status"
description: "Show repo status"
code: gst
run: git status
# ~/.commands/token.yml
name: "Copy API Token"
code: tok
copy: "Bearer eyJhbGci..."
# .commands/deploy.yml  ← local to the project
name: "Deploy"
description: "Build and deploy"
code: dep
run: npm run build && ./deploy.sh

Local commands show a [local] badge and run in the project directory.


Command Inputs

Commands can define interactive inputs using inputs:. Use {{key}} placeholders in run: or copy:.

text — Free text:

name: "SSH into server"
run: "ssh {{host}}"
inputs:
  host:
    type: text
    question: "Hostname or IP?"

number — Digits only:

name: "Repeat echo"
run: "for i in {1..{{count}}}; do echo hello; done"
inputs:
  count:
    type: number
    question: "How many times?"

password — Masked in UI and confirm dialog:

name: "Database dump"
run: "mysqldump -u {{user}} -p{{password}} mydb > backup.sql"
inputs:
  user:
    type: text
    question: "MySQL username?"
  password:
    type: password
    question: "MySQL password?"

choice — Pick from a list (↑↓ to navigate):

name: "Deploy to environment"
run: "ssh {{server}} 'cd /app && git pull'"
inputs:
  server:
    type: choice
    question: "Which server?"
    choices:
      - "production:prod.example.com"   # "label:value" format
      - "staging:stage.example.com"

The label:value format shows production in the UI but substitutes prod.example.com into the command.


Auto-detected Sources

NPM Scripts

When cmd is launched in a directory with package.json, all scripts are loaded automatically. Add descriptions with // scriptname: description comments:

{
  "scripts": {
    "build": "tsc",
    "//build": "Compile TypeScript files",
    "dev": "tsc --watch"
  }
}

These appear with an [npm] badge. Press TabNPM to filter.

Makefile Targets

Targets annotated with ## description are auto-loaded:

build: ## Compile the project
	tsc

deploy: ## Deploy to production
	./deploy.sh

These appear with a [make] badge. Press TabMAKE to filter.


Filter Bar

Press Tab to cycle through categories. Press Shift+Tab to go backwards.

| Filter | Shows | |---|---| | TODOS | All commands | | LOCAL | Commands from .commands/ in the current project | | NPM | Scripts from package.json | | MAKE | Targets from Makefile |


File Structure

~/.commands/          ← global commands (YAML files)
~/.cmd/
  cache/              ← run output + metadata
    <run-id>/
      stdout          ← captured process output
      meta.json       ← pid, status, exit code, timestamps
  folders_history     ← recently opened directories (max 15)

<project>/
  .commands/          ← local project commands (YAML files)

Platform Support

| Platform | Hotkey | Setup | |---|---|---| | macOS | Ctrl+/ via Hammerspoon | cmd --setup-keys | | Hyprland | bind = CTRL, slash, exec, cmd -e | Edit hyprland.conf | | Linux X11 | sxhkd / KDE / GNOME shortcuts | Edit config file |