As well as making your terminal more colorful and productive through the prompt theme, font, and plugins, you can add even more features by using Ruby Gems, such as lolcat, colorls, and catpix.
To use them, ensure you have Ruby installed on your computer, and then you can install each one using the command
gem install <GEM_NAME>.
This Gem adds a rainbow gradient to anything that you pipe through to it. The image at the top of the post pipes ASCII art text generated with the aarti Gem through lolcat to create a colorful heading in the terminal.
You can combine extra bash commands to animate it, in this case
echo to print the string passed to it,
-a to animate, and
-d for duration.
echo I ❤ Ruby | lolcat -a -d 500
The Artii gem generates ASCII art based on text you pass to it as arguments. You can see this demonstrated in the header image at the top of this tutorial. If you pass the output to lolcat you get ascii art text with multiple colors.
artii 'Ruby Gems' --font slant | lolcat
It is based on the Figlet library, which you can also install on a Mac with
brew install figlet.
This enhances the terminal command
ls with color and icons. Below is a screenshot from its Github repo. This configuration is an iTerm2 terminal (Mac OS), with
powerlevel9k theme and
powerline nerd-font + awesome-config font with the
Solarized Dark color theme.
You can make it as easy to use as
ls by adding an alias for
lc to your
This converts images to a format that can render on a terminal screen. You can try having an image loaded into your terminal when it starts or when there is an event — for example when your tests pass.
Find out more
These are just some of the Ruby Gems that can enhance your terminal, and learning how they work means you can customize your command line. You could even take it further by adding a special setup for irb and pry, such as irbtools.