wego

schachmatISC活跃维护

在终端里用 ASCII 字符画查看天气预报,支持多日预报和多种数据源,适合喜欢命令行工作流的开发者。

weather app for the terminal

2.4发布于 2026-04-11 22:32 UTC8,565star507fork同步于 2026-11-10 11:31 UTC

怎么上手

由 README 提炼,执行前请确认
go install github.com/schachmat/wego@latest
硬件要求按 README 说明

README 未说明硬件要求,只需可运行 Go 1.20 的环境和支持 256 色的 UTF-8 终端,另需含所需字符的等宽字体

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

终端里的天气预报客户端,支持多数据源和多显示风格,一条命令看未来七天天气

在终端里用 ASCII 字符画查看天气预报,支持多日预报和多种数据源,适合喜欢命令行工作流的开发者。

核心能力

  • 支持 1 到 7 天预报,可指定城市和天数
  • 可切换 openweathermap、open-meteo、smhi 等 8 种后端
  • 提供 ascii-art-table、emoji、markdown、json 四种前端
  • 显示体感与实测温度、风速风向、能见度、降水概率和湿度
  • 天气数据可缓存到磁盘,缓存有效期可配置

容易踩的坑

首次运行会报错,需先在配置目录生成 wegorc 并填好 backend 和 location;多数后端要自备 API key,只有 open-meteo 和 smhi 免费免 key;worldweatheronline 已不再提供免费 key,pirateweather 需用经纬度定位

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本2.4
  1. 2.4最新正式版2026-04-11 · 2026-04-11 22:32 UTC

    What's Changed

    ✨ New Features

    • New Backends: Added support for Open-Meteo and WeatherAPI.com.
    • Disk Caching: Implemented JSON caching in /tmp to reduce redundant API calls.
    • Compact Mode: Introduced AAT Compact Mode for a denser display.
    • Documentation: Generate manual pages directly via wego --man.

    🛠 Improvements & Fixes

    • API Enhancements: Switched OpenWeatherMap to HTTPS and fixed WorldWeatherOnline endpoints.
    • UI Tweaks: Improved low-temperature visibility on dark backgrounds and corrected Kelvin notation.
    • Data Accuracy: Refined Open-Meteo astronomy calculations and OpenWeatherMap error handling.

    🏗 Maintenance

    • Tooling: Integrated golangci-lint, Renovate, and standardized PR templates.
    • Dependencies: Updated core packages including go-runewidth, go-colorable, and various GitHub Actions.
  2. 2.32024-08-25 · 2024-08-25 17:13 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/schachmat/wego/compare/2.2...2.3

  3. 2.22023-06-04 · 2023-06-04 16:39 UTC
    查看更新说明
    • Removed obsolete forecast.io backend
    • New backend Caiyunapp and smhi.se
    • Added a markdown formatter
    • Updated to Go 1.20
  4. 2.12022-02-17 · 2022-02-17 23:36 UTC
    查看更新说明

    Release rollup, to just get everything tagged what as happened in the last years already. Most noticeably:

    • openweathermap support
    • emoji frontend
    • lots of bugfixes

    Here is to getting this project moving a bit again in the coming months.

  5. 2.0release v2.02016-03-09 · 2016-03-09 12:13 UTC
    查看更新说明

    Changelog since v1.0:

    • wego now depends on ingo, therefore requiring Go >=1.5
    • backends and frontends are split of to a plugin style architecture
    • new emoji frontend added

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    wego is a weather client for the terminal.

    Screenshots

    Features

    • show forecast for 1 to 7 days
    • multiple backends: openweathermap, weatherapi, open-meteo, smhi, caiyun, worldweatheronline, pirateweather, and json
    • multiple frontends: ascii-art-table (default), emoji, markdown, and json
    • displayed info:
      • temperature range (felt and measured)
      • windspeed and direction
      • viewing distance
      • precipitation amount and probability
      • humidity
    • unit systems: metric, imperial, si, metric-ms
    • disk caching of weather data with configurable TTL (--cache-ttl)
    • multi language support
    • config file for default location which can be overridden by commandline
    • automatic config management with ingo
    • built-in man page (wego --man)
    • composable via JSON: pipe data between the json backend and json frontend

    Dependencies

    • A working Go 1.20 environment
    • utf-8 terminal with 256 colors (for ascii-art-table and emoji frontends)
    • A monospaced font containing all the required runes (e.g. dejavu sans mono)
    • An API key for most backends (see Setup below; open-meteo and smhi are free and keyless)

    Installation

    Check your distribution for packaging:

    Packaging status

    To directly install or update the wego binary from Github into your $GOPATH as usual, run:

    go install github.com/schachmat/wego@latest
    

    Setup

    1. Run wego once. You will get an error message, but the wegorc config file will be generated in your $XDG_CONFIG_HOME/wego/ directory (or the OS-equivalent location returned by os.UserConfigDir(), e.g. ~/.config/wego/wegorc on Linux).
    2. Choose a backend and configure it (see below). Then run wego again.
    3. You may want to adjust other preferences like days, units and …-lang as well. Save the file.
    4. Run wego once again and you should get the weather forecast for the current and next few days for your chosen location.
    5. If you're visiting someone in e.g. London over the weekend, just run wego 4 London or wego London 4 (the ordering of arguments makes no difference) to get the forecast for the current and the next 3 days.

    The config file is resolved in the following order:

    1. $WEGORC environment variable (highest precedence).
    2. $XDG_CONFIG_HOME/wego/wegorc (or OS equivalent via os.UserConfigDir()), if it exists.
    3. $HOME/.wegorc (legacy location, for backward compatibility), if it exists.
    4. If none of the above exist, a new config file is created at $XDG_CONFIG_HOME/wego/wegorc.

    Backends

    Open-Meteo — free, no API key required:

    backend=openmeteo
    location=New York
    

    SMHI — free, no API key required (Sweden and surrounding areas):

    backend=smhi
    location=59.33,18.07
    

    Openweathermap — free API key available:

    backend=openweathermap
    location=New York
    owm-api-key=YOUR_OPENWEATHERMAP_API_KEY_HERE
    

    WeatherAPI — free API key available:

    backend=weatherapi
    location=New York
    weather-api-key=YOUR_WEATHERAPI_API_KEY_HERE
    

    Caiyun — API key required (China-focused, supports Chinese):

    backend=caiyun
    location=121.47,31.23
    caiyun-api-key=YOUR_CAIYUN_API_KEY_HERE
    

    Worldweatheronline — no longer offers free API keys (#83):

    backend=worldweatheronline
    location=New York
    wwo-api-key=YOUR_WORLDWEATHERONLINE_API_KEY_HERE
    

    Pirateweather — free API key available (requires lat,lon location):

    backend=pirateweather.net
    location=40.71,-74.01
    pirateweather-api-key=YOUR_PIRATEWEATHER_API_KEY_HERE
    

    JSON file — read weather data from a local JSON file (useful for testing or offline use):

    backend=json
    location=/path/to/weather.json
    

    Frontends

    Select a frontend with the --frontend flag or by setting frontend=… in .wegorc.

    FrontendDescription
    ascii-art-tableDefault. Classic colored ASCII art table.
    emojiCompact emoji-based display.
    markdownMarkdown table output.
    jsonJSON output, suitable for piping to other tools.

    Example: wego --frontend emoji London

    Color Configuration

    Both ascii-art-table and emoji frontends display temperatures and wind speeds in color by default. To disable colors:

    • Pass --monochrome as a flag, or add it to .wegorc to make it permanent:
      monochrome=true
      
    • Set the NO_COLOR environment variable (see no-color.org) to disable colors without changing the config:
      NO_COLOR=1 wego