This script fetches the most up-to-date ASN information and saves as JSON or JSONL file and may upload to S3/R2 bucket if environment variables are set.
cargo install asninfo
brew install bgpkit/tap/asninfo
Using cargo-binstall
Install cargo-binstall
first:
cargo install cargo-binstall
Then install asninfo
using cargo binstall
cargo binstall asninfo
A utility tool to export ASN information to JSON files.
Usage: asninfo [OPTIONS] [PATH]
Arguments:
[PATH] Export data path [default: ./asninfo.jsonl]
Options:
-u, --upload Flag to enable upload to S3-compatible object storage
-s, --simplified Simplified format
-h, --help Print help
-V, --version Print version
AWS_REGION
AWS_ENDPOINT
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
ASNINFO_UPLOAD_PATH
: full path withs3
orr2
prefix, such asr2://spaces/broker/asninfo.jsonl