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

backup-script-cli

v1.0.2

Published

Script di backup per archiviare file in formato zip con cifratura

Readme

Backup Script CLI

English version | Versione Italiana


Backup Script CLI (English)

A TypeScript command-line utility (CLI) to quickly create ZIP backup archives of your project, allowing granular selection of files and folders.

🚀 Features

  • Interactive Selection: Choose which files and folders from the root to include in the archive.
  • Automatic Encryption: Generates a secure 14-character password to protect the ZIP archive.
  • Smart Exclusions: Automatically excludes heavy or unnecessary folders like node_modules, dist, .git, and other existing backup files.
  • Optimized Compression: Uses archiver with compression level 9 (Zlib).
  • Customizable Naming: Suggests a name based on today's date (backup_YYYY-MM-DD.zip), but allows customization.
  • Overwrite Protection: Asks for confirmation before overwriting an existing file.
  • Real-time Feedback: Displays progress percentage and the size of processed data.
  • Code Quality: Linting with ESLint and formatting with Prettier.
  • Automated Testing: Test suite with Jest to ensure logic correctness.
  • Continuous Integration: GitHub Actions configured for automatic lint, build, and test on every push.

🛠️ Requirements

  • Node.js (recommended version: 22 or higher)
  • pnpm (recommended), npm, or yarn

📦 Installation

As a local package

  1. Clone the repository:

    git clone <repository-url>
    cd backup-script
  2. Install dependencies:

    pnpm install

As a global CLI

You can install the tool globally to use it in any project:

npm install -g backup-script-cli

After installation, you can use the command:

backup-cli

🎮 Usage

Development

To run the script directly from TypeScript sources:

npm run dev

Build and Production

To compile the script into an optimized bundle (using esbuild):

npm run build

After the build, you can run the standard version:

npm start

Or the minified version:

npm run start:minify

Quality and Testing

To lint the code:

npm run lint

To automatically format the code:

npm run format

To run the test suite with Jest:

npm test

🏗️ Project Structure

  • src/main.ts: Main entry point of the script.
  • src/utils/utils.ts: Utility functions extracted for testability.
  • tests/: Automated test suite.
  • dist/: Contains bundles generated after the build.
  • package.json: Project configuration and npm scripts.
  • .github/workflows/: Configuration for GitHub Actions.
  • eslint.config.js & .prettierrc: Configurations for code quality.

🧰 Main Dependencies

👨‍💻 Author

Maurizio Tolomeo

Created to simplify local backup management during development.


Backup Script CLI (Italiano)

Un'utilità a riga di comando (CLI) in TypeScript per creare rapidamente archivi ZIP di backup del progetto, permettendo la selezione granulare dei file e delle cartelle.

🚀 Caratteristiche

  • Selezione Interattiva: Scegli quali file e cartelle della root includere nell'archivio.
  • Cifratura Automatica: Genera una password sicura a 14 caratteri per proteggere l'archivio ZIP.
  • Esclusioni Intelligenti: Esclude automaticamente cartelle pesanti o inutili come node_modules, dist, .git e altri file di backup esistenti.
  • Compressione Ottimizzata: Utilizza archiver con livello di compressione 9 (Zlib).
  • Naming Personalizzabile: Suggerisce un nome basato sulla data odierna (backup_YYYY-MM-DD.zip), ma permette la personalizzazione.
  • Protezione Sovrascrittura: Chiede conferma prima di sovrascrivere un file esistente.
  • Feedback in Tempo Reale: Mostra la percentuale di avanzamento e la dimensione dei dati processati.
  • Qualità del Codice: Linting con ESLint e formattazione con Prettier.
  • Test Automatizzati: Suite di test con Jest per garantire la correttezza della logica.
  • Continuous Integration: GitHub Actions configurate per lint, build e test automatici ad ogni push.

🛠️ Requisiti

  • Node.js (versione consigliata: 22 o superiore)
  • pnpm (consigliato), npm o yarn

📦 Installazione

Come pacchetto locale

  1. Clona la repository:

    git clone <repository-url>
    cd backup-script
  2. Installa le dipendenze:

    pnpm install

Come CLI globale

Puoi installare lo strumento globalmente per usarlo in qualsiasi progetto:

npm install -g backup-script-cli

Dopo l'installazione, potrai usare il comando:

backup-cli

🎮 Utilizzo

Sviluppo

Per eseguire lo script direttamente dai sorgenti TypeScript:

npm run dev

Build e Produzione

Per compilare lo script in un bundle ottimizzato (utilizzando esbuild):

npm run build

Dopo la build, puoi eseguire la versione standard:

npm start

Oppure la versione minificata:

npm run start:minify

Qualità e Test

Per eseguire il linting del codice:

npm run lint

Per formattare automaticamente il codice:

npm run format

Per eseguire la suite di test con Jest:

npm test

🏗️ Struttura del Progetto

  • src/main.ts: Punto di ingresso principale dello script.
  • src/utils/utils.ts: Funzioni di utilità estratte per testabilità.
  • tests/: Suite di test automatizzati.
  • dist/: Contiene i bundle generati dopo la build.
  • package.json: Configurazione del progetto e script npm.
  • .github/workflows/: Configurazione per GitHub Actions.
  • eslint.config.js & .prettierrc: Configurazioni per la qualità del codice.

🧰 Dipendenze Principali

👨‍💻 Autore

Maurizio Tolomeo


Creato per semplificare la gestione dei backup locali durante lo sviluppo.