otenki-cli
v0.3.1
Published
view weather for any place on earth from the terminal
Maintainers
Readme
otenki
A terminal weather CLI. Give it a place name — a Japanese prefecture, a city, or anything else on earth — and it resolves the coordinates and prints the forecast.
$ otenki today 函館
函館市 北海道
☀️ 快晴 13.8℃ 体感 12.1℃
風 9.1 km/h · 湿度 72% · 降水 0.0 mm · 2026-10-04 22:45
$ otenki weekly 横浜
横浜市 神奈川県 — 7日間予報
日付 天気 最低 最高 降水 確率 風速
──────────────────────────────────────────────────────────────────────
10-07 (水) ☁️ 曇り 17.9℃ 23.5℃ 0.0 mm 69% 13.6 km/h
10-08 (木) 🌤️ 晴れ 16.1℃ 23.1℃ 0.0 mm 0% 9.6 km/hInstall
Bun is required. The bin is a single file bundled by tsdown, and its
shebang asks for bun on PATH.
bunx otenki-cli today 函館or install it:
npm install -g otenki-cli # needs bun on PATHIf you have Nix, the flake is the better route and needs no Bun:
nix run . -- today 函館
nix profile install .Commands
| Command | Description |
| --------------------- | ---------------------------------------------------- |
| today | current conditions |
| tomorrow | tomorrow's forecast |
| weekly | 7 day forecast |
| fortnight | 14 day forecast (two weeks) |
| 3h 6h 12h 24h | hourly forecast over the next 24 hours, at that step |
| locate | resolve a place name to latitude and longitude |
| cache | manage the place name cache |
Every weather command accepts a location as a place name or a coordinate pair,
and each of them — locate included — takes --json for scripting (cache
is the one exception). Output is coloured on a TTY and respects NO_COLOR.
Every command also credits its data sources on stderr
(Get Locate: https://www.geonames.org/ and
Get Weather: https://open-meteo.com/), so piped stdout stays clean.
Defaults live in $XDG_CONFIG_HOME/otenki/config.json (falling back to
~/.config/otenki/config.json): a default location, the command a bare
otenki runs, colour, units (°F / mph / in) and the forecast length for
weekly and fortnight. Command-line arguments beat the config, and
--no-config skips the file:
{ "location": "函館", "command": "today" }Built on the free, key-less Open-Meteo APIs, with place names from GeoNames.
Documentation: https://nazozokc.github.io/otenki/ Source: https://github.com/nazozokc/otenki
Licence
MIT
