# The IPinfo CLI natively supports IP to Country ASN database downloads

**URL:** <https://community.ipinfo.io/t/the-ipinfo-cli-natively-supports-ip-to-country-asn-database-downloads/5536>\
**Category:** Official Libraries\
**Tags:** cli\
**Created:** [March 2, 2024, 12:00am UTC](https://community.ipinfo.io/t/the-ipinfo-cli-natively-supports-ip-to-country-asn-database-downloads/5536 "2024-03-02T00:00:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdullah](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.ipinfo.io/abdullah/32/4973_2.png) [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Post date:** [March 2, 2024, 12:00am UTC](https://community.ipinfo.io/t/the-ipinfo-cli-natively-supports-ip-to-country-asn-database-downloads/5536/1 "2024-03-02T00:00:45Z")

</div>

IPinfo CLI: [GitHub - ipinfo/cli: Official Command Line Interface for the IPinfo API (IP geolocation and other types of IP data)](https://github.com/ipinfo/cli)

```auto
ipinfo download -h

```

```auto
Usage: ipinfo download [<opts>] <database> [<output>]

Description:
    Download the free ipinfo databases.

Examples:
    # Download country database in csv format.
    $ ipinfo download country -f csv > country.csv
    $ ipinfo download country-asn country_asn.mmdb

Databases:
    asn free ipinfo asn database.
    country free ipinfo country database.
    country-asn free ipinfo country-asn database.

Options:
  General:
    --token <tok>, -t <tok>
      use <tok> as API token.
    --help, -h
      show help.

Outputs:
    --compress, -c
      save the file in compressed format.
      default: false.
    --format, -f <mmdb | json | csv>
      output format of the dat

```
