@kszongic/randip-cli
v1.0.0
Published
Generate random IP addresses (IPv4 & IPv6) for testing and development
Maintainers
Readme
@kszongic/randip-cli
Generate random IP addresses (IPv4 & IPv6) from the command line. Zero dependencies. Useful for testing, mocking, seeding databases, and network tooling.
Install
npm install -g @kszongic/randip-cliUsage
# One random IPv4
randip
# → 142.87.203.11
# One random IPv6
randip -6
# → a3f1:28c0:9e7b:44d2:1fc8:bb03:7e91:d540
# Ten random IPv4 addresses
randip -n 10
# Private addresses only (RFC 1918)
randip --private -n 5
# → 10.44.201.3
# → 192.168.12.99
# → ...
# Public (non-reserved) addresses only
randip --public -n 5
# Random IP within a CIDR range
randip -c 10.0.0.0/24
# → 10.0.0.173Options
| Flag | Description |
|------|-------------|
| -4, --ipv4 | Generate IPv4 address (default) |
| -6, --ipv6 | Generate IPv6 address |
| -n, --count <n> | Number of addresses (default: 1) |
| -c, --cidr <cidr> | Generate within CIDR range (IPv4) |
| --private | Private/RFC1918 addresses only |
| --public | Public (non-reserved) addresses only |
| -h, --help | Show help |
| -v, --version | Show version |
License
MIT © 2026 kszongic
