npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

panahon

v0.1.4

Published

Terminal weather forecast — current conditions, 7-day forecast, wind & humidity

Readme

Panahon 🌤

A terminal weather forecast tool written in TypeScript — current conditions, 7-day forecast, wind & humidity. Powered by Open-Meteo.

Panahon (Tagalog) — weather, season, or time.


Features

  • 🌍 Look up any city worldwide by name
  • 🗺️ Pass a country name to get weather across its 5–8 major cities at once
  • 📍 Auto-detect your location via IP
  • 📅 7-day forecast with highs, lows, humidity, wind & rain
  • 🕰️ Historical weather for any past date back to 1940
  • 🌬️ Air quality (US AQI + PM2.5, PM10, O3, NO2, SO2, CO) via --air
  • 🔍 Minimal mode (--min) — compact view with just the condition, temperature, and ASCII art (city lookups only)
  • ⏳ Loading spinner while fetching data
  • 🎨 Colour-coded temperatures, emoji weather icons, and aligned monospace tables
  • ⚡ Single binary, no API keys, no config

Install

Requires Node.js 22+. If you use mise (recommended), it will auto-install the right version from .mise.toml:

git clone https://github.com/markanthonyuy/panahon-cli.git
cd panahon-cli
mise trust && mise install   # optional: pins Node 22 LTS for this project
npm install
npm run build
npm link

This installs two binaries — panahon and the shorter alias pan. Use whichever you prefer.

Usage

# Show help
panahon        # or: pan

# Look up a city
panahon Manila
pan "New York"
pan Tokyo

# Look up a whole country — shows weather across major cities
pan Philippines
pan Japan
pan "United States"
pan "United Kingdom"

# Auto-detect location from your IP
pan auto

# Use raw coordinates
pan now --lat 14.5 --lon 121.0

# Explicit subcommand
pan now Manila

# Historical weather (yesterday or any past ISO date)
pan yesterday
pan 2024-12-25
pan 2024-12-25 "Las Pinas"
pan history yesterday Tokyo

# Air quality (US AQI + pollutants)
pan Manila --air
pan auto --air
pan now Tokyo --air

# Minimal view — condition, temperature, and ASCII art only
pan Manila --min
pan auto --min
pan now Tokyo --minimal

Multi-word names (cities or countries) must be quoted: pan "New York", pan "South Korea".

Dates must be in ISO 8601 format: YYYY-MM-DD. The keywords yesterday and today are also accepted.

Commands

| Command | Description | | --------------------------------------- | ------------------------------------------------------ | | panahon <city> / pan <city> | Show forecast for the given city | | pan <country> | Show weather across the country's major cities | | pan now [loc] | Same as above, with --lat / --lon coordinate flags | | pan auto | Detect location via IP and show forecast | | pan <date> [loc] | Historical weather for a past date (YYYY-MM-DD) | | pan history <date> [loc] | Explicit historical subcommand (alias: on) | | pan <city> --air | Air quality report (US AQI + key pollutants) | | pan <city> --min | Minimal view: condition, temperature, and ASCII art (city only) | | pan -h, --help | Show help | | pan -v, --version | Show version |

Supported countries

128 countries are supported for country-mode lookups, covering all major regions:

Africa — Algeria, Angola, Cameroon, DR Congo, Egypt, Ethiopia, Ghana, Ivory Coast, Kenya, Libya, Madagascar, Mali, Morocco, Mozambique, Niger, Nigeria, Rwanda, Senegal, South Africa, Sudan, Tanzania, Tunisia, Uganda, Zambia, Zimbabwe

Americas — Argentina, Bolivia, Brazil, Canada, Chile, Colombia, Costa Rica, Cuba, Dominican Republic, Ecuador, El Salvador, Guatemala, Honduras, Jamaica, Mexico, Nicaragua, Panama, Paraguay, Peru, Trinidad and Tobago, United States, Uruguay, Venezuela

Asia — Afghanistan, Armenia, Azerbaijan, Bahrain, Bangladesh, Cambodia, China, Georgia, India, Indonesia, Iran, Iraq, Israel, Japan, Jordan, Kazakhstan, Kuwait, Kyrgyzstan, Laos, Lebanon, Malaysia, Mongolia, Myanmar, Nepal, Oman, Pakistan, Philippines, Qatar, Russia, Saudi Arabia, Singapore, South Korea, Sri Lanka, Syria, Taiwan, Tajikistan, Thailand, Turkey, United Arab Emirates, Uzbekistan, Vietnam, Yemen

Europe — Albania, Austria, Belarus, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Latvia, Lithuania, Moldova, Netherlands, North Macedonia, Norway, Poland, Portugal, Romania, Russia, Serbia, Slovakia, Slovenia, Spain, Sweden, Switzerland, Ukraine, United Kingdom

Oceania — Australia, New Zealand, Papua New Guinea

Example output

City forecast

════════════════════════════════════════════════════════════════════════════════════
  🌍  Manila, National Capital Region, Philippines   •   5/17/2026, 1:01:46 PM
════════════════════════════════════════════════════════════════════════════════════

  CURRENT CONDITIONS

       .-.      ⛈️  Condition       Thunderstorm
      (   ).    🌡️  Temperature     33°C  (feels like 39.4°C)
     (___(__)   💨  Wind            8.8 km/h SW
      /_  /_    💧  Humidity        ██████████░░░░░░  62%
       /    /   🌧️  Precipitation   0 mm

────────────────────────────────────────────────────────────────────────────────────

  7-DAY FORECAST

  Day   Condition             High     Low     Hum  Wind            Rain
────────────────────────────────────────────────────────────────────────────────────
  Today ⛈️ Thunderstorm       33°    25.1°    74%  11.6 km/h NE   8.4 mm
  Mon   🌧️ Moderate rain      32.7°   25.1°    78%  15 km/h NE     3.9 mm
  ...

Country forecast

════════════════════════════════════════════════════════════════════════════════════
  🇵🇭  Philippines   •   5/17/2026, 1:13:10 PM
════════════════════════════════════════════════════════════════════════════════════

  WEATHER ACROSS PHILIPPINES

  City                   Condition              Temp    Feels     Hum  Wind
────────────────────────────────────────────────────────────────────────────────────
  Manila              ⛈️ Thunderstorm           33°C   39.4°C     62%  8.8 km/h SW
  Quezon City         ☁️ Overcast             33.3°C   38.8°C     59%  5.1 km/h W
  Davao               ☁️ Overcast             27.5°C   33.5°C     85%  3.5 km/h E
  Cebu City           🌦️ Light drizzle        33.4°C     39°C     51%  9 km/h E
  Zamboanga           🌦️ Moderate drizzle     30.5°C   36.1°C     64%  7.6 km/h SE
  Antipolo            🌦️ Moderate drizzle       31°C   35.6°C     65%  8.3 km/h NE
  Taguig              ☁️ Overcast               34°C   40.9°C     57%  9.1 km/h SE
  Pasig               ☁️ Overcast             34.2°C   40.1°C     53%  4.2 km/h E

════════════════════════════════════════════════════════════════════════════════════
  Data: Open-Meteo.com
════════════════════════════════════════════════════════════════════════════════════

Air quality

════════════════════════════════════════════════════════════════════════════════════
  🌍  Manila, National Capital Region, Philippines   •   5/17/2026, 11:27:20 PM
════════════════════════════════════════════════════════════════════════════════════

  AIR QUALITY

      \ | /     🌬️  AQI (US)              75  Moderate
       .-.      🔬  PM2.5                 26.7 μg/m³  ██████░░░░░░░░░░
    ‒ (   ) ‒   🔬  PM10                  27.5 μg/m³  ███░░░░░░░░░░░░░
       `-`      🌿  O3 (Ozone)            57 μg/m³
      / | \     🏭  NO2                   23.7 μg/m³
                ⚗️  SO2                   14.4 μg/m³
                🚗  CO                    368 μg/m³

  💡  Unusually sensitive people should consider limiting prolonged outdoor exertion.

════════════════════════════════════════════════════════════════════════════════════
  Data: Open-Meteo Air Quality (no API key required)
════════════════════════════════════════════════════════════════════════════════════

Development

Requires mise to manage tasks and tooling.

mise run setup       # first-time: install deps, build, npm link
mise run dev         # run from source via tsx (no build step)
mise run typecheck   # tsc --noEmit
mise run build       # compile to dist/
mise run test        # all tests (unit + API + CLI; requires build)
mise run test:unit   # fast pure unit tests, no network
mise run test:api    # live Open-Meteo + ipapi health checks
mise run test:cli    # end-to-end CLI tests against dist/index.js
mise run try         # smoke-test against Manila

Set PANAHON_SKIP_NETWORK=1 to skip the network-dependent tests in CI / offline.

Project structure

src/
├── index.ts        CLI entrypoint (commander, routing)
├── weather.ts      Open-Meteo forecast + historical API client
├── display.ts      Terminal rendering (chalk + string-width)
├── ascii.ts        Animated ASCII weather art
├── countries.ts    Country → major cities map with coordinates and flags
├── dates.ts        Date parsing helpers
├── utils.ts        Padding helpers + loading spinner
└── constants.ts    API URLs

How it works

Stack

  • TypeScript (strict, NodeNext ESM)
  • axios — HTTP requests
  • chalk — terminal colours
  • commander — CLI argument parsing
  • string-width — visual width measurement for proper column alignment with emojis

Created by

Mark Uy[email protected]

Built as a portfolio piece to demonstrate TypeScript CLI design, terminal UX, and API integration. Feedback and ideas welcome.

License

MIT © Mark Uy