It is very difficult time for the entire World! The deadly Coronavirus (COVID-19) is spreading very fast across the Globe. All countries are taking various precautions including lock-down and curfew and trying their best to control this infectious disease. The World Health Organization (WHO) website provides many resources, current situation reports, travel advice, protective measures & awareness and answers for all questions related to the Coronavirus disease outbreak. Besides WHO, many NGOs, individuals and volunteers are doing their part by developing tools and apps to track the Novel Coronavirus statistics. This guide explains how to track Coronavirus disease 2019 (COVID-19) statistics from Commandline using Corona-cli, Coronavirus-tracker-cli and COVID-19 Tracker CLI on Linux.
Corona-cli is a command line application written in NodeJS. The corona-cli gets you the following details from commandline:
- Worldwide Coronavirus disease (COVID-19) report,
- Active daily report of your country's COVID-19 statistics,
- Track Coronavirus statistics of US states,
- Displays the report by country-wise, cases, deaths, active, recovered, critical, no of cases per-million.
Install Corona-cli on Linux
Make sure you have installed Nodejs on your Linux system as described in the following guide.
After installing Nodejs, run the following command to install Corona-cli on your Linux system:
$ npm install -g corona-cli
Track Coronavirus Disease 2019 (COVID-19) Statistics From Commandline Using Corona-cli
When you run Corona-cli without any options, it displays the world-wide Coronavirus statistics in a neat tabular-column format as shown below.
As you can see, each column in the above output contains the following details:
- Country - Name of the country.
- Cases - Total number of cases in a country.
- Cases (today) - Cases in 24 hours GMT/UTC.
- Deaths - Total number of deaths in a country.
- Deaths (today) - Deaths in 24 hours GMT/UTC.
- Recovered - Total number of recovered people.
- Active - Total number of active patients.
- Critical - Total number of critical patients.
- Per Million - Affected patients per million.
It is possible to display Coronavirus statistics by country-wise. For instance, to display the Coronavirus statistics data for India, run:
$ corona India
We can also sort Coronavirus statistics by various types as given below.
$ corona -s country
$ corona -s cases
$ corona -s cases-today
$ corona -s deaths
$ corona -s deaths-today
$ corona -s recovered
$ corona -s active
$ corona -s critical
$ corona -s per-million
If you're live in United States, you can display the Coronavirus data by states-wise.
$ corona states
To display states data sorted by active cases, run:
$ corona states --sort active
To display states data sorted by Cases today:
$ corona states -s cases-today
To get help, run:
$ corona --help
Track the Coronavirus disease (COVID-19). Usage corona <command> [--option] Commands country-name Get data for a given country states Get data for all USA states Options --xcolor, -x Single colored output --sort, -s Sort data by type Examples corona china corona states corona -x corona --sort cases-today corona -s critical ❯ You can also run command + option at once: corona china -x -s cases
For more details, refer the project's GitHub page given at the end.
Coronavirus-tracker-cli tracks the Coronavirus (COVID-19) statistics from command line using curl program. It gets the Coronavirus data from the following two sources:
- Source 1 : John Hopkins Data API
- Source 2 : WorldoMeters Data API updated very frequently.
By default, it uses Worldometers API if the source is not explicitly mentioned.
Track Coronavirus Disease 2019 (COVID-19) Statistics From Commandline Using Coronavirus-tracker-cli
Unlike the previous tool, coronavirus-tracker-cli requires no installation! All you have to do is to use curl command which comes pre-installed with many Linux distributions.
To track the Coronavirus stats globally, simply run:
$ curl https://corona-stats.online
As I mentioned already, if no source mentioned, It gets the Cornavirus data from Wordometer API by default.
You can also specify source explicitly like below:
$ curl https://corona-stats.online?source=1
$ curl https://corona-stats.online?source=2
Filter Cornavirus stats by country-wise:
To display COVID-19 data for a specific country, mention the country name like below.
$ curl https://corona-stats.online/India
$ curl https://corona-stats.online/Spain
Filter Cornavirus stats by country-wise from specific source:
$ curl https://corona-stats.online/uk?source=1
$ curl https://corona-stats.online/gb?source=2
Display top affected countries
To display top ten affected countries by COVID-19, run:
$ curl https://corona-stats.online?top=10
Besides using Curl command, it is possible to install it using npm package manager.
Please note that coronavirus-tracker-cli will conflict with the corona-cli tool. Because both uses the same executable name i.e. corona. So it is recommended to remove the previous one if it is already installed and then install coronavirus-tracker-cli.
$ npm uninstall -g corona-cli
Make sure you have installed NodeJS. After installing Nodejs, run the folllowing command to install Coronavirus-tracker-cli:
$ npm install coronavirus-tracker-cli -g
Now track the Coronavirus stats globally using command:
Get Coronavirus data from specific source:
$ corona --source=1
Get Coronavirus data country-wise:
$ corona India
Display top N countries afftected by Coronavirus:
$ corona --top=10
For more details, refer the project's GitHub page given at the end.
3. COVID-19 Tracker CLI
COVID-19 Tracker CLI is yet another command line program to track Coronavirus Disease 2019 (COVID-19) cases around the world. It is also written in NodeJS. It uses Worldometer API to collect the COVID-19 data.
Concerning about the features, we can list the following:
- Real-Time updates.
- Optimized application.
- Fast response time (~< 100ms).
- Simple layout and easy to understand.
- By country query.
- e.g. (/country).
- Windows CMD support.
- e.g. (/cmd or /cmd/country).
- Plain or Basic version.
- e.g. (/plain or /plain/country) or (/basic, /basic/country).
- Random health saying on footer.
- No installation required!
- Free and Open source!!
Track Coronavirus Disease 2019 (COVID-19) Statistics From Commandline Using COVID-19 Tracker CLI
As I already mentioned, COVID-19 Tracker CLI doesn't require any installation. All you need to do is Curl or Wget commands. Both are comes pre-installed in most Linux distributions.
To track COVID-19 data worldwide, simply run:
$ curl https://covid19tracker.xyz
$ wget -i https://covid19tracker.xyz && cat index.html
As you can see in the above outputs, COVID-19 Tracker CLI program displays the COVID-19 global cases in a simple tabular-column format with the following details:
- Total number COVID-19 cases,
- Total number of deaths,
- Total number of recovered cases,
- Mortality rate in %.
- Recovered rate in %.
There is also a random health saying or precaution message at the bottom. Very cool!
You can also track the COVID-19 cases by country-wise by mentioning the country name like below.
$ curl https://covid19tracker.xyz/India
To me tracking COVID-19 cases with curl command is much better than wget method. Anyway, you can use any method that suits for you.
For more details, look at the project's GitHub page given at the end.
Useful online resources that provides live Coronavirus statistics
If you don't want to install anything, use the following online resources to track the Coronavirus data from an Internet-connected desktop/mobile/tablet:
- Novel Coronavirus (COVID-19) Situation Dashboard
- Worldometer - COVID-19 Coronavirus Pandemic
- Coronavirus Visual Dashboard by Johns Hopkins University (Desktop Version)
- Coronavirus Visual Dashboard by Johns Hopkins University (Mobile Version)
Stay informed about Coronavirus:
- Protect yourself: advice for the public
- Myth busters
- Questions and answers
- Situation reports
- All information on the COVID-19 outbreak
Protect yourself from Coronavirus
There is a popular proverb - "Prevention is better than cure.". I fully concur with it. Since there is currently no vaccine to prevent coronavirus disease, follow all advises suggested by the WHO, Doctors and local healthcare authorities to protect yourself and your family from Coronavirus:
- Wash your hands frequently with soap and water or with an alcohol-based solution.
- Maintain social-distancing (at least 1 metre from others).
- Cover your mouth/nose with your elbow while coughing and sneezing.
- Avoid touching your face, particularly eyes, nose and mouth.
- Stay in your HOME as much as possible.
- Corona-cli GitHub Repository
- Coronavirus-tracker-cli GitHub Repository
- COVID-19 Tracker CLI GitHub Repository
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Reddit | Facebook | Twitter | LinkedIn | RSS feeds
Have a Good day!!
I am running Ubuntu 16.04
I followed your steps.
I needed to run it as root
sudo npm install -g corona-cli
but even then I obtained
/usr/bin/env: ‘node’: No such file or directory
what is wrong, thanks
Make sure you have installed Nodejs on your system. The installation guide s linked in the article itself. Also you don’t need to run it as root. Just install as normal user with command – “npm install -g corona-cli”.
Installed it, had to use sudo npm install -g corona-cli on Ubuntu 16.04. Uwe Brauer doesn’t seem to have nodejs installed.
What does “nodejs –version” return?
But it doesn’t work as the api seems to be “down”:
corona-cli v3.8.6 by Awais.dev
Track the Coronavirus disease (COVID-19).
⚠ API is down, try again later.
Further investigation suggests this is a generic error message.
I tried corona united states and it fails, but corona USA succeeds. I think you may need to run corona with no arguments to get the country names.
Hi, it would convenient to have all the data without the graphical characters, in a CSV format for example. Is this possible?