Skip to content

Standalone Scripts

ipwhoami ships standalone scripts for environments where Node.js isn’t available. These are feature-equivalent to the npm version.

Requires: curl, jq

Terminal window
curl -fsSL https://raw.githubusercontent.com/vineethkrishnan/ipwhoami/main/install.sh | bash

The Bash script accepts the same flags as the npm version:

Terminal window
ipwhoami # Your public IP
ipwhoami 8.8.8.8 # Specific IP
ipwhoami -c 1.1.1.1 # Compare mode
ipwhoami -p ipapi 8.8.8.8 # Choose provider
ipwhoami -r 8.8.8.8 # Raw JSON

After install, the script lives at /usr/local/bin/ipwhoami.

PowerShell Script (Windows / macOS / Linux)

Section titled “PowerShell Script (Windows / macOS / Linux)”

Requires: PowerShell 5.1+ (built into Windows 10/11) or PowerShell 7+

Terminal window
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/vineethkrishnan/ipwhoami/main/scripts/ipwhoami.ps1" -OutFile "$HOME\ipwhoami.ps1"
# Add alias
Add-Content $PROFILE 'Set-Alias ipwhoami "$HOME\ipwhoami.ps1"'

PowerShell uses named parameters:

Terminal window
ipwhoami # Your public IP
ipwhoami 8.8.8.8 # Specific IP
ipwhoami -Compare 1.1.1.1 # Compare mode
ipwhoami -Provider ipapi 8.8.8.8 # Choose provider
ipwhoami -Raw 8.8.8.8 # Raw JSON
FeaturenpmBashPowerShell
LookupYesYesYes
Compare modeYesYesYes
Raw JSONYesYesYes
Provider selectionYesYesYes
IPv6 supportYesYesYes
Auto-detect IPYesYesYes
DependenciesNode >= 18curl + jqPowerShell 5.1+