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

digital-matrix-rain

v1.1.0

Published

A cool matrix-style digital rain animation for terminal/console applications

Readme

🌊 Digital Matrix Rain NPM Package

A cool matrix-style digital rain animation for terminal/console applications. Create the iconic "Matrix" falling green text effect in your Node.js applications!

✨ Features

  • 🎨 Multiple colors (green, red, blue, yellow, magenta, cyan, white)
  • ⚡ Customizable speed and density
  • 🖥️ Auto-detects terminal size
  • 🎮 CLI tool included
  • 📦 Easy to integrate into any Node.js project
  • 🔧 Highly configurable

🚀 Installation

npm install digital-matrix-rain

🎯 Quick Start

Command Line Usage

# Basic matrix animation
npx digital-matrix-rain

# Or if installed globally
npm install -g digital-matrix-rain
digital-matrix

# With custom options
digital-matrix --speed 50 --color cyan --density 0.2

Programmatic Usage

const { matrix, MatrixRain } = require('digital-matrix-rain');

// Quick start - classic green matrix
matrix();

// Custom configuration
const animation = new MatrixRain({
  color: 'red',
  speed: 80,
  density: 0.15
});
animation.start();

// Run for specific duration (5 seconds)
animation.run(5000);

🎨 API Reference

MatrixRain Class

Main class for creating matrix animations.

const animation = new MatrixRain(options);

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | width | number | Terminal width | Animation width in characters | | height | number | Terminal height | Animation height in lines | | speed | number | 100 | Animation speed in milliseconds | | density | number | 0.1 | Drop density (0.0 - 1.0) | | color | string | 'green' | Color theme | | chars | string | Mixed alphanumeric | Custom character set |

Methods

  • start() - Start the animation
  • stop() - Stop the animation
  • run(duration) - Run for specific duration in milliseconds

Helper Functions

// Quick matrix with default settings
matrix();

// Create animation instance
const animation = createMatrixAnimation(options);

// Run demo
demo();

🎨 Available Colors

  • green (classic Matrix)
  • red
  • blue
  • yellow
  • magenta
  • cyan
  • white

🛠️ CLI Options

digital-matrix [options]

Options:
  -s, --speed <number>     Animation speed in ms (default: 100)
  -c, --color <color>      Color theme (default: green)
  -d, --density <number>   Drop density 0.0-1.0 (default: 0.1)
  -h, --help              Show help

Examples:
  digital-matrix
  digital-matrix --speed 50 --color cyan
  digital-matrix -s 150 -c red -d 0.2

🎮 Examples

Basic Example

const { MatrixRain } = require('digital-matrix-rain');

const matrix = new MatrixRain();
matrix.start();

// Stop after 10 seconds
setTimeout(() => {
  matrix.stop();
}, 10000);

Custom Animation

const { MatrixRain } = require('digital-matrix-rain');

const customMatrix = new MatrixRain({
  color: 'cyan',
  speed: 60,
  density: 0.2,
  chars: '01ⱦ⌘▓▒░█'  // Custom cyberpunk characters
});

customMatrix.start();

Multiple Animations

const { MatrixRain } = require('digital-matrix-rain');

// Sequence of different colored animations
const colors = ['green', 'red', 'blue', 'cyan'];
let index = 0;

function nextAnimation() {
  if (index >= colors.length) return;
  
  const matrix = new MatrixRain({ 
    color: colors[index],
    speed: 80 
  });
  
  matrix.run(3000);
  index++;
  
  setTimeout(nextAnimation, 3500);
}

nextAnimation();

📝 Scripts

npm test          # Run tests
npm start         # Start basic animation
npm run matrix    # CLI matrix animation
npm run demo      # Run color demo

🎬 Demo

Run the included demo to see all colors and effects:

npm run demo

🕹️ Controls

  • Ctrl+C: Stop the animation and exit

🔧 Development

git clone <your-repo>
cd digital-matrix-rain
npm install
npm test

📄 License

ISC

👨‍💻 Author

arsh

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🌟 Inspiration

Inspired by the iconic digital rain effect from "The Matrix" movie series. Perfect for:

  • Terminal applications
  • CLI tools
  • Cyberpunk-themed projects
  • Screen savers
  • Demo applications
  • Educational projects

"Welcome to the Matrix... 🕶️"