Learn to Program with a Terminal Utility

A Cheat Sheet via the command line.

Learn to Program with a Terminal Utility is a command line utility based on a concise documentation repository dedicated to learning programming languages ​​from scratch. You have access to Cheat Sheet for 58 programming languages, covering all popular languages ​​and more.


To use it is very simple, you will need to have [curl]( installed and then just run the command below:


On the “home page” you already get a quick guide to use. And to use quick help, just rotate:



Well, the use is as intuitive as the home page, but let’s look at examples. Assuming you are studying the Lua programming languages ​​, just run the command:


Before that you need to have the dependencies installed, they are: xsel and rlwrap, use your distro’s package manager (apt, dnf, pacman, …). As I use Gentoo, Portage allows me to search both dependencies on one line and install them:

Gentoo Portage

And then just install them:

sudo emerges xsel rlwrap

GENTOO TIP If you also use Gentoo and are currently compiling some other software, don’t wait for it to finish, Portage doesn’t use locks .lock like APT that only allow a single instance, you can compile/install several parallel programs.

Of course, this will only be a brief introduction. But to go further, I recommend you get the utility on your system, for this: download and install globally with the commands:

mkdir -p ~/.local/bin
curl > ~/.local/bin/
chmod +x ~/.local/bin/
echo 'export PATH="${PATH}:${HOME}/.local/bin"' | tee -a ~/.bashrc
source ~/.bashrc

This procedure is for BASH if you use ZSH, FISH or any other Shell change the configuration file ~/.bashrc by the corresponding file of your Shell, example for ZSH: ~/.zshrc

Command Line Use

Continuing with our example of programming languages ​​Lua. You can enter a subshell directly from the prompt, example, starting the shell inside the language directory: --shell
cd lua

The output will be similar to this image: shell cd lua

Within the subshell you can search for any content you want to get information, for example, search on Lua reverse lists:

Example:> reverse list
- [[
   [iterator - How to iterate Lua table from end?
   [Thank you, @Piglet, for useful link.

local function reversedipairsiter (t, i)
    i = i - 1
    if i ~ = 0 then
        return i, t [i]
function reversedipairs (t)
    return reversedipairsiter, t, #t + 1

- Actually, I figured out an easier way may be to

local mytable = {'a', 'b', 'c'}
for i = #mytable, 1, -1 do
    value = mytable [i]
    print (i .. ":" .. value)

To exit, just type: exit.

Cool, right ?!


I particularly use this utility a lot and I wanted to share it with you, because I believe that the readers of this blog are very similar to me and are studying several things today! :)

Remembering that there are several subjects and languages ​​in for more details visit the website: and GitHub from them.

Thanks and see you next time!

terminal programming commands