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
Displays a full geolocation summary for your current public IP.
ipcheck --short
# 141.144.249.100 - Germany (DE) 🇩🇪ipcheck --quiet
# 141.144.249.100ipcheck --raw
ipcheck --raw-prettyipcheck --ip 8.8.8.8
ipcheck --ip 1.1.1.1 --shortbashcurljqpython3(recommended for IP validation + emojis)- Linux or macOS terminal
Install directly from your tap:
brew install vespovios/ipcheck/ipcheckOr tap first:
brew tap vespovios/ipcheck
brew install ipcheckUpdate:
brew upgrade ipcheckUninstall:
brew uninstall ipcheckbash <(curl -sL https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/install.sh)This automatically:
- Detects your OS
- Installs dependencies
- Installs
ipcheckin the correct directory
git clone https://github.com/vespovios/ipcheck-cli.git
cd ipcheck-cli
chmod +x ipcheck
sudo cp ipcheck /usr/local/bin/ipchecksudo curl -L https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/ipcheck -o /usr/local/bin/ipcheck
sudo chmod +x /usr/local/bin/ipcheckInstall dependencies:
brew install jqThen install:
sudo curl -L https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/ipcheck -o /usr/local/bin/ipcheck
sudo chmod +x /usr/local/bin/ipcheckTest:
ipcheckipcheck 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
ipcheck includes a built-in update mechanism.
To check if a newer version is available:
ipcheck --check-updateThe update URL is defined inside the script:
UPDATE_URL="https://raw.githubusercontent.com/vespovios/ipcheck-cli/main/VERSION"Clone the repository:
git clone https://github.com/vespovios/ipcheck-cli.git
cd ipcheck-cliRun locally without installing:
./ipcheck --raw- Update the version in the script header:
VERSION="0.x.x" - Update the
VERSIONfile:echo "0.x.x" > VERSION
- 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
This project is licensed under the MIT License.
See the LICENSE file for details.