from Hacker News

Wttr: Console-oriented weather forecast service

by saikatsg on 7/17/25, 6:05 AM with 87 comments

  • by Duanemclemore on 7/17/25, 7:46 AM

    This is pretty rad.

    I'm surprised no one's made a CEEFAX replica for the terminal yet [0]. Their weather page is pretty iconic [1].

    [0] There are CEEFAX Emulators online that pull from the BBC RSS feeds to do this.

    [1] https://teletextart.co.uk/wp-content/uploads/2016/05/weather...

  • by yoavm on 7/17/25, 7:59 AM

    That's a niche within a niche, I know, but for those using Waybar (https://github.com/Alexays/Waybar/), I've built wttrbar (https://github.com/bjesus/wttrbar/) - it uses Wttr.in to display a nice detailed weather widget in your bar.
  • by Langdal on 7/17/25, 11:33 AM

    I really like the idea, but the data quality for my city (Trondheim, Norway) was unfortunately too off for me to use.

    The national forecast service (yr.no) is saying it will be sunny and very hot all through the weekend, while wttr reports it will be 16-19 degrees Celcius and rain on saturday.

  • by pixelbeat__ on 7/17/25, 12:07 PM

    Note the terminal -> HTML conversion used to serve wttr.in is based on https://github.com/pixelb/scripts/blob/master/scripts/ansi2h...
  • by inanutshellus on 7/17/25, 6:40 PM

    This is super fun. I love it. I feel like weather data is both free and openly available (NWS) but any random search I do for the info is embedded in dozens of ads actively trying to slow me down before I can get to the exact search I'm after. Using this precludes all that. Gorgeous.

    (Bug report - It shows me a full weather forecast even if it doesn't know where I am!)

        [snip]
        $ curl wttr.in
        Weather report: not found
        (then shows pretty forecasts anyway)
        [/snip]
    
    Edit: Is there a way to show Fahrenheit instead of Celsius? I don't see it in the options https://wttr.in/:help. OH. "u".
  • by knadh on 7/17/25, 2:07 PM

    Weather over DNS

      dig london.weather @dns.toys
  • by DocTomoe on 7/17/25, 9:42 AM

    From this developer: a talk about this project, some similar of his projects, and console/textmode-web interfaces: https://media.ccc.de/v/gpn18-164-using-and-creating-console-...
  • by aa-jv on 7/17/25, 8:19 AM

    Ah, the age of the terminal is still very much well and truly with us. If only the teenager me, clutching my vt100 back in 1988 as it was being removed to be replaced with 'a modern computer interface', would've known not to fret so much and just let the future have its way ..

    The very awesome awesome-console-services has more neat tools like this:

    https://github.com/chubin/awesome-console-services

    My favourite is:

    $ nc ticker.bitcointicker.co 10080

    .. which is a nice thing to check while waiting for builds ..

    And then, there is this wonderful, wonderful thing:

    $ curl cheat.sh

    Such a great resource when all you've got is a terminal and 15 minutes waiting for those builds ..

    Another great one, which I have found very useful for sending myself links across an air gap ..

    $ curl qrenco.de/https://news.ycombinator.com/item\?id\=44590971

    Okay, one more, because I just can't get enough:

    $ curl https://api.lyrics.ovh/v1/depeche-mode/behind-the-wheel

  • by krylon on 7/17/25, 9:03 AM

    I really appreciate this service.

    Worth pointing out, maybe, that there is an emacs package, too - more than one, actually, the one I am using (occasionally, at least) is https://github.com/cjennings/emacs-wttrin which is available from melpa.

  • by rollcat on 7/17/25, 8:55 AM

        curl wttr.in/London > london.txt
        open -a TextEdit london.txt
    
    Witness the control code garbage.

    IMHO you should not emit ANSII escape sequences until you at least call isatty, preferably also consult termcap. But also IMHO we should bury the terminals, and build better REPLs and lightweight GUI toolkits.

  • by edarchis on 7/17/25, 7:27 AM

    I love this one, it's excellent at packing lots and lots of information in very little space.

    It's sadly victim of its success and is quite often over quota to its weather API. We should make a paid version that wouldn't have this problem and bring some monetary karma to Igor

  • by PhilippGille on 7/17/25, 10:46 AM

    Unfortunately 3-letter airport codes don't work as advertised, because for many airport codes there are actual cities with the same 3-letter name and those take precedence in their lookup.

    Multiple GitHub issues around this have been opened already.

    Otherwise pretty neat of course!

  • by acaloiar on 7/17/25, 3:18 PM

    Wttr is an essential in my i3bar: curl -s 'https://wttr.in/Revelstoke,BC?format=4&u'
  • by mynameajeff on 7/18/25, 12:14 PM

    This is cool but I can't seem to find the best way to give a better location closer to my area when I live in a rural enough location that I don't have a good city (with a name that isn't overshadowed by a more popular version elsewhere) or airport nearby

    Edit: for some reason upon trying again coordinates work, first time I tried the same url I kept getting "unknown location"

  • by pvdebbe on 7/17/25, 8:29 AM

    Kinda neat. One UX gotcha that I spot right away. I'm polling weather for my area (UTC+3) and it gives me some night time values even though it's noon. I'm thinking timezones?
  • by voidUpdate on 7/17/25, 7:17 AM

    This is cool, but it seems to give different results for my city depending on whether I use the normal view or the v2 or ?format views. The current weather is closer to the normal view
  • by zzo38computer on 7/17/25, 6:56 PM

    It does not seem to support ASCII, nor VT100 line drawing. Also, I tried before setting Accept and Accept-Charset headers and others and they do not seem to work.
  • by whalesalad on 7/17/25, 2:36 PM

    missing the epic music - https://weatherstar.netbymatt.com/
  • by hliyan on 7/17/25, 9:00 AM

    For some reason, I was expecting a user experience like:

      $ weather in san francisco, today evening?
        about 14C, no rain, cloudy
  • by eisbaw on 7/17/25, 7:18 AM

    I like the service but I've displayed this via curl on my home dashboard for more than 2 years - and the uptime is not great.
  • by mixcocam on 7/17/25, 8:47 AM

    I think that this popularity is making the site slow down dramatically. I hope all these hits won't cost too much $$
  • by mixcocam on 7/17/25, 8:47 AM

    I think that this popularity is making the site slow down dramatically. I hope all these hits won't cost too much $$
  • by cft on 7/17/25, 7:54 AM

    It needs a compact Non-ascii Graphics form, in termux on my phone, the ASCII output is too big for the screen size.
  • by ashafq on 7/19/25, 1:31 AM

    This project is great! I have used this API for a personal WiFi enabled dashboard on an ESP32.
  • by cess11 on 7/17/25, 7:17 AM

    Used it for a while but moved over to a national weather service for better data and uptime.

    Nice API though.

  • by extraduder_ire on 7/18/25, 4:15 PM

    Going to /moon will give you the moon phase and some other info too.
  • by chrismatheson on 7/17/25, 9:46 AM

    This was a welcome find today on HN. Gave my day a bit of joy.
  • by kcaseg on 7/17/25, 7:50 AM

    We need more little ANSI suns in the age of AI slop
  • by jagrsw on 7/17/25, 12:06 PM

    Time for some FUD :)

    Printing arbitrary output to most terminal emulators is some security risk (even if pretty much everyone does it). Many suffer from vulnerabilities, both past and present, that can allow specially crafted text to inject commands back into the shell. The issue lies in the complex and often legacy standards for handling control characters and escape sequences.

    Even xterm is not entirely immune to these problems and has had security advisories issued in the past.

    While this attack surface has received attention from sec-researchers in the past, it's not remotely comparable to the scrutiny applied to web browsers. The ecosystem around terminals generally lacks the massive, continuously-funded bug bounty programs and large-scale, constant fuzzing that browsers are subjected to.

  • by senectus1 on 7/18/25, 1:21 AM

    this is sweet! one more thing I can do in the terminal
  • by ioma8 on 7/17/25, 7:15 AM

    The site is down :(
  • by lpollin on 7/17/25, 9:38 AM

    This is great, but you can vibe this and have your own custom version hitting free weather services and getting the specific info you want without making global calls to a service that might not stick around. Also, when you make calls from a terminal, it could expose your server as one they might want to try to attack, because you might have access that they want and might be gullible enough to use random services, so your security might not be great. Even if the developer is well-intentioned, the person that takes over their domain later might not be. Curl has vulnerabilities, though.