Skip to main content
last release downloads python versions continuous integration test Coverage gitter chat

Easily colorize commands output using patterns.

rainbow [ --COLOR=PATTERN ... | --conf CONF ] COMMAND

Examples

Using the command line

Prepend rainbow with --COLOR=PATTERN associations to your command, for example:

  • Tail some log file with lines containing ERROR in red:

    rainbow --red=ERROR tail -f /var/log/my.log
  • You can also pipe commands output into rainbow:

    tail -f /var/log/my.log | rainbow --red=ERROR

Using configs

Rainbow can load configuration for each command from files, which is the most convenient way to use it. When running rainbow mycommand, rainbow will automatically look for a config named mycommand.cfg in ~/.config/rainbow, ~/.rainbow, /etc/rainbow, or builtin configs:

  • Colorize the diff command output using the builtin config:

    rainbow diff file1 file2
  • Start my custom command, using ~/.rainbow/mycommand.cfg:

    rainbow mycommand

The syntax for writing configs is straightforward, see the builtin configs for examples. See also the commands support table.

Installation

Using packages

System

Installation instructions

Debian / Ubuntu

rainbow repository

Fedora / CentOS / RHEL / Scientific Linux

rainbow repository

OpenSUSE / SLE

rainbow repository

Arch Linux

AUR/rainbow / AUR/rainbow-git

pip / easy_install

PyPI: rainbow

Building from sources

You can build from sources this way:

git clone git://github.com/nicoulaj/rainbow.git
cd rainbow
python setup.py build install --user

Contributing

Contributions are welcome, please see CONTRIBUTING.

License

This project is a fork of Linibou’s colorex. It is is released under the terms of the GNU General Public License. See COPYING for details.

Release files for rainbow 2.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rainbow 2.8.0
File Size Uploaded
rainbow-2.8.0.tar.gz 32.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rainbow 2.8.0
File Interpreter ABI Platform
rainbow-2.8.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 79.4 kB

Release files / rainbow-2.8.0.tar.gz

Download URL rainbow-2.8.0.tar.gz
Size 32.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f150efa649f13e9abbe75c6390519da109ad8fd06d62d5508d3a163a1fb2b5b9
BLAKE2b-256 checksum
How to use checksums
8a9e03c284f4f7c741d46eeb2bdd185d19e640d7be575469a5a754934d9304f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / rainbow-2.8.0-py2.py3-none-any.whl

Download URL rainbow-2.8.0-py2.py3-none-any.whl
Size 47.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7b4670f41e27ad8a765dd720403060eb5ef03c2909e66bf3d80d473fb8f8ae60
BLAKE2b-256 checksum
How to use checksums
c8a4b4b4ce962c8478ccb222bcdae209b4ce7d706995be277895fa660d14429e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

2.8.0 This release

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page