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

@widget-js/release

v1.1.0

Published

A simple Node.js CLI tool to deploy files and run commands on a remote server via SSH

Readme

@widget-js/release

![npm version](https://img.shields.io/npm/v/@widget-js/release.svg null) ![npm downloads](https://img.shields.io/npm/dm/@widget-js/release.svg null) ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg null)

A simple Node.js CLI tool built with TypeScript and tsup that helps you copy files/folders to a remote server and execute commands via SSH.

Installation

Install the package globally using npm or yarn:

npm install -g @widget-js/release
# or
yarn global add @widget-js/release

Or run it directly using npx:

npx @widget-js/release

Configuration

Create a JSON file (e.g., release.json) to define your deployment script.

Example release.json:

{
  "host": ["192.168.1.100", "nyhq"],
  "port": 22,
  "username": "root",
  "password": "your-password",
  "privateKey": "./path/to/private-key.pem",
  "passphrase": "your-key-passphrase",
  "steps": [
    {
      "type": "upload",
      "local": "./dist",
      "remote": "/var/www/app/dist",
      "pattern": "**/*",
      "ignore": ["**/*.map", "node_modules/**"]
    },
    {
      "type": "command",
      "command": "cd /var/www/app && yarn install"
    },
    {
      "type": "upload",
      "local": "./package.json",
      "remote": "/var/www/app/package.json"
    },
    {
      "type": "command",
      "command": "cd /var/www/app && pm2 restart my-app"
    }
  ]
}

Configuration Fields:

  • host (string | Array): The server's IP address, hostname, or SSH Alias. You can pass a single string or an array of strings to deploy to multiple servers. The CLI will automatically parse ~/.ssh/config to resolve HostName, User, Port, and IdentityFile if an alias is provided.
  • port (number, optional): SSH port. Default is 22. (Can be read from ~/.ssh/config)
  • username (string, optional): SSH username. (Can be read from ~/.ssh/config)
  • password (string, optional): SSH password. You can also use privateKey instead.
  • privateKey (string, optional): Path to your SSH private key file. (Can be read from ~/.ssh/config's IdentityFile)
  • passphrase (string, optional): Passphrase for the private key, if it is encrypted.
  • steps (Array): An ordered list of steps to execute.
    • Upload Step
      • type: "upload"
      • local (string): Local path relative to where you run the command.
      • remote (string): Absolute path on the remote server.
      • pattern (string, optional): Glob pattern to filter files (e.g., "**/*.js").
      • ignore (string | Array, optional): Glob pattern(s) to ignore (e.g., "**/*.map").
    • Command Step
      • type: "command"
      • command (string): Shell command to execute on the remote server.

Usage

# If no file is specified, it defaults to 'release.json'
release

# Or specify a custom config file
release ./custom-config.json

# Limit deployment to a specific host defined in your config
release --limit nyhq

# Stop execution if any host fails (by default, it skips errors and continues)
release --no-skip-error