oh-my-zsh-ipnav

November 23, 2025 ยท View on GitHub

License: MIT

Buying me a coffee

Oh My Zsh ipnav Plugin

๐ŸŒ Oh My Zsh plugin for ip-navigator-cli - Provides convenient aliases and completions for IP address operations.

Prerequisites

You must have ip-navigator-cli installed:

npm install -g ip-navigator-cli

Installation

Oh My Zsh

  1. Clone this repository into Oh My Zsh's custom plugins directory:
git clone https://github.com/clebertmarctyson/oh-my-zsh-ipnav \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/ipnav
  1. Add ipnav to your plugins in ~/.zshrc:
plugins=(
  # ... other plugins
  ipnav
)
  1. Reload your shell:
source ~/.zshrc

Available Aliases

Validation

AliasCommandDescription
ipvipnav validate-ipValidate IPv4 address
ipmaskipnav validate-maskValidate subnet mask
ipcidripnav validate-cidrValidate CIDR notation
ipvbatchipnav validate-batchValidate multiple IPs

Conversion

AliasCommandDescription
ipbinipnav to-binaryConvert IP to binary
ipfbinipnav from-binaryConvert binary to IP
ipintipnav to-integerConvert IP to integer
ipfintipnav from-integerConvert integer to IP
ipc2mipnav cidr-to-maskCIDR to subnet mask
ipm2cipnav mask-to-cidrSubnet mask to CIDR
ipcvtipnav convertShow all representations

Subnet Operations

AliasCommandDescription
ipsinfoipnav subnet-infoGet subnet information
ipnetipnav network-addressCalculate network address
ipbcastipnav broadcast-addressCalculate broadcast address
ipinsubnetipnav in-subnetCheck subnet membership

IP Operations

AliasCommandDescription
ipclassipnav classifyClassify as public/private
ipnextipnav nextGet next IP address
ipprevipnav previousGet previous IP address
iprangeipnav rangeGenerate IP range
ipcmpipnav compareCompare two IPs

Utility Functions

ipcheck <ip>

Quick IP validation with colored output.

ipcheck 192.168.1.1

ipsubnet <ip> <cidr>

Get complete subnet info using CIDR notation.

ipsubnet 192.168.1.100 24

ipvalidate-file <file>

Validate all IPs from a file.

ipvalidate-file servers.txt

ippublic <ip>

Quick check if IP is public or private.

ippublic 8.8.8.8

ipcount <start> <end>

Count IPs in a range.

ipcount 192.168.1.1 192.168.1.255

Examples

# Quick validation
ipv 192.168.1.1

# Convert to binary
ipbin 10.0.0.1

# Get subnet info
ipsubnet 192.168.1.100 24

# Check if IP is public
ippublic 8.8.8.8

# Generate range
iprange 192.168.1.1 192.168.1.10

# Validate multiple IPs
ipvbatch 192.168.1.1 10.0.0.1 8.8.8.8

Autocompletion

The plugin includes autocompletion for all ipnav commands. Just type ipnav and press Tab.

Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new aliases or functions
  • Submit pull requests

License

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

Author

Marc Tyson CLEBERT contact@marctysonclebert.com

Support

If this plugin has been helpful, consider:


Made with โค๏ธ for the Oh My Zsh community