@mkterswingman/yonder 0.0.0-stage → 2.0.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.
Files changed (3) hide show
  1. package/README.md +28 -2
  2. package/bin/yonder.cjs +94 -0
  3. package/package.json +34 -4
package/README.md CHANGED
@@ -1,3 +1,29 @@
1
- # Temporary Holding Version
1
+ # @mkterswingman/yonder
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
+ Unified creator-data CLI for YouTube, Twitch, X, TikTok, Instagram, and Reddit.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install -g @mkterswingman/yonder
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```sh
14
+ yonder login
15
+ yonder redeem --code <INVITE_CODE> # skip if already activated
16
+ yonder setup --apply
17
+ yonder whoami
18
+ ```
19
+
20
+ ## Commands
21
+
22
+ - `yonder <https://...>` — Inspect a creator channel, user, post, or video URL directly
23
+ - `yonder capabilities --platform youtube --json` — View available platforms and actions
24
+ - `yonder query --action youtube.get_channel_stats --arg handles='["@mkbhd"]'` — Run structured queries
25
+ - `yonder discover --platforms youtube,twitch --query "gaming"` — Cross-platform creator discovery
26
+ - `yonder batch --input jobs.jsonl --output results.jsonl` — Resumable batch queries
27
+ - `yonder media subtitles|download|clip --url <URL>` — Local media tools (macOS, Linux, WSL2)
28
+ - `yonder reddit posts|info|search|post` — Local Reddit tools (macOS, Linux, WSL2)
29
+ - `yonder update` — Check for and install CLI updates
package/bin/yonder.cjs ADDED
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawnSync } = require('node:child_process');
5
+ const fs = require('node:fs');
6
+ const path = require('node:path');
7
+
8
+ function isMuslLinux() {
9
+ if (process.platform !== 'linux') {
10
+ return false;
11
+ }
12
+ if (fs.existsSync('/lib/ld-musl-x86_64.so.1') || fs.existsSync('/lib/ld-musl-aarch64.so.1')) {
13
+ return true;
14
+ }
15
+ try {
16
+ const report = process.report && process.report.getReport ? process.report.getReport() : null;
17
+ if (report && report.header && !report.header.glibcVersionRuntime) {
18
+ return true;
19
+ }
20
+ } catch {
21
+ // Ignore report errors on restricted runtimes
22
+ }
23
+ return false;
24
+ }
25
+
26
+ function resolvePlatformPackage() {
27
+ const { platform, arch } = process;
28
+ if (platform === 'darwin' && arch === 'arm64') {
29
+ return { pkg: '@mkterswingman/yonder-darwin-arm64', bin: 'yonder' };
30
+ }
31
+ if (platform === 'darwin' && arch === 'x64') {
32
+ return { pkg: '@mkterswingman/yonder-darwin-x64', bin: 'yonder' };
33
+ }
34
+ if (platform === 'linux' && arch === 'x64') {
35
+ return {
36
+ pkg: isMuslLinux() ? '@mkterswingman/yonder-linux-x64-musl' : '@mkterswingman/yonder-linux-x64',
37
+ bin: 'yonder',
38
+ };
39
+ }
40
+ if (platform === 'win32' && arch === 'x64') {
41
+ return { pkg: '@mkterswingman/yonder-win32-x64', bin: 'yonder.exe' };
42
+ }
43
+ return null;
44
+ }
45
+
46
+ function main() {
47
+ const target = resolvePlatformPackage();
48
+ if (!target) {
49
+ process.stderr.write(
50
+ `Unsupported platform ${process.platform}-${process.arch} for @mkterswingman/yonder. ` +
51
+ 'Supported targets: darwin-arm64, darwin-x64, linux-x64 (glibc/musl), win32-x64.\n',
52
+ );
53
+ process.exit(1);
54
+ }
55
+
56
+ let pkgJsonPath;
57
+ try {
58
+ pkgJsonPath = require.resolve(`${target.pkg}/package.json`);
59
+ } catch {
60
+ process.stderr.write(
61
+ `Missing platform binary package "${target.pkg}". ` +
62
+ 'Reinstall without --no-optional (e.g., "npm install -g @mkterswingman/yonder").\n',
63
+ );
64
+ process.exit(1);
65
+ }
66
+
67
+ const binPath = path.join(path.dirname(pkgJsonPath), 'bin', target.bin);
68
+ if (!fs.existsSync(binPath)) {
69
+ process.stderr.write(`Yonder binary not found at "${binPath}". Reinstall @mkterswingman/yonder.\n`);
70
+ process.exit(1);
71
+ }
72
+
73
+ const invokeName = path.basename(process.argv[1] || 'yonder');
74
+ const spawnOptions = {
75
+ stdio: 'inherit',
76
+ ...(process.platform !== 'win32' ? { argv0: invokeName } : {}),
77
+ };
78
+
79
+ const res = spawnSync(binPath, process.argv.slice(2), spawnOptions);
80
+ if (res.error) {
81
+ process.stderr.write(`Failed to launch yonder binary: ${res.error.message}\n`);
82
+ process.exit(1);
83
+ }
84
+ if (typeof res.status === 'number') {
85
+ process.exit(res.status);
86
+ }
87
+ if (res.signal) {
88
+ process.kill(process.pid, res.signal);
89
+ return;
90
+ }
91
+ process.exit(1);
92
+ }
93
+
94
+ main();
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@mkterswingman/yonder",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.0.0",
4
+ "description": "Unified creator-data CLI for YouTube, Twitch, X, TikTok, Instagram, and Reddit",
5
+ "license": "MIT",
6
+ "homepage": "https://yonder.mkterswingman.com",
7
+ "bin": {
8
+ "yonder": "bin/yonder.cjs",
9
+ "yonder-setup": "bin/yonder.cjs",
10
+ "yonder-update": "bin/yonder.cjs"
11
+ },
12
+ "files": [
13
+ "bin/yonder.cjs",
14
+ "README.md"
15
+ ],
16
+ "engines": {
17
+ "node": ">=18"
18
+ },
19
+ "optionalDependencies": {
20
+ "@mkterswingman/yonder-darwin-arm64": "2.0.0",
21
+ "@mkterswingman/yonder-darwin-x64": "2.0.0",
22
+ "@mkterswingman/yonder-linux-x64": "2.0.0",
23
+ "@mkterswingman/yonder-linux-x64-musl": "2.0.0",
24
+ "@mkterswingman/yonder-win32-x64": "2.0.0"
25
+ },
26
+ "keywords": [
27
+ "yonder",
28
+ "creator-analytics",
29
+ "youtube",
30
+ "twitch",
31
+ "tiktok",
32
+ "instagram",
33
+ "reddit",
34
+ "cli"
35
+ ]
36
+ }