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

ipfy

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfy

A beautiful and interactive Node.js CLI utility to quickly fetch your local and public IPv4 addresses.

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

ipfy

A beautiful and interactive Node.js CLI utility to quickly fetch your local and public IPv4 addresses.

Features

  • 🎨 Interactive Menu - Arrow-key navigation for easy selection
  • 🌈 Colorful Output - Beautiful, color-coded terminal output using Chalk
  • 🖥️ Local IP - Fetch all local IPv4 addresses (excluding 127.0.0.1)
  • 🌍 Public IP - Fetch your public-facing IPv4 address
  • Fast & Lightweight - Minimal dependencies, maximum performance
  • 🚀 Multiple Modes - Interactive menu or command-line flags
  • 🎯 Script-Friendly - Clean output for piping and automation

Installation

Prerequisites

  • Node.js >= 18.0.0

Install globally

npm install -g ipfy
npx ipfy

Usage

Interactive Mode

Simply run ipfy without any flags to launch the interactive menu:

ipfy

You'll see a menu where you can use arrow keys to select:

  • My Local IP Address
  • My Public IP Address
  • Both Local and Public IPs
  • Exit

Command-Line Flags

Show Local IP

ipfy --local

Output:

192.168.1.7

Show Public IP

ipfy --public

Output:

203.0.113.42

Show Help

ipfy --help
# or
ipfy -h

Examples

Use in Scripts

# Store local IP in a variable
LOCAL_IP=$(ipfy --local)
echo "My local IP is: $LOCAL_IP"

# Store public IP in a variable
PUBLIC_IP=$(ipfy --public)
echo "My public IP is: $PUBLIC_IP"

Pipe to Other Commands

# Copy IP to clipboard (Linux with xclip)
ipfy --public | xclip -selection clipboard

# Save to file
ipfy --local > my-ip.txt

Dependencies

  • @inquirer/prompts - Interactive command-line prompts
  • chalk - Terminal string styling

Technical Details

  • Local IP Detection: Uses native Linux/Unix commands (ip, awk, cut)
  • Public IP Detection: Fetches from api.ipify.org
  • Platform: Linux/Unix systems only

License

MIT

Author

Syam Farijal

Keywords

ip

FAQs

Package last updated on 09 Dec 2025

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