buninu 0.1.8 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 - 2026-08-17
4
+
5
+ ### Added
6
+
7
+ - Add `--jsgotty`, `--jsmdcui`, and `--musl-la` as the first argument to
8
+ `bin/init.js` to spawn that app directly, forwarding every remaining
9
+ argument to it and exiting with its exit code. This bypasses the shell and
10
+ startup-command flow entirely, and lets `--jsgotty --help` (and the same for
11
+ the other two) show the app's own option reference instead of Buninu's.
12
+ - Add `buninu-help`, a POSIX and Windows multicall command that renders
13
+ README.md with jsmdcui's `--cat` mode and then displays `icon.png` with
14
+ jsgotty's `--viu`. The default startup greeting now points to it instead of
15
+ separately mentioning `glow`/`README.md`.
16
+
17
+ ### Security
18
+
19
+ - Bind jsgotty to `127.0.0.1` by default instead of `0.0.0.0` in
20
+ `scripts.start`. Previously the terminal server accepted connections from
21
+ any device able to reach the host on its network, relying only on the
22
+ random port and `--random-url` path segment for protection. Pass
23
+ `--address <value>` through to `bin/init.js` (forwarded arguments override
24
+ the flags baked into `scripts.start`) to opt back into listening on other
25
+ interfaces.
26
+
27
+ ## 0.1.9 - 2026-08-17
28
+
29
+ ### Fixed
30
+
31
+ - Correct `apps/musl-la/NOTICE`: it listed 11 third-party components
32
+ (llama.cpp, nghttp2/nghttp3, OpenSSL, libssh2, curl, zlib, libidn2,
33
+ libunistring, brotli, c-ares, libpsl) with no corresponding files anywhere
34
+ in the package — leftover from an unrelated bundle. The only files actually
35
+ shipped in that directory are `ld-musl-aarch64.so.1`, `libgcc_s.so.1`, and
36
+ `libstdc++.so.6`; the notice now covers only those, identifying the exact
37
+ build (GCC 14.2.0, packaged as Alpine Linux 3.22's `libgcc`/`libstdc++`
38
+ 14.2.0-r6, aarch64) with matching SHA-256 hashes and a link to Alpine's
39
+ build recipe pinned to the commit for that package revision, satisfying the
40
+ GCC Runtime Library Exception's corresponding-source requirement.
41
+
3
42
  ## 0.1.8 - 2026-08-17
4
43
 
5
44
  ### Changed
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Buninu
2
2
 
3
- ![icon](icon.png)
3
+ ![icon](https://raw.githubusercontent.com/jjtseng93/buninu/main/icon.png)
4
4
 
5
5
  > **Early development:** Buninu is still at an early stage of development.
6
6
  > Features, configuration, and command-line behavior may change between releases.
@@ -70,8 +70,33 @@ shell for the current platform. Other arguments are forwarded to jsgotty:
70
70
  ```sh
71
71
  npx buninu --credential user:pass
72
72
  npx buninu --port 9000
73
+ npx buninu --jsgotty --help
74
+
75
+ # public: listen on every interface, reachable from other devices on the network, be cautious!
76
+ npx buninu -a 0.0.0.0
73
77
  ```
74
78
 
79
+ As the first argument, `--jsgotty`, `--jsmdcui`, or `--musl-la` bypasses the
80
+ shell/command startup flow entirely: it spawns that app directly with every
81
+ remaining argument forwarded to it, and exits with its exit code. Use this to
82
+ reach an app's own options directly, for example `npx buninu --jsgotty --help`
83
+ to see jsgotty's actual flag reference instead of Buninu's.
84
+
85
+ ## Security
86
+
87
+ `scripts.start` binds jsgotty to `127.0.0.1` by default, so the terminal
88
+ server only accepts connections from the same machine. It is not reachable
89
+ from other devices on the network unless you explicitly opt in.
90
+
91
+ The terminal itself is writable (`-w`) and unauthenticated by default; only
92
+ the loopback binding and jsgotty's random URL path (`-r`) stand between a
93
+ local process and a shell with Buninu's permissions. To listen on another
94
+ interface, forward `--address <value>` (see [Start](#start)); forwarded
95
+ arguments override the flags baked into `scripts.start`. Also pass
96
+ `--credential user:pass` when doing so, since the random port and URL path
97
+ are not a substitute for authentication once the server is reachable from
98
+ outside the machine.
99
+
75
100
  ## Command-line information
76
101
 
77
102
  ```text
@@ -79,8 +104,16 @@ npx buninu --port 9000
79
104
  -V, --version Show the Buninu, Bun, platform, and architecture versions
80
105
  --readme Render README.md in the terminal
81
106
  --changelog Render CHANGELOG.md in the terminal
107
+ --jsgotty [args...] Spawn jsgotty directly and exit with its exit code
108
+ --jsmdcui [args...] Spawn jsmdcui directly and exit with its exit code
109
+ --musl-la [args...] Spawn musl-la directly and exit with its exit code
82
110
  ```
83
111
 
112
+ These are flags to `bin/init.js` itself, resolved before Buninu starts. Once you
113
+ are inside a running Buninu shell, run `buninu-help` instead: it renders
114
+ README.md with jsmdcui's `--cat` mode and then shows `icon.png` with jsgotty's
115
+ `--viu`. It is the command the default startup greeting points to.
116
+
84
117
  ## Export
85
118
 
86
119
  Export the current Buninu installation as a gzip-compressed tar archive:
package/apps/cmdlist CHANGED
@@ -14,3 +14,6 @@ jsmdcui
14
14
 
15
15
  ### musl-la — Launch AArch64 ELF programs with the bundled musl loader
16
16
  musl-la
17
+
18
+ ### buninu-help — Render README.md with glow, then show icon.png with jsgotty --viu
19
+ buninu-help
@@ -1,56 +1,20 @@
1
1
  This product includes third-party components:
2
2
 
3
- - llama.cpp (libllama, libggml)
4
- License: MIT
5
- https://github.com/ggml-org/llama.cpp
6
-
7
- - nghttp2 / nghttp3
8
- License: MIT
9
- https://github.com/nghttp2/nghttp2
10
- Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa
11
- Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors
12
- Copyright (c) 2019 nghttp3 contributors
13
-
14
- - OpenSSL (libssl, libcrypto)
15
- License: Apache License 2.0
16
- https://github.com/openssl/openssl
17
-
18
- - libssh2
19
- License: BSD-3-Clause license
20
- https://github.com/libssh2/libssh2
21
-
22
- - curl (libcurl)
23
- License: curl license (MIT-like)
24
- https://curl.se/
25
-
26
- - zlib
27
- License: zlib
28
- https://zlib.net/
29
-
30
- - libgcc/libgomp/libstdc++
3
+ - libgcc_s.so.1 / libstdc++.so.6
31
4
  License: GPL-3.0 + GCC Runtime Library Exception
32
- https://gcc.gnu.org/
33
- See: ./LICENSES/gcc_runtime_exception.txt
5
+ See: ./LICENSES/GPL-3.0.txt and ./LICENSES/gcc_runtime_exception.txt
34
6
 
35
- - libidn2
36
- License: LGPL-3.0 or later
37
- https://www.gnu.org/software/libidn
38
- https://gitlab.com/libidn/libidn2
7
+ Built from GCC 14.2.0, as packaged by Alpine Linux 3.22
8
+ (packages libgcc and libstdc++, version 14.2.0-r6, aarch64).
39
9
 
40
- - libunistring
41
- License: LGPL-3.0 or later
42
- https://www.gnu.org/software/libunistring
10
+ Upstream GCC source:
11
+ https://gcc.gnu.org/pub/gcc/releases/gcc-14.2.0/gcc-14.2.0.tar.xz
43
12
 
44
- - brotli
45
- License: MIT
46
- https://github.com/google/brotli
47
- Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
48
-
49
- - c-ares (libcares)
50
- License: MIT
51
- https://c-ares.org
13
+ Alpine's build recipe and patches (Corresponding Source for this exact
14
+ build), pinned to the commit matching pkgrel=6:
15
+ https://gitlab.alpinelinux.org/alpine/aports/-/blob/fbf60319be3bbaf6dd32ef55cc6fb7189e05c266/main/gcc/APKBUILD
52
16
 
53
- - libpsl
54
- License: MIT
55
- https://github.com/rockdaboot/libpsl
56
- Copyright (C) 2014-2024 Tim Rühsen
17
+ SHA-256 (verified byte-for-byte identical to the official Alpine 3.22
18
+ aarch64 packages):
19
+ libgcc_s.so.1: 2d945d6ce360769b41fbffc652c2440014bbd69416f13fe206fbac19d32c9431
20
+ libstdc++.so.6: 85f2cd6db79578ab58be4d12b7df7482ebc003a37496c7544956d9157f8a2b3f
@@ -0,0 +1,4 @@
1
+ @echo off
2
+ call "%~dp0bun.bat" "%~dp0..\apps\jsmdcui\src\index.js" --cat "%~dp0..\README.md"
3
+ call "%~dp0bun.bat" "%~dp0..\apps\jsgotty\gotty.js" --viu "%~dp0..\icon.png"
4
+ exit /b %ERRORLEVEL%
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+
3
+ sd=$(dirname "$(realpath "$0")")
4
+ root=$sd/..
5
+
6
+ bun "$root"/apps/jsmdcui/src/index.js --cat "$root"/README.md
7
+ exec bun "$root"/apps/jsgotty/gotty.js --viu "$root"/icon.png
package/bin/init.js CHANGED
@@ -30,6 +30,14 @@ Init options:
30
30
  --shell <path|name> Override buninu.shell for this run
31
31
  --command <command> Override buninu.command for this run
32
32
 
33
+ Direct app launch (must be the first argument; skips the shell/command
34
+ startup flow entirely):
35
+ --jsgotty [args...] Spawn jsgotty directly, forwarding remaining
36
+ arguments, and exit with its exit code
37
+ (--jsgotty --help shows jsgotty's own options)
38
+ --jsmdcui [args...] Spawn jsmdcui directly, same forwarding behavior
39
+ --musl-la [args...] Spawn musl-la directly, same forwarding behavior
40
+
33
41
  Package configuration:
34
42
  package.json contains a buninu section for default and platform settings.
35
43
  buninu.shell Select the shell to start
@@ -395,6 +403,34 @@ async function createChildEnvironment(environment) {
395
403
  };
396
404
  }
397
405
 
406
+ const directAppTargets = {
407
+ "--jsgotty": "jsgotty",
408
+ "--jsmdcui": "jsmdcui",
409
+ "--musl-la": "musl-la",
410
+ };
411
+
412
+ async function runDirectApp(name, forwardedArgs, environment) {
413
+ const isWindows = environment.name === "windows";
414
+ const launcherPath = resolve(binDir, isWindows ? `${name}.bat` : name);
415
+ if (!await pathExists(launcherPath)) {
416
+ fail(`${name} is not available on ${environment.name}: ${launcherPath}`);
417
+ }
418
+
419
+ const childEnvironment = await createChildEnvironment(environment);
420
+ const argv = isWindows
421
+ ? [process.env.ComSpec || "cmd.exe", "/c", launcherPath, ...forwardedArgs]
422
+ : [launcherPath, ...forwardedArgs];
423
+
424
+ const child = Bun.spawn(argv, {
425
+ cwd: rootDir,
426
+ env: childEnvironment,
427
+ stdin: "inherit",
428
+ stdout: "inherit",
429
+ stderr: "inherit",
430
+ });
431
+ process.exit(await child.exited);
432
+ }
433
+
398
434
  function readInitArguments(arguments_) {
399
435
  const forwarded = [];
400
436
  let shell = null;
@@ -459,6 +495,14 @@ if (typeof startScript !== "string" || !startScript.trim()) {
459
495
  fail("package.json does not define scripts.start");
460
496
  }
461
497
 
498
+ const directAppTarget = directAppTargets[process.argv[2]];
499
+ if (directAppTarget) {
500
+ const directEnvironment = await detectEnvironment();
501
+ await runPlatformSwitch(directEnvironment);
502
+ await rebuildNativeSymlinks(directEnvironment);
503
+ await runDirectApp(directAppTarget, process.argv.slice(3), directEnvironment);
504
+ }
505
+
462
506
  if (await handleInformationArguments(process.argv.slice(2))) process.exit(0);
463
507
 
464
508
  const command = splitCommand(startScript);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buninu",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "Buninu is a portable, self-bootstrapping Unix-like userspace built on Bun that runs across operating systems",
5
5
  "type": "module",
6
6
  "main": "./bin/init.js",
@@ -17,15 +17,15 @@
17
17
  "windows": null
18
18
  },
19
19
  "command": {
20
- "default": "echo Welcome to Buninu, Try: glow apps/cmdlist",
21
- "android": "if command -v libmain.so >/dev/null 2>&1; then libmain.so; else printf '%s\\n' '# Welcome to Buninu Android' '- Try: glow apps/cmdlist'; fi",
20
+ "default": "echo Welcome to Buninu, Try: glow apps/cmdlist, Help: buninu-help",
21
+ "android": "if command -v libmain.so >/dev/null 2>&1; then libmain.so; else printf '%s\\n' '# Welcome to Buninu Android' '- Try: glow apps/cmdlist' '- Help: buninu-help'; fi",
22
22
  "linux": null,
23
23
  "macos": null,
24
24
  "windows": null
25
25
  }
26
26
  },
27
27
  "scripts": {
28
- "start": "bun ./apps/jsgotty/gotty.js --reconnect -r -w --webgl",
28
+ "start": "bun ./apps/jsgotty/gotty.js --reconnect -r -w --webgl -a 127.0.0.1",
29
29
  "check": "node --check ./bin/init.js"
30
30
  }
31
31
  }