Skip to content

🌐 Oh My Zsh plugin for ip-navigator-cli - Convenient aliases and completions for IP address operations

License

Notifications You must be signed in to change notification settings

clebertmarctyson/oh-my-zsh-ipnav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

oh-my-zsh-ipnav

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

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

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 [email protected]

Support

If this plugin has been helpful, consider:


Made with ❀️ for the Oh My Zsh community

About

🌐 Oh My Zsh plugin for ip-navigator-cli - Convenient aliases and completions for IP address operations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages