Skip to main content

Metadata Command 🪨

The metadata command prints MMDB metadata including database type, description, languages, IP version, node count, and record size.

Disclaimer

The data shown in the examples above is for demonstration purposes only and may not reflect the actual data in the MMDB file you are inspecting. The actual data may vary based on the version of the database and the IP addresses queried.

Usage

mmdb-cli metadata -i <MMDB_FILE_PATH> [-f <FORMAT>]

Options

  • -i, --input <MMDB_FILE_PATH>: Path to the MMDB file.
  • -f, --format <FORMAT>: Output format. Supported values: yaml, json, json-pretty (default: yaml).

Examples

In the following example, we extract metadata from the GeoLite2-ASN.mmdb file in YAML format:

mmdb-cli metadata -i GeoLite2-ASN.mmdb

Output (YAML):

binary_format_major_version: 2
binary_format_minor_version: 0
build_epoch: 1728288921
database_type: GeoLite2-ASN
description:
en: GeoLite2 ASN database
ip_version: 6
languages:
- en
node_count: 1056663
record_size: 24

Output (JSON):

{
"description": {
"en": "GeoLite2 ASN database"
},
"database_type": "GeoLite2-ASN",
"languages": [
"en"
],
"binary_format_major_version": 2,
"binary_format_minor_version": 0,
"build_epoch": 1728288921,
"ip_version": 6,
"node_count": 1056663,
"record_size": 24
}