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

custom-deploy

v1.2.1

Published

CLI tool to build and send deployment artifacts via Telegram

Readme

custom-deploy

A small CLI tool that builds your project, zips the dist/ output, and sends it to a Telegram chat — handy for shipping deployment artifacts straight from your terminal.

It picks the build command based on the current git branch, archives the result, and uploads it to a Telegram bot along with a short status message (project name, branch, and the git user who triggered it).


Features

  • 🔨 Branch-aware builds — runs build-prod on PROD, build on DEV
  • 📦 Zips the dist/ folder with maximum compression
  • 🤖 Sends the archive + a status message to Telegram
  • 📁 Optional -o flag to also copy the zip to a local folder (e.g. ~/Downloads)
  • ❌ Reports failures back to Telegram automatically

Requirements

  • Node.js >= 18
  • A project with:
    • a package.json containing a name
    • npm run build and/or npm run build-prod scripts
    • a dist/ folder produced by those builds
  • A Telegram bot token and chat ID

Installation

Install globally from npm:

npm install -g custom-deploy

This exposes the deploy command anywhere on your system.

git clone https://github.com/davronkhamdamov/deploy.git
cd deploy
npm install -g .

Configuration

Create a .env file in the directory where you run deploy:

BOT_TOKEN=123456789:your-telegram-bot-token
CHAT_ID=your-telegram-chat-id

⚠️ Keep .env out of version control — it contains secrets. (It's already in .gitignore.)

How to get these values:

  • BOT_TOKEN — create a bot via @BotFather and copy the token it gives you.
  • CHAT_ID — message your bot, then visit https://api.telegram.org/bot<BOT_TOKEN>/getUpdates and read the chat.id from the response. For groups, add the bot to the group first.

Usage

Run the command from the root of the project you want to deploy, while on a prod or dev branch:

deploy

Options

| Flag | Description | |------|-------------| | -o, --output [dir] | After a successful build, also copy the zip to dir. If no path is given, defaults to ~/Downloads. |

Examples

# Build, zip, and send to Telegram
deploy

# Also copy the zip into ~/Downloads
deploy -o

# Copy the zip to a specific folder
deploy -o ~/Desktop/builds

# Long form
deploy --output /tmp/artifacts

~ is expanded to your home directory, and the output folder is created if it doesn't already exist. The original zip stays in the project root regardless.


How it works

  1. Reads the current git branch (PRODnpm run build-prod, DEVnpm run build).
  2. Runs the matching build command.
  3. Verifies dist/ exists, then zips it to <project-name>-<branch>.zip.
  4. Sends a status message and the zip file to your Telegram chat.
  5. (Optional) Copies the zip to the -o output folder.

If anything fails, the error is logged and a failure message is sent to Telegram.


Notes & limitations

  • Only the prod and dev branches are supported; other branches throw an error.
  • A dist/ folder must be produced by your build for the upload to succeed.
  • Telegram caps bot uploads at 50 MB per file.

License

MIT © Davron Khamdamov