Skip to content
GreipioPublic

Repository files navigation

Greip CLI

The official command-line interface (CLI) for Greip.

Report Issue · Request Feature · API Documentation · Website

NPM Package Github Repository

npm version   GitHub code size in bytes   License: Apache 2.0   API Status


Installation

npm i --global ggip

or

yarn global add ggip

Greip API v2

ggip talks to Greip API v2. After ggip login <token>, requests use Bearer authentication. JSON output uses the v2 envelope (success, data, execution_ms); field names inside data follow v2 (for example ip.address, geo.country_code, is_valid, risk_level).

Use --format json on commands to inspect the full response. The --dev flag enables test mode (fake data; do not use in production).

Usage


$ ggip help
Usage: ggip [options] [command]

Greip CLI is a command-line interface for the Greip.io

Options:
-h, --help Display help for command
-v, --version Display the current version

Commands:
login <token> Login to the CLI
logout Logout from the CLI
me [options] Display your IP address and location information
lookup [options] <ip> Lookup a given IP address and display its location information
threats [options] <ip> Display IP threat / risk score information
country [options] <country> Display information about a given country
asn [options] <asn> Display information about a given ASN
bin [options] <bin> Lookup a given Bank Identification Number (BIN) and display its information
iban [options] <iban> Validate a given International Bank Account Number (IBAN)
email [options] <email> Validate a given email address
phone [options] <phone> <country> Validate a given phone number
profanity [options] <text> Check a given text for profanity
help [command] display help for command

Configuration

After installing the CLI, set your API token by running the login command:

ggip login your-api-key

Note You can obtain an API token just by creating an account at Greip.io.

Usage

1. Available commands

To get a list of all available commands of the CLI just use the help command as follows:

ggip help

This will provide you a list of commands and options.

2. Available options & examples

To list the available options and examples for a specific command, run help with that command:

ggip help lookup

This will provide a list of available options and examples for the lookup command.

Examples (live)

ggip login YOUR_API_KEY
ggip lookup 1.1.1.1 --format json
ggip threats 1.1.1.1 --format json
ggip country PS --format json
ggip asn AS13335 --format json

Credits

Releases

Used by

Contributors

Languages