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

@nroot_project/ncrypt

v1.1.2

Published

Fast, secure binary file/directory encryption and compression for Node.js. Supports AES-256-GCM, ChaCha20-Poly1305, and 6 compression methods.

Readme

ncrypt

Fast, secure binary file/directory encryption and compression CLI + library for Node.js.

Features

  • Authenticated Encryption - AES-256-GCM, AES-128-GCM, ChaCha20-Poly1305
  • 6 Compression Methods - zstd, lz4, brotli, gzip, xz (LZMA), none
  • Files & Directories - Single files or full directory trees via NArchive
  • Strong KDF - PBKDF2 with 100,000 iterations and random salts
  • MessagePack - Compact binary container format
  • CLI + Programmatic - Interactive CLI or use as a library
  • Zero Temp Files - Everything streams through memory

Installation

npm install @nroot_project/ncrypt

CLI Usage

# Pack (encrypt) a file or directory
ncrypt pack ./my-folder
ncrypt pack ./myfile.txt

# Unpack (decrypt) a .ncrypt file
ncrypt unpack ./my-folder.ncrypt

Options

ncrypt pack [source] [options]

Options:
  -a, --algo <algorithm>    Encryption algorithm (aes-256-gcm, chacha20-poly1305, aes-128-gcm)
  -c, --compression <method> Compression method (zstd, lz4, brotli, gzip, xz, none)
  -l, --level <1-15>        Compression level
  -p, --password <password> Password
  -o, --output <path>       Output path
ncrypt unpack [file] [options]

Options:
  -p, --password <password> Password
  -o, --output <path>       Output directory

Programmatic API

import {
  runInteractivePack,
  runInteractiveUnpack,
  encryptAndSave,
  decryptAndExtract,
} from "@nroot_project/ncrypt";

encryptAndSave(sourcePath, outputPath, algo, compression, level, passphrase)

Encrypts a file or directory and writes a .ncrypt container.

await encryptAndSave(
  "./my-folder",          // file or directory
  "./output.ncrypt",      // output path
  "aes-256-gcm",          // encryption algorithm
  "zstd",                 // compression method
  6,                      // compression level (1-15)
  "my-secure-password",   // passphrase
);

decryptAndExtract(filePath, outputPath, passphrase)

Decrypts a .ncrypt file and extracts its contents.

await decryptAndExtract(
  "./output.ncrypt",       // .ncrypt file path
  "./extracted",           // output path (file or directory)
  "my-secure-password",    // passphrase
);

runInteractivePack(source?, options?)

Interactive CLI pack wizard with prompts for all options.

await runInteractivePack("./my-folder", {
  algo: "aes-256-gcm",
  compression: "zstd",
  level: 6,
  password: "secret",
  output: "./output.ncrypt",
});

runInteractiveUnpack(file?, options?)

Interactive CLI unpack wizard.

await runInteractiveUnpack("./output.ncrypt", {
  password: "secret",
  output: "./extracted",
});

Supported Algorithms

| Category | Options | |---|---| | Encryption | aes-256-gcm (default), aes-128-gcm, chacha20-poly1305 | | Compression | zstd (default), lz4, brotli, gzip, xz, none | | KDF | PBKDF2-SHA256 (100,000 iterations) | | Serialization | MessagePack |

Compression Levels

| Algorithm | Level Range | Default | |---|---|---| | gzip | 1 - 9 | 4 | | brotli | 1 - 11 | 4 | | zstd | 1 - 15 | 6 | | lz4 | (fixed) | - | | xz | 0 - 9 | 6 |

Companion Package

NArchive - high-performance directory archiving used internally for directory packing.

npm install @nroot_project/narchive

License

MIT - see LICENSE.