# Unimatrix: the Matrix rain for a terminal, with a character set table that goes well past katakana

> Unimatrix is a single-file Python program that pours Matrix style rain into a terminal, in the tradition of CMatrix, and it ships a longer character set list than its ancestor: Glagolitic, Cyrillic, Greek, Klingon pIqaD, Roman numerals and emoji, selected by a single letter code. It installs with pip, by curl, or from Nix, and reads the keyboard while it runs.

**will8211/unimatrix** — Python script to simulate the display from "The Matrix" in terminal. Uses half-width katakana unicode characters by default, but can use custom character sets. Accepts keyboard controls while running. Based on CMatrix.

- Repository: https://github.com/will8211/unimatrix
- Stars: 1,952 · Forks: 170
- Language: Python
- License: GPL-3.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/will8211-unimatrix

## A CMatrix descendant that admits it and measures up against it

Unimatrix is described as a Python script to simulate the display from The Matrix in a terminal, using half-width katakana Unicode characters by default, with custom character sets supported and keyboard controls accepted while it runs.

The lineage is stated in the README rather than hidden. It is based on CMatrix by Chris Allegretta and Abishek V. Ashok, and the README gives the command that should produce virtually the same output as CMatrix:

```bash
unimatrix -n -s 96 -l o
```

Reading that flag combination is a quick tour of the whole option set. The -n turns off bold characters, the -s sets the speed to 96 out of a possible 100, and the -l o selects the old style non-Unicode character set, described in the manual as like cmatrix and equal to AaSn. The old set is the ASCII fallback, so the comparison to CMatrix is essentially a test of whether the rendering matches when you strip the Unicode out.

The project is GPL-3.0 licensed, the primary language is Python, and the last push was on 2026-05-20. The repository has no GitHub releases, and the version in the packaging metadata is 0.1.0, so the program is versioned independently of the repository's release history, which does not exist.

The root listing shows how small this is. There is a single unimatrix.py, a setup.py, a pyproject.toml, a default.nix, a flake.nix, a klingon_fonts/ directory, the README, and four screenshots. That is the whole project, and the design decision that follows from it is that the program is a script you can copy to a machine rather than a package you install.

The klingon_fonts/ directory is the one that is not obvious from the description, and it exists because two of the character sets in the manual need a font most systems do not have.

## The character set table is the actual feature list

The manual's CHARACTER SETS section is the most substantial part of the documentation, and it is where Unimatrix differs most from what it is based on.

The -l option takes a string of letter codes, and each letter selects a set. The lowercase and uppercase Latin alphabets are a and A, the Glagolitic alphabet is b and B, the Russian Cyrillic alphabet is c and C, Greek is g and G, numbers are n, the Roman numerals are r and R, and the symbols come in two sizes, s for a subset of symbols actually used in the Matrix films, and S for all common keyboard symbols.

Three of the entries are unusual. The letter e is a small set of common emoji, and the manual lists them out. The letter p and P are Klingon pIqaD in lower case and upper case, and both carry a note that they require a font, with p asking for the Horta family font and P for the Klingon-pIqaD or Code2000 family font. That is what the klingon_fonts/ directory in the repository root is for.

Two entries are the defaults in disguise. The letter m is the default Matrix set, equal to knnssss, which is katakana once, numbers twice and the film symbol set four times, and the weighting is what gives the rain its look rather than a single alphabet. And the letter o is the old style non-Unicode set, equal to AaSn, which is the ASCII equivalent used for the CMatrix comparison. Using the same letter more than once increases the frequency of that set, so the default is a weighting rather than a single choice.

The manual gives the worked examples. Using the letter more than once is how you weight, and -l naAS is said to give something similar to the output of the original cmatrix program in its default mode, while -l ACG uses all the upper case character sets. The -u option takes your own string of characters, to be enclosed in single quotes to escape special characters, with the example -u '#$('.

For a reader deciding whether this is worth running, the honest verdict is that the table is what makes it more than a decoration. A single katakana set is a costume, whereas a set of twenty alphabets is a display you can tune to the machine you are sitting at.

## Four install paths, and the one that needs no packaging system at all

The install section covers four routes, and they differ in what they assume about the machine.

The recommended one is pip, from a clone:

```bash
git clone https://github.com/will8211/unimatrix.git
cd unimatrix
pip install .
```

or directly from the repository, with pip install git+https://github.com/will8211/unimatrix.git, which the README gives as an alternative. The README says Unimatrix now uses modern Python packaging standards with pyproject.toml, allowing for a robust installation via pip directly from the source directory.

The pip path relies on setuptools. The pyproject.toml in the repository root is minimal, with setuptools 61.0 as the build requirement and setuptools.build_meta as the backend, and the setup.py does the real work, declaring the name unimatrix, the version 0.1.0, py_modules with unimatrix, and a console_scripts entry point that maps the unimatrix command to unimatrix:main. The author field is William Mannard.

Then there is the route that needs nothing but a shell, which is the one that suits a locked-down machine or a container:

```bash
sudo curl -L https://raw.githubusercontent.com/will8211/unimatrix/master/unimatrix.py -o /usr/local/bin/unimatrix
sudo chmod a+rx /usr/local/bin/unimatrix
```

and the wget equivalent, using -O instead of -o. A user install without sudo is the same two commands aimed at ~/.local/bin/unimatrix instead, which is the version to prefer if you do not want to write to a system directory.

Nix is the fourth. Users of NixOS and the Nix package manager can use fetchGit in both configuration.nix and home-manager, with the same let block importing a builtins.fetchGit of the repository and inheriting pkgs, then adding it to environment.systemPackages or home.packages. Flakes are also supported, with a flake.nix declaring nixpkgs as nixpkgs/nixos-unstable and the project as a github input. The repository ships both default.nix and flake.nix, and the AUR carries it as unimatrix-git for Arch users, with the README warning it might not be the most recent version.

## The interactive flags are what separate it from a screensaver

The options that matter once the program is running are the ones that change how it behaves, and several of them are unusual enough to be worth describing.

The -w flag is single-wave mode, which does a single burst of green rain and exits. The manual says you can put it in a .bashrc file to run when your terminal launches, and that it works well with speed at 95, and points at -i to not block keyboard input during the visual effect. That is a different use from a long-running screensaver: a brief effect at shell start.

The -i flag ignores keyboard input, which is what you want if the program should not swallow the keys you are typing, and the -t flag exits the process after a given number of seconds, which is a bounded run for a script.

The -f flag enables flashers, characters that continuously change, and the -a flag makes the scroll asynchronous, with lines moving at varied speeds rather than in lockstep. The -b flag uses only bold characters and the -n flag does not use bold characters, with the manual noting that -n overrides -b. The -o flag disables the on-screen status line, which is the one you want when the program shares a terminal with other output.

The speed range is worth understanding because it is inverted from what people expect. -s takes an integer up to 100, where 0 uses a one-second delay before refreshing and 100 uses none, and negative numbers give even lower speeds, with the default at 85. So a higher number is faster, and the number 85 means a very fast refresh.

The colour handling is equally direct. -c sets the foreground colour, with green as the default and red, blue, white, yellow, cyan, magenta and black available, and -g sets the background colour from the same list, defaulting to keeping the terminal's current background.

## The screenshots demonstrate the four things you would change

The screenshots section is short, and it is effectively a set of worked examples, which is a good way to see which options carry the weight.

There are four images. The first is the default settings, which is the katakana rain with the film symbols weighted in, at the default speed and the default green.

The second is blue with a custom character set named Linux, from unimatrix -c blue -u 'Linux'. The -u option takes a literal string of characters, so this is a set of the letters in the word Linux rather than one of the named alphabets. That is a different thing from what the manual calls a custom character set in the CHARACTER SETS table, where u is the code for the characters given with -u, and it shows the -u option standing on its own as a way to display a specific set of glyphs.

The third is yellow with the alternate emoji character set, from unimatrix -c yellow -l 'e'. That is the -l option with the e code from the table, and the manual's list of the emoji involved is short enough to fit on one line of a terminal.

The fourth is the CMatrix emulation, from unimatrix -n -s 96 -l 'o', which is the command the introduction recommends for comparison and is the ASCII and non-bold rendering of the same effect.

What the four together show is a small set of dimensions worth knowing: the colour, the character set, the weight and the speed. Everything else in the manual adjusts how those four are combined, and the -w single wave and -t timed exit are about when the program runs rather than how it looks.

One caveat on the emoji set specifically. Emoji rendering in a terminal depends entirely on the font and on the terminal's own emoji support, so the third screenshot is the one most likely to look different on your machine than on the author's, and the Klingon sets have the same problem in a more literal way since they need a font that has to be installed.

## Where Unimatrix is the wrong tool

The limits are the limits of a terminal effect, and they are worth being plain about.

The first is that it is a foreground program, not a screensaver. It draws into your terminal, which means it takes over the screen and the keyboard while it runs. The -i flag makes it stop reading the keyboard, and -t gives it a bounded life, and -w makes it a single burst that exits, which are the three ways to make it coexist with real work, but it is still a program in the foreground of a shell. If you want your screen to fill with rain when you walk away from the desk, you want a terminal program that handles that case, not this one.

The second is that the display is text. There is no colour within the glyphs, no image, no gradient, and the Matrix effect is a specific look that depends on the terminal's own capabilities. A terminal with a limited character set, or a multiplexed session over ssh with a plain terminal type, will show blocks or nothing useful. The old ASCII set with -l o is the fallback for exactly that situation, and it is visibly less like the films.

The third is the font dependency, and it applies to more sets than the Klingon ones. Emoji rendering varies by terminal and by font, and the manual's note about the Horta and Klingon-pIqaD or Code2000 families is a special case of a general problem. The repository ships a klingon_fonts/ directory for those, which is a nice touch, but it does not solve the general problem of a font that lacks the glyphs you selected.

The fourth is the packaging asymmetry. The pip install and the curl install are not the same artefact. The console script entry point and the pyproject build produce a command with the same name and the same behaviour, but the curl instructions fetch a single file from the master branch, which means the version you get is whatever is on master at the moment you run it, with no pinning and no changelog. For a program whose only purpose is decorative that is an acceptable trade, and for anything else it would not be.

The fifth is that the AUR package is described as possibly not the most recent version, which is the normal state of a git-based AUR package. It is the usual Arch caveat and worth knowing before you assume the AUR build matches the repository.

The last point is about what you are installing. A program that reads the keyboard and writes to the terminal is a program that runs with your privileges in your session, and the two sudo curl commands in the README put a file fetched over the network into a system path that is then made executable. That is a small and common thing to do, and it is still worth a moment of thought about whether you would rather pip install a package you can inspect.

## Conclusion

Unimatrix is worth installing for a terminal user who wants the effect and wants control over the characters it uses, because the character set table and the custom string option give more control than the program it is based on, and the speed, colour and background flags cover the settings people actually change. It is the wrong tool if you want a screensaver, since it is a foreground program that draws into your terminal and expects the terminal to be the whole screen, and it is the wrong tool for anything graphical, since the output is text. Before installing, pick the character set letter that matches your terminal font, since the Klingon sets need a font that is not installed by default, and note that the console script version and the single-file version are maintained separately, with the single file being what the curl instructions fetch.

## FAQ

### How do I install Unimatrix?

Clone the repository and run pip install . from the source directory, or pip install git+https://github.com/will8211/unimatrix.git. Linux users can also fetch the single script with curl or wget into /usr/local/bin or ~/.local/bin, and NixOS users can use fetchGit or a flake.

### Which character sets can Unimatrix display?

The -l option takes letter codes for lower case and upper case Latin, Glagolitic, Russian Cyrillic, Greek, Roman numerals, numbers, a small emoji set, Klingon pIqaD, the film symbol set, all common keyboard symbols, and the old ASCII set. The -u option takes your own string of characters instead.

### How do I make Unimatrix look like CMatrix?

The README says the command unimatrix -n -s 96 -l o should produce virtually the same output as CMatrix, where -n disables bold characters, -s sets the speed to 96 and -l o selects the old style non-Unicode set.

### What does the speed option do?

The -s option takes an integer up to 100, where 0 uses a one-second delay before refreshing and 100 uses none, and negative numbers go even slower. The default is 85, and a higher number means a faster refresh.

### How do I make Unimatrix exit on its own?

The -t option exits the process after the given number of seconds, the -w option runs a single burst of green rain and exits, and the -i option makes the program ignore keyboard input. The manual suggests putting -w in a .bashrc file with the speed at 95.

## Sources

- [Issues](https://github.com/will8211/unimatrix/issues)
- [License: GPL-3.0](https://github.com/will8211/unimatrix/blob/master/LICENSE)
- [README](https://github.com/will8211/unimatrix/blob/master/README.md)
- [will8211/unimatrix on GitHub](https://github.com/will8211/unimatrix)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/will8211-unimatrix
