A simple, full-screen implementation of the iconic "digital rain" effect from The Matrix, created in Python using the curses library. This script runs directly in your terminal and endlessly generates the falling green code animation.
(You can replace the placeholder image above with a GIF of the script running)
Authentic Look & Feel: Uses a character set of half-width Katakana, letters, and numbers to closely mimic the movie's effect.
Dynamic Colors: Features a bright white "head" for each raindrop and a fading green tail for a more realistic effect.
Full-Screen & Responsive: Automatically adapts to the size of your terminal window.
Lightweight & Simple: A single Python script with no external dependencies required (on Linux/macOS).
Requirements Python 3.x
The script uses the curses module, which is part of the standard Python library on Linux and macOS.
For Windows users: The curses module is not included by default. You can install the windows-curses library to provide the necessary functionality:
pip install windows-curses
Clone or download the matrix_rain.py script from this repository.
Open your terminal or command prompt.
Navigate to the directory where you saved the file.
Run the script using Python:
python matrix.py
The animation will start immediately and fill your terminal.
Press q at any time to quit the application and return to your terminal prompt.
You can easily customize the script by editing the matrix.py file:
Character Set: Modify the matrix_chars string variable to include any characters you want to see in the digital rain.
Colors: The colors are defined in the "Color Setup" section. You can change the curses.COLOR_ values or the RGB values for the custom dark green color. May not show up in terminal.
This project is open-source. Feel free to use, modify, and distribute it.