Skip to content

vespovios/ipcheck-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipcheck-cli

Homebrew tap Latest release Downloads License CI status Profile views

macOS Installation (Homebrew)
brew install vespovios/ipcheck/ipcheck

Ubuntu / Debian Installation
curl -sL https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/install.sh | bash

Alternatively, download the script manually and place ipcheck in /usr/local/bin.

ipcheck is a lightweight Bash CLI tool for querying IP geolocation information using the public API at https://get.geojs.io.

It supports:

  • 🌈 Pretty, colored terminal output (with country flag emoji)
  • ✨ Short / quiet modes for scripting
  • 🧩 Raw JSON output (compact or pretty-printed)
  • 🔎 Lookup of arbitrary IP addresses (--ip)
  • ⚡ Local caching to avoid repeated API calls
  • 🔔 Optional update checker (--check-update)
  • 🛠 Works on Linux and macOS

🚀 Features

Full output (default)

Displays a full geolocation summary for your current public IP.

Short output

ipcheck --short
# 141.144.249.100 - Germany (DE) 🇩🇪

Quiet output (IP only)

ipcheck --quiet
# 141.144.249.100

Raw JSON / pretty JSON

ipcheck --raw
ipcheck --raw-pretty

Lookup a specific IP

ipcheck --ip 8.8.8.8
ipcheck --ip 1.1.1.1 --short

📦 Installation

Requirements

  • bash
  • curl
  • jq
  • python3 (recommended for IP validation + emojis)
  • Linux or macOS terminal

🍺 Homebrew Install (macOS & Linuxbrew)

Install directly from your tap:

brew install vespovios/ipcheck/ipcheck

Or tap first:

brew tap vespovios/ipcheck
brew install ipcheck

Update:

brew upgrade ipcheck

Uninstall:

brew uninstall ipcheck

⭐ One-Line Install (Linux or macOS)

bash <(curl -sL https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/install.sh)

This automatically:

  • Detects your OS
  • Installs dependencies
  • Installs ipcheck in the correct directory

🛠 Manual Installation

Option 1 — Clone repository & install

git clone https://github.com/vespovios/ipcheck-cli.git
cd ipcheck-cli

chmod +x ipcheck
sudo cp ipcheck /usr/local/bin/ipcheck

Option 2 — Quick Install (Linux)

sudo curl -L https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/ipcheck -o /usr/local/bin/ipcheck
sudo chmod +x /usr/local/bin/ipcheck

Option 3 — Quick Install (macOS)

Install dependencies:

brew install jq

Then install:

sudo curl -L https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/ipcheck -o /usr/local/bin/ipcheck
sudo chmod +x /usr/local/bin/ipcheck

Test:

ipcheck

📘 Usage

ipcheck v0.7.3

Usage: ipcheck [OPTIONS]

Fetch and display public IP geolocation information (using geojs.io).

Options:
  -i, --ip IP        Look up a specific IP instead of your own
  -s, --short        Show short output (IP, country, flag)
  -r, --raw          Output raw JSON from the API
      --raw-pretty   Output pretty-printed JSON
  -q, --quiet        Output only the IP address
      --no-flag      Disable country flag emoji
      --check-update Check for a newer ipcheck version (if UPDATE_URL is set)
  -h, --help         Show this help message and exit

🔄 Update Checking

ipcheck includes a built-in update mechanism.

To check if a newer version is available:

ipcheck --check-update

The update URL is defined inside the script:

UPDATE_URL="https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/VERSION"

🛠 Development

Clone the repository:

git clone https://github.com/vespovios/ipcheck-cli.git
cd ipcheck-cli

Run locally without installing:

./ipcheck --raw

Bumping version numbers

  1. Update the version in the script header:
    VERSION="0.x.x"
  2. Update the VERSION file:
    echo "0.x.x" > VERSION
  3. Commit and tag:
    git add ipcheck VERSION
    git commit -m "Bump version to 0.x.x"
    git tag v0.x.x
    git push
    git push origin v0.x.x

📜 License

This project is licensed under the MIT License.
See the LICENSE file for details.

About

A fast, clean, cross-platform CLI tool for checking your public IP and geolocation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages