A command-line interface to query and explore IRR & BGP data from IRRexplorer.net in real-time.
IRRexplorer CLI provides a simple way to access and analyze Internet Routing Registry (IRR) and BGP data through the command line. It interfaces with the IRRexplorer v2 service to help network operators and administrators debug routing data and verify filtering strategies.
- Query prefix information
- Lookup ASN details
- Real-time data access from IRRexplorer.net
- Easy-to-use command-line interface
- Async support for efficient data retrieval
pip install irrexplorer-cli
- GitHub Repository: https://github.com/kiraum/irrexplorer-cli
- PyPI Package: https://pypi.org/project/irrexplorer-cli
Query Prefix (or IP) Information
irrexplorer prefix 200.160.4.153
Query ASN Information
irrexplorer asn AS22548
The following flags customize the output:
-
-f
or--format
: Specify output formatjson
: Output results in JSON formatcsv
: Output results in CSV format- Default format is human-readable text
-
-u
or--url
: Specify a custom base URL for the IRR Explorer API
irrexplorer --url https://custom-irrexplorer.example.com prefix 200.160.4.153
-d
or--debug
: Enable debug logging for troubleshooting
irrexplorer --debug prefix 200.160.4.153
- Python 3.13+
- httpx
- typer
- rich
- Clone the repository:
git clone https://github.com/kiraum/irrexplorer-cli.git
- Create/activate venv:
python3 -m venv venv
. venv/bin/activate
- Install dependencies:
pip install --upgrade uv
uv pip sync requirements.lock
- Run pre-commit tests before to push:
pre-commit run --all-files
The CLI tool queries data from IRRexplorer.net, which includes:
- IRR objects and relations (route(6) and as-sets)
- RPKI ROAs and validation status
- BGP origins from DFZ
- RIRstats
Contributions are welcome! Please feel free to submit a Pull Request.
See LICENSE file for details.
This tool interfaces with IRRexplorer v2, a project maintained by Stichting NLNOG.