Skip to content

Commit 299b09a

Browse files
committed
Release 0.2.2
1 parent bc10f19 commit 299b09a

111 files changed

Lines changed: 7704 additions & 488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
timeout-minutes: 25
2323
strategy:
24+
fail-fast: false
2425
matrix:
2526
os: [ubuntu-latest, macos-latest, windows-latest]
2627
node-version: [22.x, 24.x]
@@ -38,7 +39,7 @@ jobs:
3839
run: npm ci
3940

4041
- name: Audit required runtime dependencies
41-
run: npm audit --omit=dev --omit=optional --audit-level=high
42+
run: npm run audit:runtime
4243

4344
- name: Typecheck
4445
run: npm run check
@@ -72,6 +73,7 @@ jobs:
7273
if: github.event_name != 'pull_request'
7374
timeout-minutes: 15
7475
strategy:
76+
fail-fast: false
7577
matrix:
7678
node-version: [22.x, 24.x]
7779
steps:
@@ -98,6 +100,7 @@ jobs:
98100
runs-on: ubuntu-latest
99101
timeout-minutes: 20
100102
strategy:
103+
fail-fast: false
101104
matrix:
102105
node-version: [22.x, 24.x]
103106
steps:
@@ -117,7 +120,7 @@ jobs:
117120

118121
- name: Audit production dependencies
119122
working-directory: apps/docs
120-
run: npm audit --omit=dev --audit-level=high
123+
run: node ../../scripts/audit-ci.mjs --omit=dev --audit-level=high
121124

122125
- name: Typecheck
123126
working-directory: apps/docs

CHANGELOG.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,91 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.2.2] - 2026-09-04
11+
12+
### Added
13+
14+
- Added one-time and IANA-timezone recurring radio alarms under Overview, with a
15+
full-screen TUI editor, station picker, next-run preview, enable/disable,
16+
delete confirmation, test tune, repair, and active ringing controls.
17+
- Added native background registration through macOS launchd, Windows Task
18+
Scheduler, and systemd user timers on Linux, plus `radiocli alarm` commands
19+
for scripting, inspection, health checks, synchronization, and playback
20+
control.
21+
- Added optional per-alarm wake requests where the OS supports them and a
22+
separate cross-platform Alarm Guard that prevents idle sleep until the next
23+
occurrence.
24+
- Added automatic ringing-control launch in the terminal captured when an alarm
25+
is synchronized, with reuse of an already-running RadioCLI TUI.
26+
- Added a navigable **Verify alarm setup** rehearsal that exercises a disposable
27+
native job, the saved terminal, authenticated controls, sleep protection,
28+
system volume, and a three-second configured-station sample before cleanup.
29+
- Added `radiocli setup`, an interactive installer that detects supported
30+
package managers, previews required playback tools, supports dry runs, guides
31+
installation, and verifies the resulting local playback configuration.
32+
- Added an adaptive Explore experience with a responsive Cosmo world map,
33+
height-aware station lists in micro terminals, pointer-accurate map
34+
selection, and safe scrolling marquees for long station details.
35+
- Added richer `radiocli doctor` playback diagnostics, including the resolved
36+
mpv path, discovery source, launchability, version output, and actionable
37+
launch errors. Windows discovery now covers package-manager shims, common
38+
application directories, and registered mpv installations.
39+
40+
### Changed
41+
42+
- Full library backup and restore now carries alarm definitions and latest run outcomes;
43+
native jobs, Alarm Guard state, runtime health, and local control credentials
44+
remain specific to each machine and are rebuilt by alarm synchronization.
45+
- macOS terminal Automation permission is requested during alarm setup, and a
46+
TUI opened by a ringing alarm now protects the active native job from startup,
47+
repair, edit, and delete reconciliation until playback ends.
48+
- Snooze now closes the completed ringing session, returns to Alarms, and shows
49+
the next ring time. Alarm playback temporarily unmutes and raises a low local
50+
system output to the configured alarm level on macOS, Windows, and supported
51+
Linux audio stacks, restoring the previous state afterward.
52+
- Alarm list and editor presentation is more concise: historical dismissal text,
53+
duplicated controls, and long scheduler caveats were removed; specific field
54+
guidance is now inline and Save is presented as a display-color action.
55+
- Alarm ringing controls now use Enter to transfer the station into normal
56+
interactive playback and Space to stop and snooze for ten minutes. The alarm
57+
UI and documentation identify scheduling as experimental beta functionality,
58+
explain when the terminal may close, and recommend a secondary device for
59+
critical wake-ups.
60+
- Playback-backend guidance now directs users to `radiocli setup` when local
61+
tools are missing, with updated CLI help, setup documentation, and status
62+
messages covering the guided workflow.
63+
- Receiver animation updates are isolated from the rest of the application,
64+
respect reduced-motion preferences, and use cached visualizer geometry and
65+
compact color runs to reduce rendering work without changing visual output.
66+
- Radio Browser requests now use atlas-aware timeouts and retain clearer
67+
provider failure details when station directories are slow or unavailable.
68+
69+
### Fixed
70+
71+
- Alarm lists now scroll long text only on the focused interactive row, keep
72+
selection and enabled-state markers fixed, and avoid repeating station and
73+
next-run details. Compact and micro layouts use shorter next-wake, scheduler,
74+
and beta-safety messages instead of clipping desktop-length copy.
75+
- Footer shortcut legends now balance actions across every available row,
76+
reserve an additional row in compact terminals when space permits, and show
77+
concise key-only hints in micro layouts instead of ending in truncated text.
78+
The version and update indicator remains independently anchored at bottom right.
79+
- Rapid keyboard and mouse-wheel navigation now commits the selected row
80+
immediately, cancels pending automatic station skips, and preserves alarm
81+
editor scrolling; search input keeps ownership of typed alarm-shortcut
82+
characters.
83+
- Player shutdown now coalesces concurrent stop requests, while delayed
84+
automatic skipping can be canceled during retuning to avoid duplicate
85+
process termination and unintended station changes.
86+
- Explore maps, station lists, and screen rendering now remain aligned and
87+
navigable across compact and true-micro terminal sizes, with improved map
88+
centering, cursor mapping, and visible provider errors.
89+
90+
### Security
91+
92+
- Active alarm controls and Alarm Guard ownership checks use authenticated
93+
loopback-only endpoints with machine-local private token files.
94+
1095
## [0.2.1] - 2026-08-22
1196

1297
### Added
@@ -265,6 +350,7 @@ Initial public release.
265350
[0.1.9]: https://github.com/Ciphore/RadioCLI/releases/tag/v0.1.9
266351
[0.2.0]: https://github.com/Ciphore/RadioCLI/releases/tag/v0.2.0
267352
[0.2.1]: https://github.com/Ciphore/RadioCLI/releases/tag/v0.2.1
353+
[0.2.2]: https://github.com/Ciphore/RadioCLI/releases/tag/v0.2.2
268354
[0.1.4]: https://github.com/Ciphore/RadioCLI/releases/tag/v0.1.4
269355
[0.1.3]: https://github.com/Ciphore/RadioCLI/releases/tag/v0.1.3
270356
[0.1.2]: https://github.com/Ciphore/RadioCLI/releases/tag/v0.1.2

README.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ Built with [Ink](https://github.com/vadimdemedes/ink),
1818
- Discover stations through Explore, Search, Countries, or approximate-location Nearby.
1919
- Listen with a receiver-style Now Playing screen, live metadata, sleep timer, diagnostics, and selectable visualizers.
2020
- Keep favorites, recents, imports, track history, and listening stats on your machine.
21+
- Create one-time or recurring radio alarms from the TUI, with native background
22+
scheduling, station fallback, missed-run grace, snooze, and optional Alarm Guard.
2123
- Move through the exact station list you tuned from with previous and next controls.
2224
- Use `mpv` for complete playback control, with `ffplay` and VLC as limited fallbacks.
23-
- Resize freely: full, compact, and micro layouts preserve navigation and essential controls.
25+
- Resize freely: full, compact, and micro layouts preserve navigation and essential controls; Explore retains its interactive world map at every usable size.
2426

2527
## Quick start
2628

@@ -35,13 +37,14 @@ macOS, Linux, or Windows with npm:
3537

3638
```bash
3739
npm install -g @ciphore/radiocli
38-
radiocli doctor
40+
radiocli setup
3941
radiocli
4042
```
4143

4244
RadioCLI requires Node.js 22 or newer. The Homebrew formula installs `mpv` and
43-
FFmpeg; npm installs JavaScript dependencies only, so install `mpv` with your
44-
system package manager for pause, volume, mute, media keys, and metadata.
45+
FFmpeg. After an npm install, `radiocli setup` detects the operating system and
46+
package manager, lets you choose `mpv`, FFmpeg, and VLC, installs the selected
47+
native tools with branded progress feedback, and verifies playback readiness.
4548

4649
See the [installation guide](apps/docs/content/docs/getting-started/install.mdx)
4750
for Windows, Linux distributions, AirPlay prerequisites, and fallback players.
@@ -100,11 +103,34 @@ radiocli countries
100103
radiocli import stations.m3u
101104
radiocli export favorites.m3u
102105
radiocli add-url <stream-url> [station name]
106+
radiocli alarm list
107+
radiocli alarm doctor
103108
```
104109

105110
RadioCLI imports `.m3u`, `.pls`, and `.xspf` playlists. It exports favorites
106111
and imported streams as `.m3u`.
107112

113+
Alarms are experimental beta functionality and live under **Overview**,
114+
immediately before Settings. Saving an enabled
115+
alarm registers it with launchd on macOS, a systemd user timer on Linux, or Task
116+
Scheduler on Windows, so the terminal does not need to remain open. When it
117+
fires, RadioCLI reopens the saved supported terminal and shows the ringing
118+
screen. Enter transfers the station into normal interactive playback; Space
119+
stops it and snoozes for 10 minutes. If a
120+
RadioCLI TUI is already open, that instance shows the controls instead. The
121+
computer must still be powered on with a logged-in interactive audio session; wake timing
122+
depends on hardware and OS power policy. See the [CLI guide](apps/docs/content/docs/getting-started/cli.mdx)
123+
and [reliability notes](apps/docs/content/docs/reliability.mdx) before relying on
124+
an alarm for something critical. Use a secondary device as the primary alarm
125+
for safety-critical, medical, travel, or emergency timing. See the dedicated
126+
[Alarms guide](apps/docs/content/docs/alarms.mdx) for the full workflow.
127+
128+
The **Verify alarm setup** row performs a disposable native-scheduler
129+
registration, an authenticated terminal/control handshake, sleep-inhibitor and
130+
system-volume checks, and a short sample from the next configured alarm. It
131+
cleans up the temporary job and reports hard blockers separately from hardware-
132+
or policy-dependent wake limitations.
133+
108134
See the [CLI guide](apps/docs/content/docs/getting-started/cli.mdx) for all
109135
arguments and examples.
110136

@@ -120,14 +146,27 @@ Playback waits for backend readiness, applies tune timeouts, and can skip broken
120146
streams. Corrupt library and cache files are backed up instead of silently
121147
overwritten.
122148

149+
Scheduled playback retries the primary station once, then tries an optional
150+
fallback. A missed-run grace window controls catch-up after sleep or logout.
151+
True fade-in requires `mpv`; `ffplay` and VLC start audibly at the configured
152+
target volume. Scheduled alarms always use local speakers, never unattended
153+
AirPlay.
154+
155+
On macOS, an npm or source installation is executed by Node, so System Settings
156+
may identify its background item as `node`. Showing RadioCLI as the providing
157+
application requires a future signed macOS app bundle with a bundled helper;
158+
changing a launchd label cannot safely relabel the executable.
159+
123160
Read the [reliability notes](apps/docs/content/docs/reliability.mdx) for failure
124161
handling and troubleshooting.
125162

126163
## Privacy
127164

128165
RadioCLI does not require an account, proxy audio, or upload your listening
129-
history. Favorites, recents, imports, settings, track history, and activity stay
130-
in a local JSON library.
166+
history. Favorites, recents, imports, settings, alarms, track history, and
167+
activity stay in a local JSON library. Full JSON library backups include alarm
168+
definitions, while native scheduler registrations, runtime health, Alarm Guard
169+
state, and authenticated loopback-control tokens remain machine-local.
131170

132171
Nearby contacts `ipapi.co` only when you open that screen, then uses an
133172
approximate location to sort the local station atlas. Disable the lookup with
@@ -145,6 +184,7 @@ complete data-flow description.
145184
- `src/ui` — screens, input, layout, and terminal rendering
146185
- `src/providers` — station directories, resolution, and caches
147186
- `src/player` — playback backends, metadata, and AirPlay
187+
- `src/alarms` — schedules, native registration, Alarm Guard, and active controls
148188
- `src/storage` — local library persistence and migration
149189
- `apps/docs` — documentation website and manual
150190

apps/docs/app/(home)/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ export default function HomePage() {
111111
<span className="rc-install-label">Universal · npm</span>
112112
<p className="rc-install">
113113
<span className="rc-prompt">$</span>
114-
<code>npm install -g @ciphore/radiocli</code>
114+
<code>
115+
npm install -g @ciphore/radiocli
116+
<br />
117+
radiocli setup
118+
</code>
115119
</p>
116120
</div>
117121
<div className="rc-install-option">

apps/docs/app/llms.mdx/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ With npm:
1515
1616
\`\`\`bash
1717
npm install -g @ciphore/radiocli
18+
radiocli setup
1819
\`\`\`
1920
2021
On macOS with Homebrew:

apps/docs/content/docs/alarms.mdx

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: Alarms (Beta)
3+
description: Create, verify, and troubleshoot scheduled radio alarms across macOS, Windows, and Linux.
4+
---
5+
6+
# Alarms (Beta)
7+
8+
RadioCLI alarms are experimental. They are designed for wake-to-radio and
9+
scheduled listening, but hardware, operating-system power policy, login state,
10+
audio devices, and live-stream availability can still prevent sound. Use a
11+
secondary device as the primary alarm for critical, medical, travel, or
12+
emergency timing.
13+
14+
## Create An Alarm
15+
16+
Open **Overview → Alarms (beta)** and choose **Create alarm**, or press `n`.
17+
Pressing `a` on a selected or playing station opens the same editor with that
18+
station filled in.
19+
20+
The editor includes:
21+
22+
- a one-time date or recurring weekday schedule with an explicit IANA timezone
23+
- segmented hour/minute controls and a Monday-through-Sunday checklist
24+
- primary and fallback stations from current playback, favorites, imports,
25+
recents, and existing alarms
26+
- alarm volume, mpv fade-in, automatic stop time, and local-speaker output
27+
- missed-run grace, a best-effort OS wake request, and optional Alarm Guard
28+
- a station test tune, next-occurrence preview, Save, and Cancel
29+
30+
Saving is local-first. An enabled alarm also registers its next occurrence with
31+
launchd on macOS, Task Scheduler on Windows, or a systemd user timer on Linux.
32+
After successful registration, the terminal does not need to remain open.
33+
34+
## Verify The Complete Setup
35+
36+
Choose **Verify alarm setup** at the bottom of the alarm list. Verification
37+
rehearses a disposable native job, terminal launch and authenticated controls,
38+
sleep protection, system-volume handling, and a short sample from the next
39+
configured alarm. It removes temporary artifacts before reporting success.
40+
41+
Run Verify after creating the first alarm and whenever the terminal app,
42+
playback backend, audio device, installation path, OS permissions, timezone, or
43+
power settings change. A successful rehearsal proves that the tested path works
44+
now; it cannot guarantee future hardware wake, network access, or stream health.
45+
46+
## When The Alarm Rings
47+
48+
RadioCLI starts the configured station through a detached runner. If necessary,
49+
it opens the terminal captured during setup and shows the ringing screen.
50+
51+
- `Enter` transfers the station into the interactive RadioCLI player and opens
52+
the normal Playing screen. The visualizer and ordinary playback controls then
53+
own the stream, and the alarm session ends.
54+
- `Space` stops the station and snoozes the alarm for 10 minutes.
55+
- `Up` and `Down` choose an exact occurrence when multiple alarms overlap.
56+
- `b` returns to the app while the detached alarm continues playing. Press `!`
57+
from any screen to reopen its controls.
58+
59+
The runner raises and unmutes supported local system output when it is below the
60+
configured alarm volume. During an interactive handoff, that audible level is
61+
preserved for regular playback. Scheduled alarms use local speakers; unattended
62+
AirPlay is not supported.
63+
64+
## Background Delivery And Power
65+
66+
All platforms require a powered-on machine, a logged-in interactive audio
67+
session, usable local speakers, and a reachable station. Windows can request
68+
`WakeToRun`; launchd and systemd user scheduling can catch up after wake or
69+
session resume. Exact wake still depends on hardware, firmware, lid, battery,
70+
hibernate, and administrator policy.
71+
72+
Alarm Guard is separate from the scheduler wake request. It prevents ordinary
73+
idle sleep until the next occurrence using `caffeinate`, `systemd-inhibit`, or
74+
Windows execution-state APIs. It consumes power and cannot override shutdown,
75+
hibernate, explicit sleep, a closed lid, logout, or enforced OS policy.
76+
77+
See [Reliability](./reliability.mdx) for the platform matrix, permission flow,
78+
timezone and DST semantics, fallback behavior, volume integration, and known
79+
limitations.
80+
81+
## Diagnose And Repair
82+
83+
From the alarm list, press `r` to repair native registrations or select
84+
**Verify alarm setup** for a full rehearsal. The CLI provides deeper status:
85+
86+
```bash
87+
radiocli alarm doctor
88+
radiocli alarm status
89+
radiocli alarm sync
90+
radiocli alarm test ALARM_ID
91+
```
92+
93+
Run `sync` after moving the RadioCLI installation, restoring a backup, changing
94+
the host timezone, or repairing scheduler files. See [CLI usage](./getting-started/cli.mdx)
95+
for alarm creation, editing, selectors, and JSON status output.
96+
97+
Alarm definitions are included in full local-library backups. Native scheduler
98+
jobs, active control tokens, Guard processes, and machine health are deliberately
99+
not portable and must be recreated with `radiocli alarm sync` on the destination.

0 commit comments

Comments
 (0)