, documentation for the command line or for your editor


In the next article we are going to take a look at This script will provide us with access to documentation and code snippets Community-driven, for Linux / UNIX commands and many programming languages. This project is not new, it started in 2017, but it is still very useful for many users.

To display its content, the tool makes use of sources community driven such as TLDR pages, StackOverflow and others, as well as its own repository. We will be able to use this utility from the web browser, the command line or as a complement for Vim, Emacs or Sublime Text, among other editors.

This tool has been developed by Igor Chubin, also known for its console-oriented weather forecast service called

General features of

  • We could do queries on 58 programming languages, various DBMS and 1000 of the most important UNIX / Linux commands.
  • Un client for optional command line ( is available. This will allow us to quickly search and copy code snippets easily without leaving the terminal.
  • The web and (command line) interfaces use, but if the user prefers, they can self host it.
  • The command line client presents a special shell mode with a persistent query context. It also has a query history that is integrated with the clipboard. At the same time it supports tab completion for shells like Bash, Fish and Zsh.
  • Offer psychological therapy to employees results very fast. Returns responses in less than 100 ms.
  • The utility can be used from code editors. This will allow us insert code snippets without having to open a web browser, find the code, copy it, and then go back to the code editor to paste it. It is compatible with Vim, Emacs, Visual Studio Code, Sublime Text, and IntelliJ Idea.

If someone is encouraged, they can contribute to the project. You can consult the guide to edit or add content.

How to install the command line client

We will be able to use in a web browser, from the command line with the help of curl without having to install anything else, as a code editor plugin or using its command line client.

If you want to install it as a complement to a code editor, you can consult the page for integration in editors.

Next we will see the necessary steps to install this command line client called, but first we will have to solve the issue of dependencies.

Install dependencies

In order to install the command line client, we will use curl. Another dependency is rlwrap, which is required by the special shell mode In Debian, Ubuntu, Linux Mint and any other Gnu / Linux distribution based on Debian or Ubuntu, we will write in the terminal (Ctrl + Alt + T):

install dependencies

sudo apt install curl rlwrap

Download and install the command line interface

We can install it only for one user or for all users. You can install it for all users using the folder / usr / local / bin: curl

curl | sudo tee /usr/local/bin/

sudo chmod +x /usr/local/bin/

If the first command seems to have frozen and shows only the CURL output, press the Enter key. It will ask you to enter your password to save the file in / usr / local / bin.

If you want to install it only for your user we will assume that you have a folder ~ / .bin added to your PATH and the folder exists. You can change this folder to your liking. Depending on where you want to install, change the installation path in the commands:

curl > ~/.bin/

chmod +x ~/.bin/

Customer usage examples

Next we will see some usage examples using curl from the command line:

To display the some options available for the command ls: ls

curl also works instead of ls


To see an example of the rand () function for the PHP programming language we will write:

rand php function


If you want to delete the comments that will be seen in the result, you will have to add? Q at the end of the query:

rand php no comments


We will be able start the client in a special shell mode using: --shell --shell

Then we can start writing our queries. To close, you just have to write exit.

cht --help

If we write help in the interactive shell mode, we will be able to see all the available possibilities. You can also search the Usage section from the project page on GitHub to see the options it offers us.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.