airq
Check air quality from your terminal. Any city in the world, no API key needed.
Two data providers:
- Open-Meteo — global coverage, PM2.5, PM10, CO, NO2 (default)
- Sensor.Community — citizen science sensors, real-time PM2.5/PM10
Install
Usage
By city name (geocoding via Open-Meteo)
Any city, town, or village — resolved automatically via Open-Meteo geocoding API:
$ airq --city gazipasa
Resolved city: Gazipaşa, Türkiye
Air Quality for Coordinates: 36.3, 32.3
--------------------------------------------------
PM2.5: 12.8 μg/m³ (green = good)
PM10: 16.6 μg/m³ (green = good)
CO: 160 μg/m³ (green = good)
NO2: 2 μg/m³ (green = good)
By coordinates
Sensor.Community (citizen science sensors)
Real-time data from sensor.community network — 15,000+ sensors worldwide:
# Use specific sensor by ID
# Find nearby sensors
JSON output
Color coding (WHO thresholds)
Output is color-coded based on WHO Air Quality Guidelines (2021):
| Pollutant | Green (Good) | Yellow (Moderate) | Red (Poor) |
|---|---|---|---|
| PM2.5 | ≤ 15 µg/m³ | 15–35 µg/m³ | > 35 µg/m³ |
| PM10 | ≤ 45 µg/m³ | 45–100 µg/m³ | > 100 µg/m³ |
| CO | ≤ 4 mg/m³ | 4–10 mg/m³ | > 10 mg/m³ |
| NO2 | ≤ 25 µg/m³ | 25–50 µg/m³ | > 50 µg/m³ |
Data sources
- Open-Meteo Air Quality API — free, no key, global coverage
- Open-Meteo Geocoding API — city name → coordinates
- Sensor.Community — citizen science, real-time sensors
Built with
This project was created by rust-code AI agent in autonomous BigHead mode — from cargo init to cargo publish without human edits.
License
MIT