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

bdcli-deploy

v0.1.0

Published

Build and deploy projects over SSH from the current project directory.

Readme

bdcli

bdcli is a Node.js CLI for project-local build and deploy workflows. It looks for deployment config in the current directory tree, runs a build command, uploads artifacts over SSH/SFTP, and executes remote deployment commands.

Commands

bdcli init
bdcli init --with-local
bdcli build
bdcli doctor
bdcli doctor --env production
bdcli deploy
bdcli deploy staging
bdcli deploy production --dry-run
bdcli deploy production --skip-build

Config files

  • /.deploy.config.json: required primary config
  • /.deploy.local.json: optional local override config

Merge rules:

  • objects: deep merge
  • arrays: override completely
  • scalar values: local overrides primary

/.deploy.local.json is ignored by git in this repository.

Config example

{
  "version": 1,
  "project": "my-app",
  "build": {
    "command": "npm run build",
    "output": "dist"
  },
  "deploy": {
    "strategy": "upload",
    "uploadMode": "archive",
    "cleanRemoteBeforeUpload": false,
    "gitVersionInfo": {
      "enabled": true,
      "filename": "._gitVersionInfo"
    }
  },
  "environments": {
    "staging": {
      "enable": true,
      "remotePath": "/var/www/my-app-staging",
      "beforeUpload": [
        "mkdir -p /var/www/my-app-staging"
      ],
      "afterUpload": [
        "echo deployment complete"
      ]
    },
    "production": {
      "enable": false,
      "remotePath": "/var/www/my-app",
      "beforeUpload": [
        "mkdir -p /var/www/my-app"
      ],
      "afterUpload": [
        "pm2 reload my-app"
      ]
    }
  }
}

Optional local override:

{
  "environments": {
    "staging": {
      "host": "127.0.0.1",
      "port": 22,
      "username": "deploy",
      "privateKey": "C:/Users/your-name/.ssh/id_rsa"
    },
    "production": {
      "host": "127.0.0.1",
      "port": 22,
      "username": "deploy",
      "privateKey": "C:/Users/your-name/.ssh/id_rsa"
    }
  }
}

Config fields

  • version: config version for future compatibility
  • project: project name used in logs
  • build.command: local shell command for building the project
  • build.output: local artifact directory whose contents are deployed
  • deploy.strategy: currently only upload
  • deploy.uploadMode: archive or direct, default archive
  • deploy.cleanRemoteBeforeUpload: clear target directory contents before upload
  • deploy.gitVersionInfo.enabled: inject git version metadata into build output before upload, default true
  • deploy.gitVersionInfo.filename: metadata file name written into build.output, default ._gitVersionInfo
  • environments.<name>.enable: when false, deployment is blocked
  • environments.<name>.host: SSH host
  • environments.<name>.port: SSH port, default 22
  • environments.<name>.username: SSH username
  • environments.<name>.password: optional password auth
  • environments.<name>.privateKey: optional path to private key file
  • environments.<name>.passphrase: optional key passphrase
  • environments.<name>.remotePath: remote upload directory
  • environments.<name>.beforeUpload: remote commands before upload
  • environments.<name>.afterUpload: remote commands after upload

Notes

  • bdcli deploy deploys all enabled environments sequentially in config order and skips environments with enable: false
  • bdcli deploy <env> fails when enable is false
  • deploy uploads and extracts the contents inside build.output, not the outer directory itself. For example, dist/index.html is deployed as <remotePath>/index.html, not <remotePath>/dist/index.html
  • clean mode refuses / and remote paths shallower than 3 levels, and clears contents instead of deleting the directory itself
  • when git version info injection is enabled, bdcli writes a metadata file into build.output after build and before upload. If git is unavailable or metadata collection fails, bdcli logs a warning and continues
  • the default metadata file name is ._gitVersionInfo. If your web server exposes dot-underscore files, add a server rule to block external access
  • bdcli doctor validates config and attempts SSH connection
  • bdcli init --with-local creates both config files
  • config discovery walks upward from the current working directory until it finds /.deploy.config.json