A lightweight Zsh utility script to quickly lookup airport names, cities, and countries from your terminal using standard three-letter IATA codes (e.g., SFO) or four-letter ICAO codes (e.g., KSFO).
It securely caches the massive airportsdata dataset locally so lookups are lightning-fast after the first run.
- Dual Format Support: Accepts both IATA (
LHR,DXB) and ICAO (EGLL,OMDB) codes. - Smart Input Sanitization: Automatically handles lowercase inputs and strips out trailing identifiers (e.g.,
sfo123becomesSFO). - ASCII Map Visualization: Pass the
--mapflag to render an equirectangular ASCII world map directly in your terminal, pinpointing the exact location of the airport. - Offline First: Downloads the database once and saves it locally (
~/.airport_codes_cache.csv) for subsequent instant lookups.
This script is optimized for macOS or any system running:
- Zsh (Z Shell)
- Python 3 (installed by default on modern operating systems)
curl(for the initial dataset download)