@hmgle/radio-cli 0.0.0-stage → 0.8.1

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.
Files changed (3) hide show
  1. package/README.md +36 -2
  2. package/bin/radio.js +44 -0
  3. package/package.json +38 -4
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # @hmgle/radio-cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Terminal radio for Linux and macOS: browse the Radio Browser catalog, search and
4
+ filter locally, play any HTTP(S) stream, keep favorites and history, and record
5
+ streams as stream copies.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install -g @hmgle/radio-cli
11
+ ```
12
+
13
+ This installs the prebuilt `radio` binary for your platform. Playback and
14
+ recording still need `mpv`, `ffmpeg`, and `ffprobe` installed separately:
15
+
16
+ ```sh
17
+ # Debian / Ubuntu
18
+ sudo apt install mpv ffmpeg
19
+
20
+ # macOS
21
+ brew install mpv ffmpeg
22
+ ```
23
+
24
+ Then run `radio`:
25
+
26
+ ```sh
27
+ radio --version
28
+ radio sync
29
+ radio tui
30
+ ```
31
+
32
+ Windows is not supported.
33
+
34
+ ## Documentation
35
+
36
+ See the [radio-cli repository](https://github.com/hmgle/radio-cli) for the full
37
+ README, the configuration reference, and the troubleshooting guide.
package/bin/radio.js ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ // Launcher for @hmgle/radio-cli. The prebuilt binary ships in a platform
5
+ // package that is installed as an optional dependency, so resolve that package
6
+ // here and hand the command line over to the binary.
7
+ const { spawnSync } = require('node:child_process');
8
+ const { createRequire } = require('node:module');
9
+
10
+ const PLATFORM_PACKAGES = {
11
+ 'darwin-arm64': '@hmgle/radio-cli-darwin-arm64',
12
+ 'darwin-x64': '@hmgle/radio-cli-darwin-x64',
13
+ 'linux-x64': '@hmgle/radio-cli-linux-x64',
14
+ };
15
+
16
+ const platform = `${process.platform}-${process.arch}`;
17
+ const pkg = PLATFORM_PACKAGES[platform];
18
+ if (!pkg) {
19
+ process.stderr.write(
20
+ `radio: no prebuilt package for ${platform}; supported platforms are ` +
21
+ `${Object.keys(PLATFORM_PACKAGES).join(', ')}\n`,
22
+ );
23
+ process.exit(1);
24
+ }
25
+
26
+ let binary;
27
+ try {
28
+ binary = createRequire(__filename).resolve(`${pkg}/bin/radio`);
29
+ } catch {
30
+ process.stderr.write(
31
+ `radio: ${pkg} is missing. Reinstall with ` +
32
+ `"npm install -g @hmgle/radio-cli"; installing with --omit=optional or ` +
33
+ `--ignore-scripts skips the platform package.\n`,
34
+ );
35
+ process.exit(1);
36
+ }
37
+
38
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: 'inherit' });
39
+ if (result.error) {
40
+ process.stderr.write(`radio: cannot run ${binary}: ${result.error.message}\n`);
41
+ process.exit(1);
42
+ }
43
+ // A signal leaves the status null; report failure instead of success.
44
+ process.exit(result.status === null ? 1 : result.status);
package/package.json CHANGED
@@ -1,6 +1,40 @@
1
1
  {
2
2
  "name": "@hmgle/radio-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.1",
4
+ "description": "Lightweight terminal radio: catalog search, favorites, playback, and local recording",
5
+ "keywords": [
6
+ "radio",
7
+ "internet-radio",
8
+ "terminal",
9
+ "tui",
10
+ "mpv"
11
+ ],
12
+ "license": "MIT",
13
+ "homepage": "https://github.com/hmgle/radio-cli#readme",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/hmgle/radio-cli.git"
17
+ },
18
+ "bin": {
19
+ "radio": "bin/radio.js"
20
+ },
21
+ "os": [
22
+ "darwin",
23
+ "linux"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
27
+ },
28
+ "files": [
29
+ "bin/radio.js",
30
+ "README.md"
31
+ ],
32
+ "optionalDependencies": {
33
+ "@hmgle/radio-cli-darwin-arm64": "0.8.1",
34
+ "@hmgle/radio-cli-darwin-x64": "0.8.1",
35
+ "@hmgle/radio-cli-linux-x64": "0.8.1"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ }
40
+ }