New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

geoip2-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geoip2-cli

Code and command-line utils for download and convert geoip2 maxmind mmdb

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

GeoIP2 CLI

NPM Version Package License

Table of Contents

Description

Code and command-line utils for download and convert geoip2 maxmind mmdb

Command line

Globally via npm

npm install --global geoip2-cli

Running on-demand:

npx geoip2-cli [options]

Examples

npx geoip2-cli --help
    'usage: geoip2-cli [options]',
    '',
    'options:',
    '  --download       Download [false]',
    '  --downloadPath   Path to download [./geoip2-cli]',
    '  --licenseKey     Your license key [error]',
    '  --editions       Editions: city, country, asn [city]',
    '  --date           Database date version [empty]',
    '',
    '  --convert        Convert [false]',
    '  --mmdbPath       Path to .mmdb [./geoip2-cli/GeoLite2-City.mmdb]',
    '  --jsonPath       Path to .json [mmdbPath + .json]',
    '',
    '  --help           Print this list and exit',
    '  --version        Print the version and exit.',
    '',
    'env:',
    '  GEOIP2_CLI_LICENCE_KEY',

Use in code

Installation

npm install geoip2-cli

Examples

import { Geoip2CliDownloader } from 'geoip2-cli';

await Geoip2CliDownloader
    .download({ licenseKey, date, edition, downloadPath })
    .then(path => console.log(path));
import { Geoip2CliConverter } from 'geoip2-cli';

const converter = Geoip2CliConverter.openSync('GeoLite2-City.mmdb');
const result = converter.getUnique();

License

MIT

Keywords

cli

FAQs

Package last updated on 04 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts