Gif-cli, a method to search for gifs on giphy via cli

about gif cli

In the next article we are going to take a look at gif-cli. This is a tool to search for gif files in giphy from the cli. This program is aimed at users with terminal knowledge who do not want to leave the comfort of the command line and go elsewhere to carry out their daily activities. Since nowadays sharing GIF files for many is very common, and since there is always a way to do almost all of our things from the terminal, searching for gifs on the Internet from the terminal is not going to be any different.

Many users know that using the terminal makes some tasks more efficient and even faster. The command line tools are not very resource intensive and certainly offer an excellent alternative to graphical applications. Although today we can find excellent programs such as Terminalizer, Peek or we can even create our own gifs using VLC, GIMP and FFMPEG, the tool we are dealing with today can be an excellent option if we don't have time to stop to create a gif.

In the following lines we are going to see how using an Ubuntu 18.04 LTS system we can use this tool called gif-cli to search gifs from command line quickly and easily. It has to be said that this application will not allow us to search for a particular gif.

Install gif-cli on Ubuntu

We will be able install gif-cli via snap store using Ubuntu command line. To begin, we are going to open a terminal (Ctrl + Alt + T) and write the following command to update the list of available software:

sudo apt-get update

Since the Snap daemon comes by default in the latest versions of Ubuntu, we don't need to install it. On the other hand, if you are using an older version, you can use the following command in the same terminal to install it:

sudo apt-get install snapd

Once the snapd installation is finished if necessary, now we can write this other command to install gif-cli on our Ubuntu system:

gif-cli installation via snap

sudo snap install gif-cli

This process can take some time depending on the speed of Internet that we have available. The result should be similar to what you can see in the above screenshot. There the installation will be indicated successfully, and the installed gif-cli version will also be printed in the system.

How to find a gif from the terminal

After having installed the gif-cli tool, we can only see how we can search for a gif using the gif-cli command in the terminal. The command syntax that we will have to use will be the following:

gif-cli "palabras-a-buscar"

For example, in case we want to search for a gif related to the concept "Website”, We would use the following command:

gif-cli usage example

gif-cli “web”

The output will be a link to a gif of giphy.com. The result obtained will be different each time we execute the previous command, at least every time I have tried it, it has returned a different gif. We will be able to open this link in any of our favorite web browsers by right clicking on the link and selecting 'open link' on the menu. The first result I got when launching the previous command has led me to the following gif:

gif from browser

In order to download it, I only had to click on the image. This It has taken me to the giphy.com portal and from the screen that opened, I just had to right click on the gif and select from the menu "Save Image As".

save animated gif

We can also download the gif file from the terminal using wget and the URL that gif-cli is going to provide us. We will only have to use the command with the following syntax:

download from terminal

wget -O nombre_para_el_archivogif.gif URL

Uninstall gif-cli

If we ever want remove this installed tool using snap package seen in the previous lines, we can use the following command in the terminal (Ctrl + Alt + T):

uninstall gif-cli

sudo snap remove gif-cli

Now we can easily search for a gif through the Ubuntu command line using this simple tool. For more information we can contact your repository in GitHub.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  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.