# Install cidr with Homebrew, apt, MacPorts

CLI to perform various actions on CIDR ranges. Version 2.3.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:cidr
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cidr
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cidr
```

  Evidence: MacPorts ports tree: net/cidr/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install cidr
```

  Evidence: Debian stable package indexes: cidr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## Package facts

- **Package key:** brew:cidr
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cidr>
- **Version:** 2.3.0
- **Source summary:** CLI to perform various actions on CIDR ranges
- **Homepage:** <https://github.com/bschaatsbergen/cidr>
- **Repository:** <https://github.com/bschaatsbergen/cidr>
- **Upstream docs:** <https://github.com/bschaatsbergen/cidr#readme>
- **License:** MIT
- **Source archive:** <https://github.com/bschaatsbergen/cidr/archive/refs/tags/v2.3.0.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- cidr (cli)
- cidr (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.3.0
- Local data: ok
- Upstream repository: https://github.com/bschaatsbergen/cidr
- Upstream latest detected: v2.3.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

cidr is a small Go command-line tool for inspecting, counting, checking, and subdividing IPv4 and IPv6 CIDR prefixes.

### Project history

The GitHub repository was created in September 2022, and the first GitHub release followed that month. The README defines the tool around CIDR explanation, address containment, address counting, overlap checks, and division into smaller networks.

### Adoption history

The README documents Homebrew installation, Debian and Ubuntu packages for newer releases, and prebuilt binaries for Linux, macOS, and Windows. The batch input also records MacPorts packaging.

### How it is used

Typical commands include explaining a CIDR range, testing whether an address belongs to a range, counting addresses, checking whether two prefixes overlap, and dividing a prefix into distinct networks. The README examples cover both IPv4 and IPv6.

### Why package nerds care

cidr is package-nerd useful because it packages common subnet arithmetic into a simple cross-platform CLI, replacing shell snippets or ad hoc web calculators in scripts, package tests, and network automation.

### Timeline

- 2022: Public GitHub repository and v0.1.0 release.
- 2023: v1.x releases established the CLI line.
- 2024: v2.0.0 released.
- 2025: v2.3.0 released.

### Related projects

- Related tools in this batch include cidr2range, cidrmerge, and IPinfo CLI's IP-range helper binaries.

### Sources

- <https://github.com/bschaatsbergen/cidr#readme>
- <https://api.github.com/repos/bschaatsbergen/cidr>
- <https://api.github.com/repos/bschaatsbergen/cidr/releases>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cidr
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - cidr - 2.2.0-2+b9: normalized package name match | Debian stable package indexes: cidr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Simplifies IPv4/IPv6 CIDR network prefix management | https://github.com/bschaatsbergen/cidr
- MacPorts - cidr: normalized package name match | MacPorts ports tree: net/cidr/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [prips](https://www.automicvault.com/pkg/brew/prips/) - Shares av.db curated category or tags: cidr, cli, ip-addresses, ip-addressing, networking.
- [cidr2range](https://www.automicvault.com/pkg/brew/cidr2range/) - Shares av.db curated category or tags: cidr, cli, ip-addressing, networking.
- [cidrmerge](https://www.automicvault.com/pkg/brew/cidrmerge/) - Shares av.db curated category or tags: cidr, cli, ip-addressing, networking.
- [mapcidr](https://www.automicvault.com/pkg/brew/mapcidr/) - Shares av.db curated category or tags: cidr, cli, ip-addressing, networking.
- [ipinfo](https://www.automicvault.com/pkg/brew/ipinfo/) - Shares av.db curated category or tags: cidr, cli, ip-addressing, networking.
- [netmask](https://www.automicvault.com/pkg/brew/netmask/) - Shares av.db curated category or tags: cli, ip-addressing, networking.
- [range2cidr](https://www.automicvault.com/pkg/brew/range2cidr/) - Shares av.db curated category or tags: cidr, cli, ip-addressing, networking.
- [sipcalc](https://www.automicvault.com/pkg/brew/sipcalc/) - Shares av.db curated category or tags: cli, ip-addressing, networking.
- [ip6](https://www.automicvault.com/pkg/npm/ip6/) - Local package facts share a topical domain. Shared terms: addressing, cli, ip-addressing, networking.

## Combined YAML source

View the package source record on GitHub. [combined/cidr.yml](https://github.com/automic-vault/db/blob/main/combined/cidr.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
