tuiweather 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -16
- package/dist/index.js +8010 -1941
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -5,25 +5,30 @@ Keyboard-driven terminal weather app: Dark Sky-style rain nowcasting, hourly and
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Rain nowcast** — minute-level "umbrella in N min" warnings derived from 15-minute precipitation buckets
|
|
8
|
-
- **Hourly + daily forecast** — sparkline temperature strip, condition
|
|
8
|
+
- **Hourly + daily forecast** — sparkline temperature strip, emoji condition icons, precipitation probabilities, and (md+ widths) a UV/humidity/visibility summary row
|
|
9
9
|
- **Location search** — type `/`, search the Open-Meteo geocoder, enter to add; locations persist to config
|
|
10
10
|
- **Guided first run** — choose units and find a location without editing a config file
|
|
11
11
|
- **Units** — metric/imperial toggle persisted across runs
|
|
12
|
-
- **Themes** — day
|
|
12
|
+
- **Themes** — day/night accent palettes follow the forecast location's sunrise/sunset; text ink adapts to your terminal's background
|
|
13
|
+
- **Air quality** — US AQI with category label in the details grid, from the Open-Meteo Air Quality API
|
|
13
14
|
- **Responsive layout** — four breakpoint tiers down to 32 columns; clamps gracefully below that
|
|
14
15
|
- **One-line mode** — a single status line for tmux bars and prompts
|
|
15
16
|
|
|
16
17
|
## Install
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
Install globally with npm:
|
|
19
20
|
|
|
20
21
|
```sh
|
|
21
|
-
|
|
22
|
+
npm install --global tuiweather
|
|
22
23
|
```
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
or with Bun:
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
```sh
|
|
28
|
+
bun install --global tuiweather
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Standalone binaries for macOS and Linux are attached to each [GitHub release](https://github.com/brndnsh-labs/tuiweather/releases).
|
|
27
32
|
|
|
28
33
|
### macOS Gatekeeper
|
|
29
34
|
|
|
@@ -47,14 +52,20 @@ Use `tuiweather --help` for command-line options and `tuiweather --version` to p
|
|
|
47
52
|
| --- | --- |
|
|
48
53
|
| `r` | Refresh current location (bypasses cache) |
|
|
49
54
|
| `[` / `]` | Previous / next location |
|
|
55
|
+
| `1`–`9` | Jump to location N by sidebar order (1-based; no-op out of range) |
|
|
50
56
|
| `u` | Toggle metric / imperial units |
|
|
51
57
|
| `/` | Search locations |
|
|
52
|
-
| `d` | Delete active location |
|
|
58
|
+
| `d` | Delete active location (press twice to confirm) |
|
|
59
|
+
| `j` / `k` | Move sidebar focus down/up (lg tier only, wraps) |
|
|
60
|
+
| `enter` | Activate focused location (lg tier) |
|
|
61
|
+
| `s` | Set focused (or active when no focus) as default location |
|
|
62
|
+
| `J` / `K` | Move focused location down/up in sidebar order (lg tier) |
|
|
63
|
+
| `↑` / `↓` | Scroll the main panel when content overflows |
|
|
53
64
|
| `?` | Toggle help overlay |
|
|
54
|
-
| `esc` |
|
|
65
|
+
| `esc` | Clear sidebar focus if set; otherwise close help overlay or quit |
|
|
55
66
|
| `q` | Quit |
|
|
56
67
|
|
|
57
|
-
While the search overlay is open it owns the keyboard: type to search, up/down to move the cursor, enter to add the highlighted result, esc to cancel.
|
|
68
|
+
While the search overlay is open it owns the keyboard: type to search, up/down to move the cursor, enter to add the highlighted result, esc to cancel. Number, focus, and reorder keys are ignored while the search input is focused (same as `d`/`r`).
|
|
58
69
|
|
|
59
70
|
### One-line mode
|
|
60
71
|
|
|
@@ -89,15 +100,31 @@ tuiweather --one-line --lat 45.52 --lon -122.67 --json | jq .temperatureC
|
|
|
89
100
|
JSON values are always metric regardless of your configured units; the embedded `line` field
|
|
90
101
|
matches the plain one-line output, which follows configured units.
|
|
91
102
|
|
|
103
|
+
### Watch mode
|
|
104
|
+
|
|
105
|
+
`tuiweather watch` polls the nowcast on an interval and rings the terminal bell (`\a`) when rain
|
|
106
|
+
starts — leave it running in a pane and get pinged before you need the umbrella:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
tuiweather watch # poll every refresh_minutes
|
|
110
|
+
tuiweather watch --interval 5 # poll every 5 minutes (1–120)
|
|
111
|
+
tuiweather watch --location seattle
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Each poll prints the one-line status (prefixed with the location label). The bell rings only on a
|
|
115
|
+
dry → wet transition, not on every poll. Rain already in progress when the watch starts does not
|
|
116
|
+
bell. Desktop notifications are a planned follow-up.
|
|
117
|
+
|
|
92
118
|
## Configuration
|
|
93
119
|
|
|
94
|
-
Config lives at `~/.config/tuiweather/config.toml` (respects `XDG_CONFIG_HOME`). Every field is optional unless marked required; unknown
|
|
120
|
+
Config lives at `~/.config/tuiweather/config.toml` (respects `XDG_CONFIG_HOME`). Every field is optional unless marked required; unknown fields are ignored.
|
|
95
121
|
|
|
96
122
|
```toml
|
|
97
|
-
schema_version =
|
|
123
|
+
schema_version = 3
|
|
98
124
|
time_format = "auto"
|
|
99
125
|
refresh_minutes = 10
|
|
100
126
|
theme = "auto"
|
|
127
|
+
provider = "openmeteo"
|
|
101
128
|
daily_days = 7
|
|
102
129
|
hourly_hours = 24
|
|
103
130
|
default_location = "portland"
|
|
@@ -123,17 +150,18 @@ longitude = -122.6765
|
|
|
123
150
|
|
|
124
151
|
| Field | Type | Default | Constraints |
|
|
125
152
|
| --- | --- | --- | --- |
|
|
126
|
-
| `schema_version` | integer | `
|
|
153
|
+
| `schema_version` | integer | `3` | Required; currently always `3`. Version 1 and 2 files are migrated in place on load |
|
|
127
154
|
| `time_format` | `12h` / `24h` / `auto` | `"auto"` | `auto` picks 12h when temperature units are imperial, else 24h |
|
|
128
155
|
| `refresh_minutes` | integer | `10` | Minimum `1` |
|
|
129
|
-
| `theme` | `day` / `night` / `auto` | `"auto"` | `auto` follows
|
|
156
|
+
| `theme` | `day` / `night` / `auto` | `"auto"` | Accent palette; `auto` follows the location's sunrise/sunset. Text ink always adapts to your terminal's background |
|
|
157
|
+
| `provider` | `openmeteo` / `nws` | `"openmeteo"` | Weather data source; NWS air quality is not provided |
|
|
130
158
|
| `daily_days` | integer | `7` | `1`–`16` forecast days |
|
|
131
159
|
| `hourly_hours` | integer | `24` | `12`–`48` forecast hours |
|
|
132
160
|
| `default_location` | string | none | Must match a `[[locations]]` slug |
|
|
133
161
|
| `units.temp` | `metric` / `imperial` | legacy `units` | Display unit for temperatures |
|
|
134
162
|
| `units.wind` | `metric` / `imperial` | legacy `units` | Display unit for wind speed and visibility |
|
|
135
163
|
| `units.precip` | `metric` / `imperial` | legacy `units` | Display unit for precipitation amounts |
|
|
136
|
-
| `units.pressure` | `metric` / `imperial` | legacy `units` |
|
|
164
|
+
| `units.pressure` | `metric` / `imperial` | legacy `units` | Display unit for pressure; `metric` → hPa (rounded), `imperial` → inHg to 2 decimals; defaults via legacy `units` |
|
|
137
165
|
| `panels.nowcast` | boolean | `true` | Show/hide the nowcast banner |
|
|
138
166
|
| `panels.details` | boolean | `true` | Show/hide the details grid |
|
|
139
167
|
| `panels.hourly` | boolean | `true` | Show/hide the hourly strip |
|
|
@@ -150,11 +178,11 @@ Each `[[locations]]` entry:
|
|
|
150
178
|
| `latitude` | number | Required; `-90`–`90` |
|
|
151
179
|
| `longitude` | number | Required; `-180`–`180` |
|
|
152
180
|
|
|
153
|
-
Locations added through the search overlay are appended here automatically. Writes are atomic (temp file plus rename).
|
|
181
|
+
Locations added through the search overlay are appended here automatically. Press `s` (focused or active) to set `default_location` and `J`/`K` (lg tier, focused) to reorder `[[locations]]`. Writes are atomic (temp file plus rename).
|
|
154
182
|
|
|
155
183
|
## Data attribution
|
|
156
184
|
|
|
157
|
-
Weather data by [Open-Meteo](https://open-meteo.com), licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Open-Meteo's free tier is offered for non-commercial use; see [open-meteo.com/terms](https://open-meteo.com/terms) before relying on it commercially.
|
|
185
|
+
Weather data by [Open-Meteo](https://open-meteo.com), licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Open-Meteo's free tier is offered for non-commercial use; see [open-meteo.com/terms](https://open-meteo.com/terms) before relying on it commercially. When `provider = "nws"` is configured, forecast data comes from the National Weather Service ([api.weather.gov](https://api.weather.gov)).
|
|
158
186
|
|
|
159
187
|
## Development
|
|
160
188
|
|