A while ago, we discussed about Bash-Snippets, a collection of useful BASH scripts for heavy commandline users. Today, we will see a similar utility called "Cli.Fyi". It is a command line query tool to fetch information about IPs, Emails, Domains, Crypto currencies, media/url, UTC date/time, country and programming language etc. You can fetch all these details either from commandline or browser. Unlike Bash-Snippets, Cli.Fyi command line query tool is not a collection of individual scripts but a single utility. It has some additional features that are not included in Bash-snippets.

How To Use Cli.Fyi Command Line Query Tool

Usage is absolutely easy! Just use "curl cli.fyi" command in the Terminal followed by a query after a forward-slash (/).

Example:

$ curl cli.fyi/time

Replace "time" with your query in the above example.

Sample output for the above command would be:

{ "type": "Date/Time Information (UTC)", "data": { "day": "07", "month": "11", "year": "2018", "hour": "06", "minutes": "11", "seconds": "11", "dayName": "Wednesday", "monthName": "November", "amOrPm": "am", "unixEpoch": 1541571071, "formattedDate": "Wed, 07 Nov 2018 06:11:11 +0000" }

The currently supported queries are;

Crypto Currency prices,

Email Address details,

IP Address details,

Media/URL details,

Client details,

String Hash Values,

Domain Name details,

Date/Time details,

Programming Language links,

Country details,

Popular Emojis.

The author might add more utilities and/or features in future, so I recommend you to keep an eye on the project's website or GitHub page for future updates.

Let us see few examples.

Display price of a crypto currency

To display the latest price of a crypto currency, run:

$ curl cli.fyi/UBQ

Here, UBQ is the symbol of ubiq cryptocurrency. You can view the symbols of all available cryptocurrencies here.

Output:

Display details of an Email

To fetch the information about a given email, run:

Output:

{ "type": "Email Address Query", "data": { "validMxRecords": true, "freeProvider": false, "disposableEmail": true, "businessOrRoleEmail": false, "validHost": true }

Display details of an IP address

To fetch the information of a given IP address, run:

$ curl cli.fyi/8.8.4.4

Output:

{ "type": "IP Address", "data": { "organisation": "Google Inc.", "country": "United States", "continent": "North America", "latitude": "37.751", "longitude": "-97.822" }

Display details of a Domain

To fetch whois and DNS information of a domain, use:

$ curl cli.fyi/google.com

Output:

{ "type": "Domain Name Information", "data": { "dns": [ "google.com. 550 IN MX 30 alt2.aspmx.l.google.com.", "google.com. 550 IN MX 10 aspmx.l.google.com.", "google.com. 550 IN MX 20 alt1.aspmx.l.google.com.", "google.com. 550 IN MX 40 alt3.aspmx.l.google.com.", "google.com. 550 IN MX 50 alt4.aspmx.l.google.com.", "google.com. 249 IN A 216.58.201.46", "google.com. 263 IN AAAA 2a00:1450:4009:80b::200e", "google.com. 108948 IN NS ns2.google.com.", "google.com. 108948 IN NS ns1.google.com.", "google.com. 108948 IN NS ns4.google.com.", "google.com. 108948 IN NS ns3.google.com.", "google.com. 54 IN SOA ns2.google.com. dns-admin.google.com. (", " 175115472 ; serial", " 900 ; refresh (15 minutes)", " 900 ; retry (15 minutes)", " 1800 ; expire (30 minutes)", " 60 ; minimum (1 minute)", " )", "google.com. 313 IN TXT \"v=spf1 include:_spf.google.com ~all\"" ], [...]

Display String Hash Values

To return the various hash values for a given string, for example HelloWorld, run:

$ curl cli.fyi/hash/HelloWorld

Display details of a Media/URL

To fetch the information of a given media or URL, use:

$ curl cli.fyi/https://www.youtube.com/watch?v=FXiaIH49oAU

Output:

{ "type": "Youtube URL", "data": { "title": "YouTube", "url": "https://www.youtube.com/watch?v=fxiaih49oas", "type": "link", "providerName": "youtube", "providerUrl": "https://youtube.com", "providerIcon": "https://www.youtube.com/yts/img/favicon_144-vfliLAfaB.png" }

Display details of a client

To fetch details about YOU (client), use:

$ curl cli.fyi/me

Output:

{ "type": "Client Information Query", "data": { "userAgent": "curl/7.56.0", "iPAddress": "42.111.196.173", "browser": "Curl 7.56.0", "iPAddressInfo": { "organisation": "Vodafone Essar Ltd., Telecommunication - Value Added Services", "country": "India", "continent": "Asia", "latitude": "13.0833", "longitude": "80.2833" } }

Display UTC date/time

To display the current UTC date:

$ curl cli.fyi/date

Output:

{ "type": "Date/Time Information (UTC)", "data": { "day": "09", "month": "11", "year": "2017", "hour": "11", "minutes": "56", "seconds": "32", "dayName": "Thursday", "monthName": "November", "amOrPm": "am", "unixEpoch": 1510228592, "formattedDate": "Thu, 09 Nov 2017 11:56:32 +0000" }

To display the current UTC time:

$ curl cli.fyi/time

Output:

{ "type": "Date/Time Information (UTC)", "data": { "day": "09", "month": "11", "year": "2017", "hour": "11", "minutes": "57", "seconds": "49", "dayName": "Thursday", "monthName": "November", "amOrPm": "am", "unixEpoch": 1510228669, "formattedDate": "Thu, 09 Nov 2017 11:57:49 +0000" }

Display details of a programming language

To display useful and up-to-date links for programming languages:

$ curl cli.fyi/Java

Output:

{ "type": "JAVA Query", "data": { "documentation": { "v7": "https://docs.oracle.com/javase/7/docs/", "v8": "https://docs.oracle.com/javase/8/docs/" }, "links": { "Awesome Java": "https://github.com/akullpp/awesome-java", "Useful Links": "https://github.com/Vedenin/useful-java-links" } }

PHP, Javascript and Java are currently supported.

Display Country details

To fetch the information about a given country, run:

$ curl cli.fyi/India

Output:

{ "type": "Country Query", "data": { "commonName": "India", "officialName": "Republic of India", "topLevelDomain": ".in", "currency": "INR", "callingCode": "+91", "capitalCity": "New Delhi", "region": "Asia", "subRegion": "Southern Asia", "latitude": 20, "longitude": 77, "demonym": "Indian", "isLandlocked": "No", "areaKm": 3287590, "officialLanguages": "English,Hindi,Tamil" }

Display Popular Emojis

To view a selection of popular unicode emojis.

$ curl cli.fyi/emojis

Output:

{ "type": "Popular Emojis", "data": { "huggingFace": "🤗", "tearsOfJoy": "😂", "grinningFace": "😀", "rofl": "🤣", "smiling": "😊", "tongueOut": "😋", "kissingFace": "😘", "thinking": "🤔", "neutralFace": "😐" }

You can also view all of the above results in browser. For instance, type https://cli.fyi/time in your browser's address bar to fetch the current UTC time details.

For more details, check the project's website given below.

Resources: