oh-my-zsh-ipnav
November 23, 2025 ยท View on GitHub
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
- 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
- Add
ipnavto your plugins in~/.zshrc:
plugins=(
# ... other plugins
ipnav
)
- Reload your shell:
source ~/.zshrc
Available Aliases
Validation
| Alias | Command | Description |
|---|---|---|
ipv | ipnav validate-ip | Validate IPv4 address |
ipmask | ipnav validate-mask | Validate subnet mask |
ipcidr | ipnav validate-cidr | Validate CIDR notation |
ipvbatch | ipnav validate-batch | Validate multiple IPs |
Conversion
| Alias | Command | Description |
|---|---|---|
ipbin | ipnav to-binary | Convert IP to binary |
ipfbin | ipnav from-binary | Convert binary to IP |
ipint | ipnav to-integer | Convert IP to integer |
ipfint | ipnav from-integer | Convert integer to IP |
ipc2m | ipnav cidr-to-mask | CIDR to subnet mask |
ipm2c | ipnav mask-to-cidr | Subnet mask to CIDR |
ipcvt | ipnav convert | Show all representations |
Subnet Operations
| Alias | Command | Description |
|---|---|---|
ipsinfo | ipnav subnet-info | Get subnet information |
ipnet | ipnav network-address | Calculate network address |
ipbcast | ipnav broadcast-address | Calculate broadcast address |
ipinsubnet | ipnav in-subnet | Check subnet membership |
IP Operations
| Alias | Command | Description |
|---|---|---|
ipclass | ipnav classify | Classify as public/private |
ipnext | ipnav next | Get next IP address |
ipprev | ipnav previous | Get previous IP address |
iprange | ipnav range | Generate IP range |
ipcmp | ipnav compare | Compare 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.
Related Projects
- ip-navigator-cli - The CLI tool this plugin enhances
- ip-navigator - Core IP address operations library
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
- Website: marctysonclebert.com
- GitHub: @clebertmarctyson
- Twitter/X: @ClebertTyson
- Buy me a coffee: Support my work
Support
If this plugin has been helpful, consider:
- โญ Starring the repository
- โ Buying me a coffee
Made with โค๏ธ for the Oh My Zsh community
