buninu-linux 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.
Files changed (621) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSES/Bun-LICENSE.md +84 -0
  3. package/LICENSES/GCC-Runtime-Library-Exception-3.1.txt +73 -0
  4. package/LICENSES/GPL-2.0.txt +338 -0
  5. package/LICENSES/GPL-3.0.txt +674 -0
  6. package/LICENSES/LGPL-2.1.txt +501 -0
  7. package/LICENSES/Linux-syscall-note.txt +25 -0
  8. package/LICENSES/musl-COPYRIGHT.txt +193 -0
  9. package/NOTICE.md +184 -0
  10. package/README.md +537 -0
  11. package/build-image.sh +44 -0
  12. package/build-uki.sh +75 -0
  13. package/fetch-alpine.sh +80 -0
  14. package/fetch-bun.sh +41 -0
  15. package/fetch-plus-build.sh +11 -0
  16. package/hello/build-hello.sh +14 -0
  17. package/hello/hello.c +50 -0
  18. package/index.js +235 -0
  19. package/initramfs/bin/sh +3 -0
  20. package/initramfs/buninu/.bashrc +11 -0
  21. package/initramfs/buninu/ARCHITECTURE.md +452 -0
  22. package/initramfs/buninu/CHANGELOG.md +580 -0
  23. package/initramfs/buninu/LICENSE +21 -0
  24. package/initramfs/buninu/README.md +1161 -0
  25. package/initramfs/buninu/apps/bun/make-bunBin.sh +99 -0
  26. package/initramfs/buninu/apps/bunmsh/CHANGELOG.md +493 -0
  27. package/initramfs/buninu/apps/bunmsh/LICENSE +21 -0
  28. package/initramfs/buninu/apps/bunmsh/LICENSE-MICRO +58 -0
  29. package/initramfs/buninu/apps/bunmsh/LICENSE-MKSH +295 -0
  30. package/initramfs/buninu/apps/bunmsh/PORTING.md +192 -0
  31. package/initramfs/buninu/apps/bunmsh/README.md +1042 -0
  32. package/initramfs/buninu/apps/bunmsh/bunmsh +7 -0
  33. package/initramfs/buninu/apps/bunmsh/bunshell.md +61 -0
  34. package/initramfs/buninu/apps/bunmsh/help/README.md +2237 -0
  35. package/initramfs/buninu/apps/bunmsh/help/alias.md +22 -0
  36. package/initramfs/buninu/apps/bunmsh/help/basename.md +38 -0
  37. package/initramfs/buninu/apps/bunmsh/help/builtin.md +25 -0
  38. package/initramfs/buninu/apps/bunmsh/help/bun.md +27 -0
  39. package/initramfs/buninu/apps/bunmsh/help/bunmsh.md +47 -0
  40. package/initramfs/buninu/apps/bunmsh/help/cat.md +31 -0
  41. package/initramfs/buninu/apps/bunmsh/help/catfancy.md +35 -0
  42. package/initramfs/buninu/apps/bunmsh/help/cd.md +22 -0
  43. package/initramfs/buninu/apps/bunmsh/help/chmod.md +27 -0
  44. package/initramfs/buninu/apps/bunmsh/help/clear.md +21 -0
  45. package/initramfs/buninu/apps/bunmsh/help/colon.md +22 -0
  46. package/initramfs/buninu/apps/bunmsh/help/command.md +27 -0
  47. package/initramfs/buninu/apps/bunmsh/help/cp.md +28 -0
  48. package/initramfs/buninu/apps/bunmsh/help/curl.md +181 -0
  49. package/initramfs/buninu/apps/bunmsh/help/cut.md +25 -0
  50. package/initramfs/buninu/apps/bunmsh/help/date.md +25 -0
  51. package/initramfs/buninu/apps/bunmsh/help/dirname.md +25 -0
  52. package/initramfs/buninu/apps/bunmsh/help/echo.md +25 -0
  53. package/initramfs/buninu/apps/bunmsh/help/env.md +27 -0
  54. package/initramfs/buninu/apps/bunmsh/help/eval.md +22 -0
  55. package/initramfs/buninu/apps/bunmsh/help/exec.md +22 -0
  56. package/initramfs/buninu/apps/bunmsh/help/exit.md +21 -0
  57. package/initramfs/buninu/apps/bunmsh/help/export.md +22 -0
  58. package/initramfs/buninu/apps/bunmsh/help/false.md +22 -0
  59. package/initramfs/buninu/apps/bunmsh/help/find.md +33 -0
  60. package/initramfs/buninu/apps/bunmsh/help/getopts.md +28 -0
  61. package/initramfs/buninu/apps/bunmsh/help/grep.md +34 -0
  62. package/initramfs/buninu/apps/bunmsh/help/head.md +27 -0
  63. package/initramfs/buninu/apps/bunmsh/help/kill.md +43 -0
  64. package/initramfs/buninu/apps/bunmsh/help/ln.md +28 -0
  65. package/initramfs/buninu/apps/bunmsh/help/ls.md +37 -0
  66. package/initramfs/buninu/apps/bunmsh/help/lsbun.md +29 -0
  67. package/initramfs/buninu/apps/bunmsh/help/lsfancy.md +37 -0
  68. package/initramfs/buninu/apps/bunmsh/help/md5sum.md +21 -0
  69. package/initramfs/buninu/apps/bunmsh/help/mkdir.md +27 -0
  70. package/initramfs/buninu/apps/bunmsh/help/mktemp.md +26 -0
  71. package/initramfs/buninu/apps/bunmsh/help/mv.md +26 -0
  72. package/initramfs/buninu/apps/bunmsh/help/print.md +30 -0
  73. package/initramfs/buninu/apps/bunmsh/help/printf.md +25 -0
  74. package/initramfs/buninu/apps/bunmsh/help/pspa.md +38 -0
  75. package/initramfs/buninu/apps/bunmsh/help/pspac.md +57 -0
  76. package/initramfs/buninu/apps/bunmsh/help/pwd.md +21 -0
  77. package/initramfs/buninu/apps/bunmsh/help/read.md +27 -0
  78. package/initramfs/buninu/apps/bunmsh/help/readonly.md +27 -0
  79. package/initramfs/buninu/apps/bunmsh/help/realpath.md +21 -0
  80. package/initramfs/buninu/apps/bunmsh/help/rm.md +33 -0
  81. package/initramfs/buninu/apps/bunmsh/help/rmdir.md +27 -0
  82. package/initramfs/buninu/apps/bunmsh/help/sed.md +29 -0
  83. package/initramfs/buninu/apps/bunmsh/help/seq.md +29 -0
  84. package/initramfs/buninu/apps/bunmsh/help/serve.md +50 -0
  85. package/initramfs/buninu/apps/bunmsh/help/set.md +26 -0
  86. package/initramfs/buninu/apps/bunmsh/help/sha256sum.md +21 -0
  87. package/initramfs/buninu/apps/bunmsh/help/shift.md +23 -0
  88. package/initramfs/buninu/apps/bunmsh/help/sleep.md +25 -0
  89. package/initramfs/buninu/apps/bunmsh/help/sort.md +29 -0
  90. package/initramfs/buninu/apps/bunmsh/help/source.md +23 -0
  91. package/initramfs/buninu/apps/bunmsh/help/tab.md +30 -0
  92. package/initramfs/buninu/apps/bunmsh/help/tac.md +29 -0
  93. package/initramfs/buninu/apps/bunmsh/help/tail.md +27 -0
  94. package/initramfs/buninu/apps/bunmsh/help/tee.md +25 -0
  95. package/initramfs/buninu/apps/bunmsh/help/test.md +30 -0
  96. package/initramfs/buninu/apps/bunmsh/help/time.md +29 -0
  97. package/initramfs/buninu/apps/bunmsh/help/touch.md +26 -0
  98. package/initramfs/buninu/apps/bunmsh/help/tr.md +26 -0
  99. package/initramfs/buninu/apps/bunmsh/help/true.md +22 -0
  100. package/initramfs/buninu/apps/bunmsh/help/type.md +21 -0
  101. package/initramfs/buninu/apps/bunmsh/help/umask.md +22 -0
  102. package/initramfs/buninu/apps/bunmsh/help/unalias.md +28 -0
  103. package/initramfs/buninu/apps/bunmsh/help/uname.md +31 -0
  104. package/initramfs/buninu/apps/bunmsh/help/unset.md +28 -0
  105. package/initramfs/buninu/apps/bunmsh/help/wc.md +27 -0
  106. package/initramfs/buninu/apps/bunmsh/help/whence.md +26 -0
  107. package/initramfs/buninu/apps/bunmsh/help/which.md +41 -0
  108. package/initramfs/buninu/apps/bunmsh/help/yes.md +23 -0
  109. package/initramfs/buninu/apps/bunmsh/index.js +7 -0
  110. package/initramfs/buninu/apps/bunmsh/package.json +30 -0
  111. package/initramfs/buninu/apps/bunmsh/serve.js +468 -0
  112. package/initramfs/buninu/apps/bunmsh/single-exe/README.md +402 -0
  113. package/initramfs/buninu/apps/bunmsh/single-exe/assetsHelper.js +371 -0
  114. package/initramfs/buninu/apps/bunmsh/single-exe/assetsLoader.mjs +85 -0
  115. package/initramfs/buninu/apps/bunmsh/single-exe/assetsPacker.js +218 -0
  116. package/initramfs/buninu/apps/bunmsh/single-exe/compiled.js +527 -0
  117. package/initramfs/buninu/apps/bunmsh/single-exe/entry.mjs +17 -0
  118. package/initramfs/buninu/apps/bunmsh/src/cat-fancy.js +117 -0
  119. package/initramfs/buninu/apps/bunmsh/src/cat-operands.js +31 -0
  120. package/initramfs/buninu/apps/bunmsh/src/completion.js +363 -0
  121. package/initramfs/buninu/apps/bunmsh/src/curl.js +1191 -0
  122. package/initramfs/buninu/apps/bunmsh/src/environment.js +61 -0
  123. package/initramfs/buninu/apps/bunmsh/src/fancy-ls.js +186 -0
  124. package/initramfs/buninu/apps/bunmsh/src/find.js +119 -0
  125. package/initramfs/buninu/apps/bunmsh/src/history.js +198 -0
  126. package/initramfs/buninu/apps/bunmsh/src/main.js +850 -0
  127. package/initramfs/buninu/apps/bunmsh/src/mouse.js +103 -0
  128. package/initramfs/buninu/apps/bunmsh/src/shell.js +3932 -0
  129. package/initramfs/buninu/apps/bunmsh/test/catfancy.test.js +102 -0
  130. package/initramfs/buninu/apps/bunmsh/test/curl.test.js +335 -0
  131. package/initramfs/buninu/apps/bunmsh/test/reference-source.sh +1 -0
  132. package/initramfs/buninu/apps/bunmsh/test/reference.test.js +817 -0
  133. package/initramfs/buninu/apps/bunmsh/test/serve/README.md +3 -0
  134. package/initramfs/buninu/apps/bunmsh/test/serve/bad.json +1 -0
  135. package/initramfs/buninu/apps/bunmsh/test/serve/data.json +1 -0
  136. package/initramfs/buninu/apps/bunmsh/test/serve/data.json5 +1 -0
  137. package/initramfs/buninu/apps/bunmsh/test/serve/data.jsonc +2 -0
  138. package/initramfs/buninu/apps/bunmsh/test/serve/data.jsonl +2 -0
  139. package/initramfs/buninu/apps/bunmsh/test/serve/data.ndjson +1 -0
  140. package/initramfs/buninu/apps/bunmsh/test/serve/data.toml +3 -0
  141. package/initramfs/buninu/apps/bunmsh/test/serve/data.ts +15 -0
  142. package/initramfs/buninu/apps/bunmsh/test/serve/data.xml +1 -0
  143. package/initramfs/buninu/apps/bunmsh/test/serve/data.yaml +3 -0
  144. package/initramfs/buninu/apps/bunmsh/test/serve/data.yml +1 -0
  145. package/initramfs/buninu/apps/bunmsh/test/serve.test.js +241 -0
  146. package/initramfs/buninu/apps/bunmsh/test/shell.test.js +2092 -0
  147. package/initramfs/buninu/apps/bunmsh/test/shell1.test.js +1087 -0
  148. package/initramfs/buninu/apps/bunmsh/test/shell2.test.js +457 -0
  149. package/initramfs/buninu/apps/bunmsh/test/shell3.test.js +741 -0
  150. package/initramfs/buninu/apps/bunmsh/test/t.sh +12 -0
  151. package/initramfs/buninu/apps/bunx/bunx.js +172 -0
  152. package/initramfs/buninu/apps/cmdlist +48 -0
  153. package/initramfs/buninu/apps/jsgotty/LICENSE +23 -0
  154. package/initramfs/buninu/apps/jsgotty/LICENSES/Apache-2.0-zmodem.js.txt +201 -0
  155. package/initramfs/buninu/apps/jsgotty/NOTICE +21 -0
  156. package/initramfs/buninu/apps/jsgotty/README.en.md +294 -0
  157. package/initramfs/buninu/apps/jsgotty/README.md +296 -0
  158. package/initramfs/buninu/apps/jsgotty/client.mjs +700 -0
  159. package/initramfs/buninu/apps/jsgotty/env.sh +2 -0
  160. package/initramfs/buninu/apps/jsgotty/gotty.js +3334 -0
  161. package/initramfs/buninu/apps/jsgotty/node_modules/.package-lock.json +35 -0
  162. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/LICENSE.md +9 -0
  163. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/README.md +319 -0
  164. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/common.gypi +20 -0
  165. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/except.gypi +25 -0
  166. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/index.js +12 -0
  167. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
  168. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/napi-inl.h +6607 -0
  169. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/napi.h +3201 -0
  170. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/node_addon_api.gyp +32 -0
  171. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/node_api.gyp +9 -0
  172. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/noexcept.gypi +26 -0
  173. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/nothing.c +0 -0
  174. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/package-support.json +21 -0
  175. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/package.json +480 -0
  176. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/tools/README.md +73 -0
  177. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/tools/check-napi.js +99 -0
  178. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/tools/clang-format.js +71 -0
  179. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/tools/conversion.js +301 -0
  180. package/initramfs/buninu/apps/jsgotty/node_modules/node-addon-api/tools/eslint-format.js +79 -0
  181. package/initramfs/buninu/apps/jsgotty/node_modules/ws/LICENSE +20 -0
  182. package/initramfs/buninu/apps/jsgotty/node_modules/ws/README.md +548 -0
  183. package/initramfs/buninu/apps/jsgotty/node_modules/ws/browser.js +8 -0
  184. package/initramfs/buninu/apps/jsgotty/node_modules/ws/index.js +22 -0
  185. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/buffer-util.js +131 -0
  186. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/constants.js +19 -0
  187. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/event-target.js +292 -0
  188. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/extension.js +203 -0
  189. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/limiter.js +55 -0
  190. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/permessage-deflate.js +528 -0
  191. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/receiver.js +760 -0
  192. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/sender.js +607 -0
  193. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/stream.js +161 -0
  194. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/subprotocol.js +62 -0
  195. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/validation.js +152 -0
  196. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/websocket-server.js +562 -0
  197. package/initramfs/buninu/apps/jsgotty/node_modules/ws/lib/websocket.js +1407 -0
  198. package/initramfs/buninu/apps/jsgotty/node_modules/ws/package.json +70 -0
  199. package/initramfs/buninu/apps/jsgotty/node_modules/ws/wrapper.mjs +21 -0
  200. package/initramfs/buninu/apps/jsgotty/package-lock.json +46 -0
  201. package/initramfs/buninu/apps/jsgotty/package.json +19 -0
  202. package/initramfs/buninu/apps/jsgotty/patches/windowsPtyAgent.js +326 -0
  203. package/initramfs/buninu/apps/jsgotty/patches/windowsTerminal.js +204 -0
  204. package/initramfs/buninu/apps/jsgotty/rz.js +199 -0
  205. package/initramfs/buninu/apps/jsgotty/single-exe/README.md +384 -0
  206. package/initramfs/buninu/apps/jsgotty/single-exe/assetsHelper.js +371 -0
  207. package/initramfs/buninu/apps/jsgotty/single-exe/assetsLoader.mjs +85 -0
  208. package/initramfs/buninu/apps/jsgotty/single-exe/assetsPacker.js +218 -0
  209. package/initramfs/buninu/apps/jsgotty/single-exe/compiled.js +498 -0
  210. package/initramfs/buninu/apps/jsgotty/single-exe/entry.mjs +23 -0
  211. package/initramfs/buninu/apps/jsgotty/single-exe/packAssets.sh +7 -0
  212. package/initramfs/buninu/apps/jsgotty/static/css/index.css +13 -0
  213. package/initramfs/buninu/apps/jsgotty/static/css/kitty.css +61 -0
  214. package/initramfs/buninu/apps/jsgotty/static/css/xterm.css +218 -0
  215. package/initramfs/buninu/apps/jsgotty/static/css/xterm_customize.css +35 -0
  216. package/initramfs/buninu/apps/jsgotty/static/favicon.ico +0 -0
  217. package/initramfs/buninu/apps/jsgotty/static/help.md +125 -0
  218. package/initramfs/buninu/apps/jsgotty/static/icon.svg +66 -0
  219. package/initramfs/buninu/apps/jsgotty/static/icon_192.png +0 -0
  220. package/initramfs/buninu/apps/jsgotty/static/index.html +164 -0
  221. package/initramfs/buninu/apps/jsgotty/static/js/gotty.js +31537 -0
  222. package/initramfs/buninu/apps/jsgotty/static/js/gotty.js.LICENSE.txt +7 -0
  223. package/initramfs/buninu/apps/jsgotty/static/js/gotty.js.map +1 -0
  224. package/initramfs/buninu/apps/jsgotty/static/js/gotty.licenses.txt +650 -0
  225. package/initramfs/buninu/apps/jsgotty/static/js/kitty.js +1101 -0
  226. package/initramfs/buninu/apps/jsgotty/static/js/windows_bridge.js +194 -0
  227. package/initramfs/buninu/apps/jsgotty/static/js/xterm-addon-unicode11.js +2 -0
  228. package/initramfs/buninu/apps/jsgotty/static/js/zmodem.js +1 -0
  229. package/initramfs/buninu/apps/jsgotty/static/manifest.json +15 -0
  230. package/initramfs/buninu/apps/jsgotty/sz.js +273 -0
  231. package/initramfs/buninu/apps/jsgotty/tests/kitty-order.test.js +58 -0
  232. package/initramfs/buninu/apps/jsgotty/tests/websocket-origin.test.js +54 -0
  233. package/initramfs/buninu/apps/jsgotty/viu.mjs +422 -0
  234. package/initramfs/buninu/apps/jsgotty/wgotty +62 -0
  235. package/initramfs/buninu/apps/jsgotty/windows-bridge-node.js +60 -0
  236. package/initramfs/buninu/apps/jsgotty/zmodem-node.js +262 -0
  237. package/initramfs/buninu/apps/jsmdcui/CHANGELOG.md +1118 -0
  238. package/initramfs/buninu/apps/jsmdcui/LICENSE +22 -0
  239. package/initramfs/buninu/apps/jsmdcui/README.md +1283 -0
  240. package/initramfs/buninu/apps/jsmdcui/cdp-maze.js +141 -0
  241. package/initramfs/buninu/apps/jsmdcui/clean.sh +9 -0
  242. package/initramfs/buninu/apps/jsmdcui/demos/basic.jpg +0 -0
  243. package/initramfs/buninu/apps/jsmdcui/demos/chinese.md +32 -0
  244. package/initramfs/buninu/apps/jsmdcui/demos/event.md +170 -0
  245. package/initramfs/buninu/apps/jsmdcui/demos/good.jpg +0 -0
  246. package/initramfs/buninu/apps/jsmdcui/demos/image-processor.md +366 -0
  247. package/initramfs/buninu/apps/jsmdcui/demos/image-processor.zh-TW.md +366 -0
  248. package/initramfs/buninu/apps/jsmdcui/demos/img-change.md +73 -0
  249. package/initramfs/buninu/apps/jsmdcui/demos/imgtool-zh.md +298 -0
  250. package/initramfs/buninu/apps/jsmdcui/demos/imgtool.md +298 -0
  251. package/initramfs/buninu/apps/jsmdcui/demos/maze.md +149 -0
  252. package/initramfs/buninu/apps/jsmdcui/demos/reactive.md +40 -0
  253. package/initramfs/buninu/apps/jsmdcui/demos/reader.md +513 -0
  254. package/initramfs/buninu/apps/jsmdcui/demos/select.md +63 -0
  255. package/initramfs/buninu/apps/jsmdcui/demos/todo-zh.md +190 -0
  256. package/initramfs/buninu/apps/jsmdcui/demos/todo.md +191 -0
  257. package/initramfs/buninu/apps/jsmdcui/edit +9 -0
  258. package/initramfs/buninu/apps/jsmdcui/jsmdcui.sh +16 -0
  259. package/initramfs/buninu/apps/jsmdcui/llm-maze.txt +94 -0
  260. package/initramfs/buninu/apps/jsmdcui/package.json +29 -0
  261. package/initramfs/buninu/apps/jsmdcui/project_structure.txt +35 -0
  262. package/initramfs/buninu/apps/jsmdcui/runmd.mjs +1140 -0
  263. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/atom-dark.micro +33 -0
  264. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/bubblegum.micro +31 -0
  265. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/cmc-16.micro +47 -0
  266. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/cmc-tc.micro +43 -0
  267. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/darcula.micro +34 -0
  268. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/default.micro +1 -0
  269. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/dracula-tc.micro +49 -0
  270. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/dukedark-tc.micro +38 -0
  271. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/dukelight-tc.micro +38 -0
  272. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
  273. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/geany.micro +29 -0
  274. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/gotham.micro +29 -0
  275. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/gruvbox-tc.micro +29 -0
  276. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/gruvbox.micro +26 -0
  277. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/material-tc.micro +36 -0
  278. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/monokai-dark.micro +28 -0
  279. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/monokai.micro +34 -0
  280. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/one-dark.micro +39 -0
  281. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/railscast.micro +37 -0
  282. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/simple.micro +33 -0
  283. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/solarized-tc.micro +31 -0
  284. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/solarized.micro +30 -0
  285. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/sunny-day.micro +29 -0
  286. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/twilight.micro +40 -0
  287. package/initramfs/buninu/apps/jsmdcui/runtime/colorschemes/zenburn.micro +30 -0
  288. package/initramfs/buninu/apps/jsmdcui/runtime/help/actions.md +161 -0
  289. package/initramfs/buninu/apps/jsmdcui/runtime/help/cdp.md +130 -0
  290. package/initramfs/buninu/apps/jsmdcui/runtime/help/colors.md +421 -0
  291. package/initramfs/buninu/apps/jsmdcui/runtime/help/commands.md +161 -0
  292. package/initramfs/buninu/apps/jsmdcui/runtime/help/copypaste.md +149 -0
  293. package/initramfs/buninu/apps/jsmdcui/runtime/help/defaultkeys.md +148 -0
  294. package/initramfs/buninu/apps/jsmdcui/runtime/help/help.md +1283 -0
  295. package/initramfs/buninu/apps/jsmdcui/runtime/help/keybindings.md +355 -0
  296. package/initramfs/buninu/apps/jsmdcui/runtime/help/linter.md +90 -0
  297. package/initramfs/buninu/apps/jsmdcui/runtime/help/options.md +709 -0
  298. package/initramfs/buninu/apps/jsmdcui/runtime/help/plugins.md +544 -0
  299. package/initramfs/buninu/apps/jsmdcui/runtime/help/tutorial.md +112 -0
  300. package/initramfs/buninu/apps/jsmdcui/runtime/jsplugins/cdp/cdp-server.js +1263 -0
  301. package/initramfs/buninu/apps/jsmdcui/runtime/jsplugins/cdp/cdp.js +203 -0
  302. package/initramfs/buninu/apps/jsmdcui/runtime/jsplugins/chapter/chapter.js +111 -0
  303. package/initramfs/buninu/apps/jsmdcui/runtime/jsplugins/diff/diff.js +46 -0
  304. package/initramfs/buninu/apps/jsmdcui/runtime/jsplugins/example/example.js +117 -0
  305. package/initramfs/buninu/apps/jsmdcui/runtime/jsplugins/linter/linter.js +281 -0
  306. package/initramfs/buninu/apps/jsmdcui/runtime/plugins/autoclose/autoclose.lua +75 -0
  307. package/initramfs/buninu/apps/jsmdcui/runtime/plugins/ftoptions/ftoptions.lua +17 -0
  308. package/initramfs/buninu/apps/jsmdcui/runtime/plugins/literate/README.md +5 -0
  309. package/initramfs/buninu/apps/jsmdcui/runtime/plugins/literate/literate.lua +55 -0
  310. package/initramfs/buninu/apps/jsmdcui/runtime/plugins/status/help/status.md +21 -0
  311. package/initramfs/buninu/apps/jsmdcui/runtime/plugins/status/status.lua +62 -0
  312. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/LICENSE +22 -0
  313. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/PowerShell.yaml +128 -0
  314. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/README.md +63 -0
  315. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/ada.yaml +43 -0
  316. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/apacheconf.yaml +59 -0
  317. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/arduino.yaml +101 -0
  318. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/asciidoc.yaml +51 -0
  319. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/asm.yaml +123 -0
  320. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/ats.yaml +99 -0
  321. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/awk.yaml +44 -0
  322. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/b.yaml +87 -0
  323. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/bat.yaml +57 -0
  324. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/c.yaml +60 -0
  325. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/caddyfile.yaml +23 -0
  326. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/cake.yaml +7 -0
  327. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/clojure.yaml +38 -0
  328. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/cmake.yaml +42 -0
  329. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/coffeescript.yaml +56 -0
  330. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/colortest.yaml +19 -0
  331. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/conky.yaml +17 -0
  332. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/cpp.yaml +91 -0
  333. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/crontab.yaml +36 -0
  334. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/crystal.yaml +72 -0
  335. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/csharp.yaml +52 -0
  336. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/css.yaml +44 -0
  337. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/csx.yaml +8 -0
  338. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/cuda.yaml +68 -0
  339. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/cython.yaml +52 -0
  340. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/d.yaml +121 -0
  341. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/dart.yaml +46 -0
  342. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/default.yaml +10 -0
  343. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/dockerfile.yaml +36 -0
  344. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/dot.yaml +29 -0
  345. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/elixir.yaml +30 -0
  346. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/elm.yaml +38 -0
  347. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/erb.yaml +42 -0
  348. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/erlang.yaml +45 -0
  349. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/fish.yaml +48 -0
  350. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/forth.yaml +34 -0
  351. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/fortran.yaml +64 -0
  352. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/freebsd-kernel.yaml +14 -0
  353. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/fsharp.yaml +48 -0
  354. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/gdscript.yaml +61 -0
  355. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/gemini.yaml +19 -0
  356. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/gentoo-ebuild.yaml +48 -0
  357. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/gentoo-etc-portage.yaml +23 -0
  358. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/git-commit.yaml +35 -0
  359. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/git-config.yaml +14 -0
  360. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/git-rebase-todo.yaml +19 -0
  361. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/gleam.yaml +69 -0
  362. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/glsl.yaml +26 -0
  363. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/gnuplot.yaml +15 -0
  364. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/go.yaml +62 -0
  365. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/godoc.yaml +17 -0
  366. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/golo.yaml +73 -0
  367. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/gomod.yaml +31 -0
  368. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/graphql.yaml +47 -0
  369. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/groff.yaml +30 -0
  370. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/groovy.yaml +111 -0
  371. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/haml.yaml +16 -0
  372. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/hare.yaml +52 -0
  373. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/haskell.yaml +52 -0
  374. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/hc.yaml +52 -0
  375. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/html.yaml +70 -0
  376. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/html4.yaml +25 -0
  377. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/html5.yaml +25 -0
  378. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/ini.yaml +23 -0
  379. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/inputrc.yaml +14 -0
  380. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/java.yaml +37 -0
  381. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/javascript.yaml +124 -0
  382. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/jinja2.yaml +19 -0
  383. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/json.yaml +39 -0
  384. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/jsonnet.yaml +92 -0
  385. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/julia.yaml +57 -0
  386. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/justfile.yaml +40 -0
  387. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/keymap.yaml +27 -0
  388. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/kickstart.yaml +16 -0
  389. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/kotlin.yaml +66 -0
  390. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/kvlang.yaml +67 -0
  391. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/ledger.yaml +14 -0
  392. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/lfe.yaml +17 -0
  393. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/lilypond.yaml +26 -0
  394. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/lisp.yaml +17 -0
  395. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/log.yaml +92 -0
  396. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/lua.yaml +111 -0
  397. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/mail.yaml +25 -0
  398. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/makefile.yaml +38 -0
  399. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/man.yaml +12 -0
  400. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/markdown.yaml +65 -0
  401. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/mc.yaml +23 -0
  402. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/meson.yaml +51 -0
  403. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/micro.yaml +34 -0
  404. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/mpdconf.yaml +13 -0
  405. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/msbuild.yaml +6 -0
  406. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/nanorc.yaml +16 -0
  407. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/nftables.yaml +30 -0
  408. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/nginx.yaml +22 -0
  409. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/nim.yaml +27 -0
  410. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/nix.yaml +32 -0
  411. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/nu.yaml +114 -0
  412. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/objc.yaml +60 -0
  413. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/ocaml.yaml +43 -0
  414. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/octave.yaml +83 -0
  415. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/odin.yaml +64 -0
  416. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/pascal.yaml +45 -0
  417. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/patch.yaml +14 -0
  418. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/peg.yaml +16 -0
  419. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/perl.yaml +58 -0
  420. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/php.yaml +60 -0
  421. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/pkg-config.yaml +12 -0
  422. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/po.yaml +12 -0
  423. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/pony.yaml +37 -0
  424. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/pov.yaml +21 -0
  425. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/privoxy-action.yaml +14 -0
  426. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/privoxy-config.yaml +10 -0
  427. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/privoxy-filter.yaml +12 -0
  428. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/proto.yaml +40 -0
  429. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/prql.yaml +84 -0
  430. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/puppet.yaml +22 -0
  431. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/python2.yaml +60 -0
  432. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/python3.yaml +80 -0
  433. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/r.yaml +32 -0
  434. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/raku.yaml +42 -0
  435. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/reST.yaml +18 -0
  436. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/renpy.yaml +15 -0
  437. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/rpmspec.yaml +43 -0
  438. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/ruby.yaml +73 -0
  439. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/rust.yaml +78 -0
  440. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/sage.yaml +60 -0
  441. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/scad.yaml +53 -0
  442. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/scala.yaml +33 -0
  443. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/sed.yaml +13 -0
  444. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/sh.yaml +69 -0
  445. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/sls.yaml +15 -0
  446. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/smalltalk.yaml +55 -0
  447. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/solidity.yaml +41 -0
  448. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/sql.yaml +35 -0
  449. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/stata.yaml +67 -0
  450. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/svelte.yaml +27 -0
  451. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/swift.yaml +103 -0
  452. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/systemd.yaml +16 -0
  453. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/tcl.yaml +18 -0
  454. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/terraform.yaml +87 -0
  455. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/tex.yaml +32 -0
  456. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/toml.yaml +56 -0
  457. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/twig.yaml +55 -0
  458. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/typescript.yaml +49 -0
  459. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/v.yaml +80 -0
  460. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/vala.yaml +26 -0
  461. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/verilog.yaml +60 -0
  462. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/vhdl.yaml +37 -0
  463. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/vi.yaml +31 -0
  464. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/vue.yaml +64 -0
  465. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/xml.yaml +37 -0
  466. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/xresources.yaml +14 -0
  467. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/yaml.yaml +34 -0
  468. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/yum.yaml +12 -0
  469. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/zig.yaml +52 -0
  470. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/zscript.yaml +72 -0
  471. package/initramfs/buninu/apps/jsmdcui/runtime/syntax/zsh.yaml +52 -0
  472. package/initramfs/buninu/apps/jsmdcui/single-exe/README.md +396 -0
  473. package/initramfs/buninu/apps/jsmdcui/single-exe/assetsHelper.js +371 -0
  474. package/initramfs/buninu/apps/jsmdcui/single-exe/assetsLoader.mjs +85 -0
  475. package/initramfs/buninu/apps/jsmdcui/single-exe/assetsPacker.js +218 -0
  476. package/initramfs/buninu/apps/jsmdcui/single-exe/compiled.js +498 -0
  477. package/initramfs/buninu/apps/jsmdcui/single-exe/entry.mjs +17 -0
  478. package/initramfs/buninu/apps/jsmdcui/single-exe/packAssets.sh +7 -0
  479. package/initramfs/buninu/apps/jsmdcui/src/MDCUI_DEFAULT_EDIT +0 -0
  480. package/initramfs/buninu/apps/jsmdcui/src/buffer/backup.js +165 -0
  481. package/initramfs/buninu/apps/jsmdcui/src/buffer/buffer.js +126 -0
  482. package/initramfs/buninu/apps/jsmdcui/src/buffer/fixed3-codec.js +140 -0
  483. package/initramfs/buninu/apps/jsmdcui/src/buffer/loc.js +38 -0
  484. package/initramfs/buninu/apps/jsmdcui/src/buffer/message.js +29 -0
  485. package/initramfs/buninu/apps/jsmdcui/src/build-args.js +40 -0
  486. package/initramfs/buninu/apps/jsmdcui/src/config/clean.js +172 -0
  487. package/initramfs/buninu/apps/jsmdcui/src/config/colorscheme.js +99 -0
  488. package/initramfs/buninu/apps/jsmdcui/src/config/config.js +125 -0
  489. package/initramfs/buninu/apps/jsmdcui/src/config/defaults.js +109 -0
  490. package/initramfs/buninu/apps/jsmdcui/src/cui/fence-events.mjs +144 -0
  491. package/initramfs/buninu/apps/jsmdcui/src/cui/heading-ids.mjs +1568 -0
  492. package/initramfs/buninu/apps/jsmdcui/src/cui/id-collision.mjs +111 -0
  493. package/initramfs/buninu/apps/jsmdcui/src/cui/identity.mjs +26 -0
  494. package/initramfs/buninu/apps/jsmdcui/src/cui/kitty-debug.mjs +25 -0
  495. package/initramfs/buninu/apps/jsmdcui/src/cui/kitty-images.mjs +280 -0
  496. package/initramfs/buninu/apps/jsmdcui/src/cui/kitty-mode.mjs +6 -0
  497. package/initramfs/buninu/apps/jsmdcui/src/cui/rerender-queue.mjs +66 -0
  498. package/initramfs/buninu/apps/jsmdcui/src/cui/rpc.mjs +1554 -0
  499. package/initramfs/buninu/apps/jsmdcui/src/cui/server.mjs +128 -0
  500. package/initramfs/buninu/apps/jsmdcui/src/cui/table-render.mjs +286 -0
  501. package/initramfs/buninu/apps/jsmdcui/src/cui/table-row-edit.mjs +226 -0
  502. package/initramfs/buninu/apps/jsmdcui/src/cui/task-checkbox.mjs +60 -0
  503. package/initramfs/buninu/apps/jsmdcui/src/cui/template-components.mjs +253 -0
  504. package/initramfs/buninu/apps/jsmdcui/src/cui/text-block-resize.mjs +177 -0
  505. package/initramfs/buninu/apps/jsmdcui/src/cui/tui-links.mjs +560 -0
  506. package/initramfs/buninu/apps/jsmdcui/src/display/ansi-style.js +60 -0
  507. package/initramfs/buninu/apps/jsmdcui/src/highlight/highlighter.js +243 -0
  508. package/initramfs/buninu/apps/jsmdcui/src/highlight/parser.js +225 -0
  509. package/initramfs/buninu/apps/jsmdcui/src/index.js +9586 -0
  510. package/initramfs/buninu/apps/jsmdcui/src/lua/engine.js +68 -0
  511. package/initramfs/buninu/apps/jsmdcui/src/platform/archive.js +50 -0
  512. package/initramfs/buninu/apps/jsmdcui/src/platform/clipboard.js +278 -0
  513. package/initramfs/buninu/apps/jsmdcui/src/platform/commands.js +221 -0
  514. package/initramfs/buninu/apps/jsmdcui/src/platform/terminal.js +5 -0
  515. package/initramfs/buninu/apps/jsmdcui/src/plugins/js-bridge.js +3377 -0
  516. package/initramfs/buninu/apps/jsmdcui/src/plugins/manager.js +674 -0
  517. package/initramfs/buninu/apps/jsmdcui/src/runtime/encodings.js +10 -0
  518. package/initramfs/buninu/apps/jsmdcui/src/runtime/registry.js +134 -0
  519. package/initramfs/buninu/apps/jsmdcui/src/screen/cell-buffer.js +81 -0
  520. package/initramfs/buninu/apps/jsmdcui/src/screen/events.js +263 -0
  521. package/initramfs/buninu/apps/jsmdcui/src/screen/screen.js +249 -0
  522. package/initramfs/buninu/apps/jsmdcui/src/screen/vt100.js +571 -0
  523. package/initramfs/buninu/apps/jsmdcui/src/shell/shell.js +70 -0
  524. package/initramfs/buninu/apps/jsmdcui/testapp.md +78 -0
  525. package/initramfs/buninu/apps/jsmdcui/tests/assets-helper.test.js +150 -0
  526. package/initramfs/buninu/apps/jsmdcui/tests/backup.test.js +158 -0
  527. package/initramfs/buninu/apps/jsmdcui/tests/cat-markdown.test.js +139 -0
  528. package/initramfs/buninu/apps/jsmdcui/tests/cdp-security.test.js +32 -0
  529. package/initramfs/buninu/apps/jsmdcui/tests/cdp-websocket-test.html +46 -0
  530. package/initramfs/buninu/apps/jsmdcui/tests/cmphex3b64.js +95 -0
  531. package/initramfs/buninu/apps/jsmdcui/tests/compiled-runtime.test.js +139 -0
  532. package/initramfs/buninu/apps/jsmdcui/tests/config-settings.test.js +52 -0
  533. package/initramfs/buninu/apps/jsmdcui/tests/demo.test.js +448 -0
  534. package/initramfs/buninu/apps/jsmdcui/tests/docs-sync.test.js +14 -0
  535. package/initramfs/buninu/apps/jsmdcui/tests/fence-events.test.js +1293 -0
  536. package/initramfs/buninu/apps/jsmdcui/tests/heading-ids.test.js +559 -0
  537. package/initramfs/buninu/apps/jsmdcui/tests/heading-list-selector.test.js +2393 -0
  538. package/initramfs/buninu/apps/jsmdcui/tests/id-collision.test.js +514 -0
  539. package/initramfs/buninu/apps/jsmdcui/tests/jmigt.js +16 -0
  540. package/initramfs/buninu/apps/jsmdcui/tests/js-plugin-prompts.test.js +110 -0
  541. package/initramfs/buninu/apps/jsmdcui/tests/key-event.md +10 -0
  542. package/initramfs/buninu/apps/jsmdcui/tests/kitty-demo.md +184 -0
  543. package/initramfs/buninu/apps/jsmdcui/tests/kitty-images.test.js +288 -0
  544. package/initramfs/buninu/apps/jsmdcui/tests/kitty-mode.test.js +14 -0
  545. package/initramfs/buninu/apps/jsmdcui/tests/platform-commands.test.js +18 -0
  546. package/initramfs/buninu/apps/jsmdcui/tests/platform-terminal.test.js +8 -0
  547. package/initramfs/buninu/apps/jsmdcui/tests/pty-demo.js +492 -0
  548. package/initramfs/buninu/apps/jsmdcui/tests/rerender-queue.test.js +130 -0
  549. package/initramfs/buninu/apps/jsmdcui/tests/table-render.test.js +150 -0
  550. package/initramfs/buninu/apps/jsmdcui/tests/table-row-edit.test.js +138 -0
  551. package/initramfs/buninu/apps/jsmdcui/tests/task-checkbox.test.js +33 -0
  552. package/initramfs/buninu/apps/jsmdcui/tests/template-components.test.js +422 -0
  553. package/initramfs/buninu/apps/jsmdcui/tests/text-block-resize.test.js +222 -0
  554. package/initramfs/buninu/apps/jsmdcui/tests/textarea.md +8 -0
  555. package/initramfs/buninu/apps/jsmdcui/tests/tui-links.test.js +298 -0
  556. package/initramfs/buninu/apps/jsmdcui/tests/wui-responsive-images.test.js +60 -0
  557. package/initramfs/buninu/apps/jsmdcui/tests/wui.test.js +108 -0
  558. package/initramfs/buninu/apps/jsmdcui/tests/wv-client.js +96 -0
  559. package/initramfs/buninu/apps/jsmdcui/tui +7 -0
  560. package/initramfs/buninu/apps/jsmdcui/wui +9 -0
  561. package/initramfs/buninu/apps/musl-la/LICENSES/GPL-3.0.txt +674 -0
  562. package/initramfs/buninu/apps/musl-la/LICENSES/gcc_runtime_exception.txt +73 -0
  563. package/initramfs/buninu/apps/musl-la/LICENSE_musl.txt +193 -0
  564. package/initramfs/buninu/apps/musl-la/NOTICE +41 -0
  565. package/initramfs/buninu/apps/musl-la/ld-musl-aarch64.so.1 +0 -0
  566. package/initramfs/buninu/apps/musl-la/libgcc_s.so.1 +0 -0
  567. package/initramfs/buninu/apps/musl-la/libstdc++.so.6 +0 -0
  568. package/initramfs/buninu/apps/musl-la/musl-la.sh +36 -0
  569. package/initramfs/buninu/apps/native-bridge/native-bridge.js +199 -0
  570. package/initramfs/buninu/apps/native-bridge/package.json +8 -0
  571. package/initramfs/buninu/apps/tts/tts.js +214 -0
  572. package/initramfs/buninu/apps/xclip/xclip.js +121 -0
  573. package/initramfs/buninu/apps/xdg-open/xdg-open.js +151 -0
  574. package/initramfs/buninu/bin/bun.bat +37 -0
  575. package/initramfs/buninu/bin/bun.sh +57 -0
  576. package/initramfs/buninu/bin/buninu-help.bat +4 -0
  577. package/initramfs/buninu/bin/buninu-help.sh +7 -0
  578. package/initramfs/buninu/bin/bunmsh.bat +3 -0
  579. package/initramfs/buninu/bin/bunmsh.sh +5 -0
  580. package/initramfs/buninu/bin/bunx.bat +3 -0
  581. package/initramfs/buninu/bin/glow.bat +3 -0
  582. package/initramfs/buninu/bin/glow.sh +5 -0
  583. package/initramfs/buninu/bin/init.js +779 -0
  584. package/initramfs/buninu/bin/install.js +570 -0
  585. package/initramfs/buninu/bin/jmi.bat +3 -0
  586. package/initramfs/buninu/bin/jmi.sh +5 -0
  587. package/initramfs/buninu/bin/jsgotty.bat +3 -0
  588. package/initramfs/buninu/bin/jsgotty.sh +5 -0
  589. package/initramfs/buninu/bin/jsmdcui.bat +11 -0
  590. package/initramfs/buninu/bin/libsh-loader.c +135 -0
  591. package/initramfs/buninu/bin/libsh-loader.so +0 -0
  592. package/initramfs/buninu/bin/multicall.sh +103 -0
  593. package/initramfs/buninu/bin/native-bridge.bat +3 -0
  594. package/initramfs/buninu/bin/rz.bat +3 -0
  595. package/initramfs/buninu/bin/rz.sh +5 -0
  596. package/initramfs/buninu/bin/shc.js +5 -0
  597. package/initramfs/buninu/bin/showimg.bat +3 -0
  598. package/initramfs/buninu/bin/showimg.sh +5 -0
  599. package/initramfs/buninu/bin/switch_to_android.sh +9 -0
  600. package/initramfs/buninu/bin/switch_to_linux.sh +7 -0
  601. package/initramfs/buninu/bin/sz.bat +3 -0
  602. package/initramfs/buninu/bin/sz.sh +5 -0
  603. package/initramfs/buninu/bin/tts.bat +3 -0
  604. package/initramfs/buninu/bin/xclip.bat +3 -0
  605. package/initramfs/buninu/bin/xdg-open.bat +3 -0
  606. package/initramfs/buninu/demo-server.js +64 -0
  607. package/initramfs/buninu/icon.png +0 -0
  608. package/initramfs/buninu/package.json +59 -0
  609. package/initramfs/etc/resolv.conf +1 -0
  610. package/initramfs/init.js +339 -0
  611. package/initramfs/lib/ld-musl-x86_64.so.1 +0 -0
  612. package/initramfs/lib/libc.musl-x86_64.so.1 +0 -0
  613. package/initramfs/lib/libgcc_s.so.1 +0 -0
  614. package/initramfs/lib/libstdc++.so.6 +0 -0
  615. package/initramfs/usr/bin/env +7 -0
  616. package/package.json +42 -0
  617. package/run-qemu.sh +44 -0
  618. package/scripts/fetch.sh +26 -0
  619. package/scripts/pack-initramfs.sh +41 -0
  620. package/test/build-init-bootstrap.sh +23 -0
  621. package/test/init-bootstrap.c +55 -0
@@ -0,0 +1,1161 @@
1
+ # Buninu
2
+
3
+ **BUNinu Is Not Unix** 🐮
4
+
5
+ **幫你牛** 🐂 ・ **Bunに入魂** 🔥
6
+
7
+ ![icon](https://raw.githubusercontent.com/jjtseng93/buninu/main/icon.png)
8
+
9
+ Buninu is a portable, self-bootstrapping Unix-like userspace built on Bun. One
10
+ command gives you a working shell — in a browser tab, or straight in the
11
+ terminal you are already in — on Android, Linux, Windows, and macOS, with
12
+ nothing to compile and nothing installed system-wide.
13
+
14
+ ```sh
15
+ npx buninu
16
+ ```
17
+
18
+ > **Status:** Buninu is still under active development. The browser
19
+ > terminal, the install-and-update flow, and the bundled commands are the
20
+ > settled parts — Android and Linux first, with Windows working the same way
21
+ > and macOS support newer. Still moving: `package.json` settings and
22
+ > command-line flags can change between releases, and the local shell
23
+ > (`--local`, bunmsh) has no job control yet, so use the browser terminal when
24
+ > you need to background a job.
25
+
26
+ - Source: [github.com/jjtseng93/buninu](https://github.com/jjtseng93/buninu)
27
+
28
+ - Core components:
29
+ * [jsgotty](https://github.com/jjtseng93/js-gotty): Remote shell from a Browser or Terminal
30
+ * [jsmdcui](https://github.com/jjtseng93/jsmdcui): Both a text editor and
31
+ Markdown execution runtime (not static rendering), based on
32
+ [bunmicro](https://github.com/jjtseng93/bunmicro)
33
+ * [bunmsh](https://github.com/jjtseng93/bunmsh): Bun Modern Shell — a
34
+ dependency-free, mksh-inspired command shell with a JavaScript mode, and
35
+ builtins that answer the same way on Windows as on POSIX systems
36
+
37
+ - [Why Buninu exists](#why)
38
+ - [Table of contents](#contents)
39
+ - [ARCHITECTURE.md](ARCHITECTURE.md): the complete architecture, portability
40
+ model, and self-bootstrapping design
41
+ - [Commands inside the shell](#commands-inside-the-shell): the reference for a
42
+ session you are already in
43
+
44
+ ## Install Bun
45
+
46
+ Buninu requires [Bun](https://bun.com). On Android, install Bun in Termux:
47
+
48
+ ```sh
49
+ npm install -g bun
50
+ ```
51
+
52
+ - On Linux, Windows, and macOS, follow the
53
+ [official Bun installation guide](https://bun.com/docs/installation).
54
+ * macOS support is currently experimental
55
+
56
+ ## Start
57
+
58
+ ### Start a remote shell in a Browser
59
+
60
+ To try it, run the npm package. This runs Buninu from the `npx` cache, which
61
+ is a fine place to look around in and a bad place to keep anything:
62
+
63
+ ```sh
64
+ npx buninu
65
+ ```
66
+
67
+ To keep it, install it somewhere of your own first, and start it from there
68
+ from then on. That directory becomes `BUNINU_HOME`: the installation's own
69
+ root, yours to edit and to carry to another machine. See
70
+ [Install and update](#install-and-update):
71
+
72
+ ```sh
73
+ # Creates ~/somewhere/buninu, which is now BUNINU_HOME
74
+ npx buninu --install ~/somewhere
75
+
76
+ # Start it from there from now on
77
+ bun ~/somewhere/buninu/bin/init.js
78
+ ```
79
+
80
+ Or run it from a source checkout:
81
+
82
+ ```sh
83
+ bun ./bin/init.js
84
+ ```
85
+
86
+ The launcher automatically chooses a free TCP port and detects an available
87
+ shell for the current platform. Other arguments are forwarded to jsgotty:
88
+
89
+ ```sh
90
+ # Serve on port 9000 instead of picking a free one
91
+ npx buninu --port 9000
92
+
93
+ # Ask for a username and password before handing over the terminal
94
+ npx buninu --credential user:pass
95
+
96
+ # Accept connections from other machines, not just this one. By default the
97
+ # terminal is reachable only from the computer it runs on; this opens it to
98
+ # anything that can reach this machine over the network, and the terminal is
99
+ # a working shell, so give it a password at the same time.
100
+ npx buninu -a 0.0.0.0 --credential user:pass
101
+ ```
102
+
103
+ Read [Security](#security) before using that last one.
104
+
105
+ Buninu's own options are listed under
106
+ [Command-line usage](#command-line-usage).
107
+
108
+ ### Start a local shell in a Terminal (experimental)
109
+
110
+ Drops you straight into [bunmsh](apps/bunmsh/README.md) (Bun Modern Shell), a
111
+ dependency-free, mksh-inspired command shell that runs on Bun, without going
112
+ through the browser/jsgotty flow.
113
+
114
+ It is marked experimental for one reason above the rest: bunmsh has no job
115
+ control yet. There is no `jobs`, `bg` or `fg`, and no suspending a command
116
+ that is already running — a foreground command holds the terminal until it
117
+ finishes on its own. Everything else a session needs is there: pipelines and
118
+ redirection, functions and compound commands, history, completion with ghost
119
+ suggestions, and a JavaScript mode. Reach for the browser terminal when you
120
+ need to park a job and come back to it.
121
+
122
+ To try it:
123
+
124
+ ```sh
125
+ npx buninu --local
126
+ ```
127
+
128
+ To keep it, install it the same way as above and pass `--local` to the
129
+ installed copy from then on. See [Install and update](#install-and-update):
130
+
131
+ ```sh
132
+ # Creates ~/somewhere/buninu, which is now BUNINU_HOME
133
+ npx buninu --install ~/somewhere
134
+
135
+ # Start bunmsh from there from now on
136
+ bun ~/somewhere/buninu/bin/init.js --local
137
+ ```
138
+
139
+ Command history is kept in your own home directory either way, so it survives
140
+ `npx`. What does not is anything you add to the installation itself — commands
141
+ of your own under `apps/`, edits to its `.bashrc` — since that lives in the
142
+ package, and under `npx` the package is a cache directory.
143
+ See [Data & Persistence](#data--persistence).
144
+
145
+ Or run it from a source checkout:
146
+
147
+ ```sh
148
+ bun ./bin/init.js --local
149
+ ```
150
+
151
+ Buninu's own tools (`glow`, `jmi`, `xclip`, `tts`, `xdg-open`, etc.) stay
152
+ available inside this shell too, same as in the browser session.
153
+
154
+ Unlike the shells the browser terminal starts, **bunmsh does not read
155
+ `.bashrc`**. It does not claim complete POSIX behavior yet, so a startup file
156
+ written for a full shell can fail part way through — and a startup file that
157
+ fails is a shell you cannot get into. Nothing is read automatically until that
158
+ is no longer a risk. Source it yourself when you want it:
159
+
160
+ ```sh
161
+ . ./.bashrc
162
+ ```
163
+
164
+ The shell starts in `BUNINU_HOME`, so that path works as written at first;
165
+ after moving elsewhere, use `. "$BUNINU_HOME/.bashrc"`.
166
+
167
+ There is no setting that does this for you yet, and
168
+ [`buninu.command`](#startup-command-optional) is not it:
169
+ `--local` does not run it at all, and the browser terminal, which does, runs it
170
+ in a subshell before starting a fresh shell — so aliases and functions a
171
+ startup command defines are gone by the time you reach a prompt either way.
172
+ Until bunmsh reads a startup file of its own, sourcing it by hand is the way.
173
+
174
+ ## Security
175
+
176
+ **Buninu (when starting a remote shell) binds its terminal server to `127.0.0.1`**, so out of the box it
177
+ only accepts connections from the machine it runs on. It is not reachable from
178
+ other devices on the network unless you explicitly opt in.
179
+
180
+ Within that machine, the terminal is writable (`-w`) and unauthenticated by
181
+ default: only the loopback binding and jsgotty's random URL path (`-r`) stand
182
+ between a local process and a shell with Buninu's permissions.
183
+
184
+ To listen on another interface, pass `--address <value>` (see
185
+ [Start](#start)). Arguments you give on the command line override the defaults
186
+ the package ships in its `scripts.start` entry, the loopback binding included,
187
+ so **pass `--credential user:pass` at the same time** — a random port and URL
188
+ path are not a substitute for authentication once the server is reachable from
189
+ outside the machine.
190
+
191
+ ## Command-line usage
192
+
193
+ These are flags to `bin/init.js` itself, resolved before Buninu starts.
194
+ Everything else on the command line is forwarded to jsgotty.
195
+
196
+ ```text
197
+ Init options:
198
+ --local
199
+ Start Buninu in this terminal
200
+ instead of a Remote Shell
201
+ reached from a browser
202
+ (via jsgotty, the default)
203
+
204
+ -h, --help
205
+ Show this help and exit
206
+ -V, --version
207
+ Show version & runtime info, then exit
208
+
209
+ --readme
210
+ Render README.md in the terminal and exit
211
+ --changelog
212
+ Render CHANGELOG.md in the terminal and exit
213
+
214
+ --readme-tui
215
+ Open README.md as a Terminal UI
216
+ --readme-wui
217
+ Serve README.md as a Web UI
218
+
219
+ --export [output.tgz]
220
+ Export this Buninu installation
221
+ (default: ./buninu.tgz)
222
+
223
+ --export-config [output.json]
224
+ Export Buninu's package.json
225
+ (default: ./buninu.json)
226
+
227
+ Install options:
228
+ -i, --install [dir]
229
+ Install this package into <dir>/buninu
230
+ (default: .)
231
+
232
+ -si, --strip-install [dir]
233
+ Install into <dir> directly
234
+ Without a top-level directory of its own
235
+
236
+ (--install --help for full options)
237
+
238
+ Remote Shell options:
239
+ --shell <path|name>
240
+ Override buninu.shell for this run
241
+ --command <command>
242
+ Override buninu.command for this run
243
+ ```
244
+
245
+ `--local` is the one flag here that changes what Buninu starts rather than
246
+ what it reports; [Start a local shell in a
247
+ Terminal](#start-a-local-shell-in-a-terminal-experimental) covers what that
248
+ session can and cannot do, and [Start](#start) covers the browser route it
249
+ replaces.
250
+
251
+ `--readme-tui` and `--readme-wui` hand README.md to jsmdcui, so its headings
252
+ and its table of contents become links you can follow rather than text you
253
+ scroll past — the first in this terminal, the second at a URL it prints for a
254
+ browser. Opening a Markdown file that way makes jsmdcui write five generated
255
+ files beside it, so Buninu copies README.md into a directory under `TMPDIR`
256
+ first and runs it there: an installation stays yours, and nothing generated
257
+ ends up in an `--export` or outliving an update.
258
+
259
+ `--export` and `--export-config` are described under [Export](#export), which
260
+ also covers what an archive made through `npx` contains and what one made from
261
+ your own installation does instead.
262
+
263
+ `--install --help` lists the install options in full, including `--force` and
264
+ `--yes`; see [Install and update](#install-and-update) for what an update does
265
+ with files you changed.
266
+
267
+ `--shell` and `--command` override for one run what
268
+ [Shell selection](#shell-selection-optional) and
269
+ [Startup command](#startup-command-optional) set in `package.json`.
270
+
271
+ ### Launching a bundled app directly
272
+
273
+ As the **first** argument, `--jsgotty`, `--jsmdcui`, `--bunmsh`, or `--musl-la`
274
+ bypasses the shell and startup-command flow entirely: it spawns that app with
275
+ every remaining argument forwarded to it, and exits with its exit code.
276
+
277
+ ```text
278
+ --jsgotty [args...]
279
+ Spawn jsgotty directly,
280
+ forwarding remaining arguments,
281
+ and exit with its exit code
282
+ (--jsgotty --help = jsgotty options)
283
+
284
+ --jsmdcui [args...]
285
+ Spawn jsmdcui directly,
286
+ same forwarding behavior
287
+
288
+ --bunmsh [args...]
289
+ Spawn bunmsh directly,
290
+ same forwarding behavior
291
+
292
+ --musl-la [args...]
293
+ Spawn musl-la directly,
294
+ same forwarding behavior
295
+ ```
296
+
297
+ Use it to reach an app's own options, which Buninu would otherwise interpret
298
+ as its own — `npx buninu --jsgotty --help` shows jsgotty's flag reference
299
+ rather than this one.
300
+
301
+ ## Commands inside the shell
302
+
303
+ Once you are inside a running Buninu shell, these are available (the
304
+ validated source list is `apps/cmdlist`; see [Add a command](#add-a-command)
305
+ for how it works):
306
+
307
+ ---
308
+
309
+ - **Bun Modern Shell & its builtins**
310
+ * `bunmsh` — Bun Modern Shell supports multi-tabs cwd
311
+ * `catfancy` — Pretty print a file with JSON, YAML, TOML, Markdown and JS/TS colored
312
+ * `lsfancy` — List a directory with emoji, aware of the terminal width
313
+ * `serve` — Serve a directory over HTTP
314
+ * `curl` — Fetch an HTTP URL or download it to a file, built on Bun's `fetch`
315
+ * `pspa` / `pspac` — List processes, plain or colored as shell syntax
316
+ * `kill` — Signal a process, on Windows as well as POSIX
317
+
318
+ Everything below `bunmsh` is one of its builtins, so they are there once you
319
+ are inside a bunmsh session, and every one of them documents itself with
320
+ `--help`. From any other shell, reach them with
321
+ `bunmsh -cc builtin <name> argv1 argv2 ...`.
322
+
323
+ ---
324
+
325
+ - **Markdown applications**
326
+ * `jsmdcui` — Run interactive Markdown applications in both TUI & WebUI
327
+ * `jsmdcui --demo-reader` — Text-to-speech ebook reader
328
+ * `jsmdcui --demo-imgtool` — Image processor with table-based UI based on `Bun.Image`
329
+ * `jsmdcui --demo-imgtool-zh` — The same processor in Traditional Chinese
330
+ * `jsmdcui --demo-maze` — Maze game
331
+ * `jsmdcui --cdp-maze` — The same maze game, started with a local Chrome DevTools
332
+ Protocol server and solved by the bundled solver three seconds later
333
+
334
+ ---
335
+
336
+ - **Editing and viewing**
337
+ * `jmi` — Edit files in the js micro editor
338
+ * `glow` — View file contents with syntax highlighting
339
+ * `bun pm diff ./dir1 ./dir2` — diff 2 folders
340
+ + Can also diff against npm registry packages
341
+
342
+ ---
343
+
344
+ - **Terminal and file transfer**
345
+ * `jsgotty` — Run a browser-accessible terminal
346
+ * `showimg` — Show an image in the terminal
347
+ * `rz` — Upload a file over ZMODEM
348
+ * `sz` — Download a file over ZMODEM
349
+
350
+ These three work in the browser route, a minapk WebView included, but not
351
+ necessarily under `--local`: they speak the Kitty graphics protocol and
352
+ ZMODEM, which a plain terminal emulator need not support. They are
353
+ equivalent to `jsgotty --viu`, `--rz` and `--sz`.
354
+
355
+ ---
356
+
357
+ - **System integration**
358
+ * `xclip` — X11-style clipboard tool; `-selection clipboard`/`-clip` bridges
359
+ to the system clipboard
360
+ * `tts` — Speak text and wait for it to finish (`-a` to not wait)
361
+ * `xdg-open` — Open a file or URL with the platform's default handler
362
+ * `native-bridge` — Call the Android host app (toast, clipboard, speak,
363
+ WebViews) over `PKG_BRIDGE_SOCK`
364
+
365
+ ---
366
+
367
+ - **Running programs**
368
+ * `bun` — Run the bundled Bun, falling back to one already on `PATH`
369
+ * `bunx` — Globally install a package with bun, then exec its matching binary
370
+ * `musl-la` — Launch AArch64 ELF programs with the bundled musl loader
371
+
372
+ ---
373
+
374
+ - **Help**
375
+ * `buninu-help` — Render README.md with glow, then show icon.png with `showimg`
376
+
377
+ ### Details for the above commands
378
+
379
+ `rz [target-dir]` (upload into `target-dir`, default: cwd) and `sz <file>
380
+ [more files...]` (download one or more files) are thin `bin/`-only wrappers
381
+ around `apps/jsgotty/rz.js`/`sz.js`, transferring files over ZMODEM through
382
+ the same terminal connection jsgotty already renders in a browser or WebView.
383
+
384
+ ---
385
+
386
+ `xclip [-o] [-selection primary|clipboard] [-clip]` is a small X11-`xclip`-
387
+ compatible clipboard tool. `-selection primary` (the default) never touches
388
+ the system clipboard, matching real X11 semantics. `-selection
389
+ clipboard`/`-clip` reaches the real system clipboard on Android, macOS,
390
+ Windows, and Linux/Wayland. jsmdcui picks this up automatically once it's on
391
+ `PATH`, so its middle-click paste and copy/paste commands just work.
392
+
393
+ ---
394
+
395
+ `tts <text> [-f|--flush] [-a|--async] [--timeout <ms>] [--pitch <n>]
396
+ [--speed <n>]` speaks text and, by default, blocks until it finishes — no
397
+ timeout unless you pass `--timeout`. Works on Android, macOS, Windows, and
398
+ Linux (via espeak-ng/espeak). `--pitch`/`--speed` fall back to
399
+ `$TTS_PITCH`/`$TTS_SPEED` when not given explicitly, so jsmdcui's own
400
+ pitch/speed setting is honored automatically.
401
+
402
+ ---
403
+
404
+ `glow` and `jmi` are the same program under two names: both run the bundled
405
+ jsmdcui, `glow` with its `--cat` mode, which renders a file to stdout and
406
+ exits, and `jmi` with no mode of its own, which opens the editor because this
407
+ jsmdcui is configured editor-first through `MDCUI_DEFAULT_EDIT`. Neither is
408
+ the Go program called glow — `glow --help` and `jmi --help` both print
409
+ jsmdcui's own reference, and jsmdcui's options are the ones that apply.
410
+
411
+ ---
412
+
413
+ `bun` is the installation's own Bun rather than whatever the machine has. On
414
+ Android it runs `androidNativeLibs/libbun.so` when an APK supplies one;
415
+ otherwise it picks the binary for the machine — `bun-la`, `bun-lx`, or
416
+ `bun-wx.exe` — and extracts it from `apps/bun/bunBin.tgz` first whenever that
417
+ archive is newer than the binary already sitting there. Only when none of
418
+ those is available does it fall back to a Bun on `PATH`, skipping its own
419
+ directory on the way so the `bun` symlink beside it cannot call itself. This
420
+ is what lets an installation carry the runtime it needs with it.
421
+
422
+ ---
423
+
424
+ `bunx <package>[@version] [args...]` installs with `bun i -g` and runs the
425
+ matching binary. On Android, the underlying `bun i -g` currently needs
426
+ [oven-sh/bun#39084](https://github.com/oven-sh/bun/pull/39084) merged
427
+ upstream — without it, install is killed by SIGSYS (Android's seccomp policy
428
+ rejects a syscall bin-linking uses), so `bunx` can't install anything there yet.
429
+
430
+ ---
431
+
432
+ `buninu-help` renders README.md with `jmi`'s `--cat` mode — the same rendering
433
+ `glow` gives — and then shows `icon.png` with `showimg`. It is the command the
434
+ default startup greeting points to.
435
+
436
+ Reach that mode as `jmi --cat` or as plain `glow`, not as `jsmdcui --cat`. The
437
+ `jsmdcui` launcher routes any `.md` argument into the Markdown UI, and opening
438
+ a file that way writes five generated files beside it rather than only
439
+ printing it.
440
+
441
+ ---
442
+
443
+ `musl-la [-e] <program> [args...]` runs an AArch64 Linux ELF program through
444
+ the bundled musl loader, which is what lets a binary built against musl run
445
+ inside a Buninu session. It is AArch64-only, as its suffix says — see
446
+ [Platform-specific binaries](#platform-specific-binaries) — and the loader it
447
+ uses is the APK's `libld-musl.so` when one is present, or
448
+ `apps/musl-la/ld-musl-aarch64.so.1` otherwise.
449
+
450
+ The library path is assembled for you. `musl-la` scans its arguments for the
451
+ first file whose leading four bytes are the ELF magic number, and puts that
452
+ file's own directory on the search path along with `apps/musl-la/` and
453
+ anything already in `LD_LIBRARY_PATH` — so a program with its shared objects
454
+ beside it needs no setup. That path normally reaches the loader as
455
+ `--library-path`; pass `-e` as the first argument to export it as
456
+ `LD_LIBRARY_PATH` instead, which is what a program that goes on to exec
457
+ something else of its own needs.
458
+
459
+ ---
460
+
461
+ `xdg-open <file-or-url>` hands a file or URL to whatever the platform treats
462
+ as its default handler: the host app through native-bridge on Android (or
463
+ `termux-open` under plain Termux), `open` on macOS, `start` on Windows, and
464
+ the real system `xdg-open` on Linux.
465
+
466
+ Inside minapk's APK, `MINAPK_WEBVIEW` redirects that: set it to a WebView id
467
+ and a URL is loaded into that WebView and brought to the front (`openWebView`
468
+ then `showWebView`) instead of being handed to the system's default handler.
469
+
470
+ ```sh
471
+ # In the app WebView, on screen
472
+ MINAPK_WEBVIEW=1 xdg-open https://example.com
473
+
474
+ # ...or for the whole session
475
+ export MINAPK_WEBVIEW=1
476
+ ```
477
+
478
+ `0` is the console, so it navigates the terminal page away — the back key
479
+ returns to it and jsgotty reconnects, but it is not usually what you want.
480
+ `-1` is whichever WebView is in front. Only URLs are redirected: a file path
481
+ always goes to the host's own handler, since WebView cannot read a `file://`
482
+ URL under Buninu's home (`setAllowFileAccess` is false from API 30 on) while
483
+ the host serves that same file through its content:// provider. A value that
484
+ is not a plain integer is reported on stderr and ignored rather than guessed
485
+ at, an unset or empty value keeps the default behavior, and a WebView the host
486
+ does not have falls back to the default handler after saying so.
487
+
488
+ ---
489
+
490
+ `native-bridge [func] [args...]` calls into the Android host app that
491
+ [minapk](https://github.com/jjtseng93/minapk) built the running
492
+ APK with, over an abstract-namespace unix socket. A bare `native-bridge`
493
+ lists what the host implements. Every call
494
+ times out after 5 seconds instead of hanging; outside such an APK, every call
495
+ fails with a clear error instead of doing nothing silently. `import { toast,
496
+ clipboardRead, clipboardWrite, speak, ttsStatus, openWebView, evalWebView,
497
+ showWebView, currWebView, call, available } from
498
+ "apps/native-bridge/native-bridge.js"` gives the same functions as a library,
499
+ for use from a `js back` block.
500
+
501
+ `openWebView(id, url)`, `evalWebView(id, js)`, `showWebView(id)` and
502
+ `currWebView()` (short: `openwv`, `evalwv`, `showwv`, `currwv`) drive the host
503
+ app's WebViews. There are exactly two, both
504
+ alive from startup and neither ever created nor closed at runtime: id `0` is
505
+ the console — the jsgotty terminal this shell is rendered in — and id `1` is
506
+ the app WebView, which starts out blank and behind. Anywhere an id is taken,
507
+ `-1` means whichever WebView is in front right now.
508
+
509
+ `openWebView` loads a URL *without* bringing that WebView to the front, so
510
+ loading the app WebView while the user keeps looking at the terminal is one
511
+ call. `showWebView` is the only thing that changes what is on screen; the
512
+ host's on-screen key bar (Ctrl/Alt/Shift and friends), its volume-key menu and
513
+ its back key all act on whichever WebView is in front, so they follow the
514
+ switch. Back on the app WebView with no page of its own to go back to
515
+ switches to the console rather than leaving the app, unless
516
+ `buninu.backToConsole` says otherwise (see "Back key" below).
517
+ `showWebView(-1)` switches to the next WebView instead of being a no-op --
518
+ with two of them, a toggle. `evalWebView` resolves to the value the
519
+ expression produced, not a string containing it; `undefined`, a function, and
520
+ a thrown exception all arrive as `null`, since WebView itself does not
521
+ distinguish them.
522
+
523
+ All four also answer to a short `openwv`/`evalwv`/`showwv`/`currwv` spelling,
524
+ the same way `clipboardRead`/`clipboardWrite` answer to `getcb`/`setcb`: the
525
+ host accepts either and lists both in its `_discover` response, so either name
526
+ works from the CLI, from `rpcraw`, and as an `import`.
527
+
528
+ ```sh
529
+ # Load it, screen unchanged
530
+ native-bridge openwv 1 https://example.com
531
+
532
+ # Now bring it to the front
533
+ native-bridge showwv 1
534
+
535
+ native-bridge evalwv 1 document.title
536
+ native-bridge currwv
537
+ ```
538
+
539
+ ## Differences from upstream
540
+
541
+ The versions of jsmdcui and jsgotty bundled here differ from the ones their
542
+ own projects ship.
543
+
544
+ ### The bundled jsmdcui
545
+
546
+ * Is configured editor-first by `MDCUI_DEFAULT_EDIT`
547
+ * The command `jmi` with a Markdown file opens the normal terminal editor
548
+ (js micro editor)
549
+ * The command `jsmdcui` preserves its original behavior:
550
+ `apps/jsmdcui/jsmdcui.sh`, which starts its `tui` entry point with
551
+ `--mdcui` when running Markdown apps, and forwards all command-line
552
+ arguments
553
+ * Adds the Buninu-only `# syntax: markdown` marker for Markdown highlighting
554
+ in extensionless files; upstreaming may be considered later
555
+
556
+ ### The bundled jsgotty
557
+
558
+ * No longer depends on or ships `node-pty`
559
+ * Its PTY is provided by Bun's terminal API
560
+
561
+ ## Optional external tools
562
+
563
+ `bunproot` is an optional tool downloaded by the user through `bunx` and is
564
+ licensed under GPL-2.0-or-later; `js-udocker` is licensed under Apache-2.0.
565
+ Neither is distributed with Buninu.
566
+
567
+ - `bunproot --git clone` should be cross-platform
568
+ * Tested on Android, Linux, and Windows
569
+ * If git clone fails, try `bun pm cache rm`
570
+ * This `bunproot --git` also supports many other subcommands. Show them by `--git --help`
571
+ - The container example below is Android-only.
572
+
573
+ ```sh
574
+ bunx bunproot
575
+ bunx bunproot --git clone https://github.com/jjtseng93/bunproot
576
+ bunx bunproot --git clone https://github.com/jjtseng93/js-udocker
577
+ cd js-udocker
578
+ export JS_UDOCKER_BUNPROOT=$(realpath ../bunproot/proot.js)
579
+ bun udocker.js run --name=ap alpine
580
+ # bun udocker.js ps
581
+ ```
582
+
583
+ ## Data & Persistence
584
+
585
+ Running Buninu via `npx` works like a container: `npx` fetches the package into
586
+ a cache directory and runs it from there, which is fine as a temporary working
587
+ directory but isn't guaranteed to survive between runs — version bumps,
588
+ `npx clear-npx-cache`, or normal cache eviction can all wipe it. That directory
589
+ is where the shell starts, so nothing left sitting in it is safe.
590
+
591
+ The answer is to stop running it from there: [install it](#install-and-update)
592
+ into a directory of your own, and `BUNINU_HOME` becomes somewhere you can keep
593
+ things, edit files in, and carry to another machine.
594
+
595
+ Once it is installed, files you leave in `BUNINU_HOME` are safe, updates
596
+ included — an update only adds and overwrites the package's own files and
597
+ never deletes anything else. Your own home directory is untouched and still
598
+ reachable as `~`, so work you would rather keep separate from Buninu, or that
599
+ is too large to carry around with it, can just as well live there.
600
+
601
+ Two things live outside `BUNINU_HOME` either way, because they belong to the
602
+ machine rather than to Buninu:
603
+
604
+ - `HOME` stays your own home directory. Buninu never replaces it, so a shell
605
+ started here still finds your SSH keys, your Git configuration, and anything
606
+ else you keep there.
607
+ - bunmsh writes its command history to `$XDG_DATA_HOME/bunmsh/history`, or
608
+ `$HOME/.local/share/bunmsh/history` when that is unset. It persists between
609
+ sessions, and by default it stays on the machine it was typed on rather than
610
+ travelling with an installation.
611
+
612
+ Set [`buninu.xdgDataHome`](#data-directory-optional) to move that history, and
613
+ anything else written to the XDG data directory, into the installation so it
614
+ travels with it. Keep in mind that a history file records the commands it was
615
+ given, so one carried on removable media carries whatever was typed into it.
616
+
617
+ ## Install and update
618
+
619
+ Copy this installation into a directory that is yours to keep, and run it
620
+ from there instead of from the `npx` cache:
621
+
622
+ ```sh
623
+ # Creates ~/somewhere/buninu as BUNINU_HOME
624
+ npx buninu --install ~/somewhere
625
+
626
+ # Makes ~/buninu itself BUNINU_HOME, with no directory of its own
627
+ npx buninu --strip-install ~/buninu
628
+ ```
629
+
630
+ Both default to the current directory. The two differ only in where
631
+ `BUNINU_HOME` — the installation's own root, see
632
+ [Environment](#environment) — ends up: below the directory you named, or at
633
+ it. `npx buninu --install --help` lists every install option in full.
634
+
635
+ An installation is started the same two ways `npx buninu` is, by running its
636
+ own `bin/init.js` instead of the package name:
637
+
638
+ ```sh
639
+ # Terminal in a browser, as usual
640
+ bun $BUNINU_HOME/bin/init.js
641
+
642
+ # bunmsh in this terminal (experimental)
643
+ bun $BUNINU_HOME/bin/init.js --local
644
+ ```
645
+
646
+ Every option described under [Start](#start) works the same way here, `--local`
647
+ included; nothing about an installed copy behaves differently from the one
648
+ `npx` runs.
649
+
650
+ Installing over an existing Buninu updates it in place. Files are only added
651
+ and overwritten, never deleted, so anything you added of your own is left
652
+ alone: your `apps/<name>/` commands, your `bin/*.sh` overrides, the Bun
653
+ binaries `bin/bun.sh` extracted, and any working file you left in the tree.
654
+
655
+ Three files belong to you and to the package at the same time, and are merged
656
+ rather than replaced:
657
+
658
+ | File | What is kept |
659
+ |---|---|
660
+ | `package.json` | Your `buninu` section. Every other field, `version` included, comes from the new package. |
661
+ | `apps/cmdlist` | Command names you added. They are appended below the shipped list. |
662
+ | `.bashrc` | Your version, whenever it only adds lines to the shipped one — including lines inserted in the middle. |
663
+
664
+ When `.bashrc` cannot be merged that way, because a line the package ships was
665
+ changed or removed rather than added to, your file is left exactly as it is
666
+ and the package's version is written beside it as `.bashrc.dist` for you to
667
+ reconcile by hand. Nothing is overwritten silently.
668
+
669
+ Every other file belongs to the package and is replaced. Before doing that, an
670
+ update asks the registry what the installation originally shipped with and
671
+ lists the files that no longer match, so editing one of the package's own files
672
+ is not quietly undone:
673
+
674
+ ```
675
+ buninu: found buninu@0.3.1 at /home/you/buninu
676
+ buninu: comparing it against the published 0.3.1 for local changes...
677
+ buninu: 1 file(s) differ from buninu@0.3.1 and will be replaced:
678
+ apps/xclip/xclip.js
679
+ Update anyway? (y/N)
680
+ ```
681
+
682
+ An existing installation is always named, by absolute path, before anything is
683
+ written to it — `--force` included, since that one replaces it without asking.
684
+
685
+ Only `y` continues; anything else cancels and leaves the installation
686
+ untouched. The three merged files above are left out of that list, since they
687
+ are already kept. `--yes` answers for you, which is also what a script or any
688
+ other run without a terminal needs. Nothing about this is recorded inside the
689
+ installation: the published package is the reference, so the check needs the
690
+ network, and when it cannot run the update says so and goes ahead.
691
+
692
+ Three more things are worth knowing about:
693
+
694
+ - Installing from a checkout that already carries changes made since its
695
+ version was published — that is, while working on Buninu itself — compares
696
+ the installation against a reference its own files no longer match, so the
697
+ list names those unreleased changes rather than anything you did. Cloning it
698
+ and adding your own files on top does not.
699
+ - A file the package **stopped** shipping is not removed from an existing
700
+ installation, because an update never deletes. Stale files accumulate
701
+ across updates.
702
+ - `--force` skips both the merge and the check, and installs the shipped
703
+ versions over yours. It is also what installs into a non-empty directory that
704
+ is not a Buninu installation, which is otherwise refused — by absolute path,
705
+ saying which check the directory failed.
706
+
707
+ Whether a directory counts as an installation to update is decided by the name
708
+ in its `package.json`. An installation that has lost files, `bin/init.js`
709
+ included, is a damaged one rather than somebody else's directory, so installing
710
+ over it repairs it and still merges your configuration back in.
711
+
712
+ A source checkout's own `.git` is never copied into an installation, so
713
+ installing into a directory that is itself a repository leaves that repository
714
+ alone.
715
+
716
+ ## Export
717
+
718
+ Export a Buninu installation as a gzip-compressed tar archive. What gets
719
+ exported is the installation the command runs from, so run it from your own
720
+ installation to capture your configuration, added commands and edited
721
+ `.bashrc` along with it:
722
+
723
+ ```sh
724
+ # Everything in this installation, as ./buninu.tgz
725
+ bun $BUNINU_HOME/bin/init.js --export
726
+
727
+ # ...to a path of your choosing
728
+ bun $BUNINU_HOME/bin/init.js --export /path/to/buninu.tgz
729
+ ```
730
+
731
+ Run it through `npx` instead and you get an archive of the freshly downloaded
732
+ package, with none of that — useful for a clean copy, not for a backup:
733
+
734
+ ```sh
735
+ npx buninu@latest --export
736
+ ```
737
+
738
+ The default output is `./buninu.tgz`. The archive contains exactly one
739
+ top-level directory so consumers can remove one component while extracting.
740
+ Export requires `tar` in `PATH`; when replacing an existing output,
741
+ Buninu restores the previous file if archive creation or replacement fails.
742
+
743
+ Export this `package.json` on its own, instead of the whole installation. The
744
+ same distinction applies — run it from your installation to get your settings,
745
+ through `npx` to get the defaults:
746
+
747
+ ```sh
748
+ # The buninu section as you have configured it, as ./buninu.json
749
+ bun $BUNINU_HOME/bin/init.js --export-config
750
+
751
+ # ...to a path of your choosing
752
+ bun $BUNINU_HOME/bin/init.js --export-config /path/to/buninu.json
753
+
754
+ # The package's own defaults instead
755
+ npx buninu@latest --export-config
756
+ ```
757
+
758
+ The default output is `./buninu.json`. This is the full `package.json` (not
759
+ just the `buninu` section), so the output is ready to use as-is anywhere a
760
+ complete replacement `package.json` is expected.
761
+
762
+ A tarball made this way is also the simplest backup to take before an update
763
+ that is going to replace files you edited; see
764
+ [Install and update](#install-and-update).
765
+
766
+ ## Environment
767
+
768
+ `BUNINU_HOME` is the absolute path to the installed Buninu package root.
769
+ The jsgotty process, startup command, and interactive shell start with this
770
+ directory as their working directory. Buninu also appends
771
+ `$BUNINU_HOME/bin` to `PATH` (`Path` on Windows).
772
+
773
+ Buninu preserves inherited environment variables and supplies these fallbacks:
774
+
775
+ - `HOME`: inherited value; when unset, the operating system's own home
776
+ directory for the current user (`USERPROFILE` on Windows), falling back to
777
+ `BUNINU_HOME` only if that is unavailable too.
778
+ - `TMPDIR`: inherited value; on Android, use the app cache directory when it
779
+ exists or `$BUNINU_HOME/tmp` otherwise; on other platforms, use the system
780
+ temporary directory.
781
+ - `SHELL`: inherited value, or a detected platform-appropriate shell.
782
+ - `XDG_DATA_HOME`: inherited value, unless `buninu.xdgDataHome` names one; see
783
+ [Data directory](#data-directory-optional).
784
+ - `TERM`: `xterm-256color` when unset.
785
+ - `COLORTERM`: `truecolor` when unset.
786
+
787
+ The Buninu Android APK launcher also supplies user-aware external-storage
788
+ paths obtained from Android APIs:
789
+
790
+ - `PKG_DDIR`: `/storage/emulated/<user-id>/Android/data/<package>`.
791
+ - `PKG_MDIR`: `/storage/emulated/<user-id>/Android/media/<package>`.
792
+ - `PKG_BRIDGE_SOCK`: the `native-bridge` unix socket, when the host app
793
+ wires one in; see `native-bridge` above.
794
+
795
+ ## Add a command
796
+
797
+ On POSIX systems, Buninu exposes its commands through the multicall
798
+ `shloader`. The command names are listed one per line in `apps/cmdlist`:
799
+
800
+ ```text
801
+ # syntax: markdown
802
+
803
+ # Lines beginning with # are comments
804
+ glow
805
+ jsgotty
806
+ jsmdcui
807
+ ```
808
+
809
+ Blank lines and comment lines are ignored. Keep comments on their own lines;
810
+ inline comments are not supported. Command names may contain ASCII letters,
811
+ digits, `.`, `_`, and `-`, and must begin with a letter or digit.
812
+
813
+ For example, to add a command named `hello`, create
814
+ `apps/hello/hello.js`:
815
+
816
+ ```js
817
+ console.log("Hello from Buninu");
818
+ ```
819
+
820
+ Then add its name to `apps/cmdlist`:
821
+
822
+ ```text
823
+ hello
824
+ ```
825
+
826
+ Restart Buninu normally. During startup, `bin/init.js` reads the list and
827
+ rebuilds `bin/hello` as a symbolic link to `shloader`. The command is then
828
+ available from the Buninu shell:
829
+
830
+ ```sh
831
+ hello
832
+ ```
833
+
834
+ The multicall loader looks for an implementation in this order:
835
+
836
+ ```text
837
+ bin/hello.sh
838
+ apps/hello/hello.sh
839
+ apps/hello/hello.js
840
+ apps/hello/hello.mjs
841
+ apps/hello/hello.ts
842
+ apps/hello/hello.mts
843
+ ```
844
+
845
+ Running only an information option such as `--help` or `--version` does not
846
+ rebuild links; start Buninu normally at least once after changing the list.
847
+ Windows does not use these POSIX symbolic links. To expose the same command
848
+ on Windows, also provide `bin/hello.bat`, for example:
849
+
850
+ ```bat
851
+ @echo off
852
+ call "%~dp0bun.bat" "%~dp0..\apps\hello\hello.js" %*
853
+ exit /b %ERRORLEVEL%
854
+ ```
855
+
856
+ ### Platform-specific binaries
857
+
858
+ A bundled binary that only runs on one platform and architecture carries a
859
+ two-letter suffix: the platform first, then the architecture.
860
+
861
+ | Suffix | Platform | Architecture |
862
+ |---|---|---|
863
+ | `la` | Linux | arm64 |
864
+ | `lx` | Linux | x64 |
865
+ | `aa` | Android | arm64 |
866
+ | `wx` | Windows | x64 |
867
+ | `ma` | macOS | arm64 |
868
+
869
+ So `bin/bun.sh` picks `bun-la`, `bun-lx` or `bun-wx.exe` for the machine it
870
+ finds itself on, and `musl-la` is the Linux/arm64 ELF loader — on any other
871
+ platform there is nothing for it to load. A name without a suffix is
872
+ portable: `hello.js` above runs wherever Bun does.
873
+
874
+ One binary is deliberately outside the scheme. `bin/libsh-loader.so` is
875
+ Android/arm64 and would otherwise be `-aa`, but Android extracts and executes
876
+ only files named `lib*.so` from an APK's native library directory, so that
877
+ name belongs to the platform rather than to this convention.
878
+
879
+ ## Startup command (optional)
880
+
881
+ Set `buninu.command.default` or a platform-specific value (`android`, `linux`,
882
+ or `windows`) in `package.json` to run a complete shell command from
883
+ the directory containing `package.json`. The platform value takes precedence
884
+ over `default`. After the command finishes—successfully or unsuccessfully—the
885
+ terminal returns to an interactive shell.
886
+
887
+ ```json
888
+ {
889
+ "buninu": {
890
+ "command": {
891
+ "default": "echo Welcome to Buninu",
892
+ "android": null
893
+ }
894
+ }
895
+ }
896
+ ```
897
+
898
+ For compatibility, `"command": "..."` is also accepted as a shared command
899
+ for every platform.
900
+
901
+ The command runs in a subshell, and the interactive shell that follows is a
902
+ fresh one, so anything it defines rather than does — aliases, functions, shell
903
+ variables — is gone before you reach a prompt. Use it to run something, print
904
+ something, or start something; a startup file that configures the session is a
905
+ job for the shell itself, through `ENV` for the shells that honor it.
906
+
907
+ It applies to the browser terminal only. `--local` does not run it, so a
908
+ `bunmsh` session starts with nothing from this setting; see
909
+ [Start a local shell in a Terminal](#start-a-local-shell-in-a-terminal-experimental).
910
+
911
+ Override it for one run with:
912
+
913
+ ```sh
914
+ bun ./bin/init.js --command "echo temporary command"
915
+ ```
916
+
917
+ Set `buninu.exitAfterCmd` to `true` to exit once `buninu.command` finishes
918
+ instead of falling back to an interactive shell. It defaults to `false`,
919
+ which is the current fall-back-to-shell behavior described above.
920
+
921
+ ```json
922
+ {
923
+ "buninu": {
924
+ "command": { "default": "echo Welcome to Buninu" },
925
+ "exitAfterCmd": true
926
+ }
927
+ }
928
+ ```
929
+
930
+ ## Shell selection (optional)
931
+
932
+ Set `buninu.shell.default` or a platform-specific value (`android`, `linux`,
933
+ or `windows`) in `package.json`. A relative shell path is resolved
934
+ from the directory containing `package.json`.
935
+
936
+ ```json
937
+ {
938
+ "buninu": {
939
+ "shell": {
940
+ "default": null,
941
+ "android": "../bunmsh/bunmsh"
942
+ }
943
+ }
944
+ }
945
+ ```
946
+
947
+ Use `--shell <path-or-name>` for a one-time override.
948
+
949
+ ## Data directory (optional)
950
+
951
+ Set `buninu.xdgDataHome` in `package.json` to point `XDG_DATA_HOME` somewhere
952
+ of your choosing. `true` puts it inside the installation, at
953
+ `$BUNINU_HOME/.local/share`:
954
+
955
+ ```json
956
+ {
957
+ "buninu": {
958
+ "xdgDataHome": true
959
+ }
960
+ }
961
+ ```
962
+
963
+ A string names a directory instead, resolved from the directory containing
964
+ `package.json` when it is relative:
965
+
966
+ ```json
967
+ {
968
+ "buninu": {
969
+ "xdgDataHome": "/mnt/usb/shared-data"
970
+ }
971
+ }
972
+ ```
973
+
974
+ The directory is created at startup if it does not exist. Leave the setting
975
+ `null` and `XDG_DATA_HOME` is passed through from the environment untouched.
976
+
977
+ What this actually moves is where XDG-aware programs keep their data, and
978
+ **bunmsh's command history is the one that matters here**: it lives at
979
+ `$XDG_DATA_HOME/bunmsh/history`, so `true` is what makes a shell's history
980
+ travel with a copied installation instead of staying on the machine.
981
+
982
+ `HOME` is deliberately left alone by this setting. A shell started under
983
+ Buninu keeps pointing at your own home directory, so SSH keys, Git
984
+ configuration and anything else kept there still work, and bunmsh can still
985
+ import the `~/.bash_history` or fish history you already had.
986
+
987
+ ## Back key (Android, optional)
988
+
989
+ Set `buninu.backToConsole` in `package.json` to decide what the Android host
990
+ app's back key does while the app WebView (id `1`, see `native-bridge` above)
991
+ is in front and has no page of its own left to go back to. It defaults to
992
+ `true`: back switches to the console WebView, leaving the app WebView loaded
993
+ and running behind it. Set it to `false` and back leaves the app instead.
994
+
995
+ ```json
996
+ {
997
+ "buninu": {
998
+ "backToConsole": false
999
+ }
1000
+ }
1001
+ ```
1002
+
1003
+ This one is read by the host app, not by Buninu itself, so it does nothing
1004
+ outside an APK built with
1005
+ [minapk](https://github.com/jjtseng93/minapk) — where it can also
1006
+ be set for a single build with `--no-back-to-console`. The host treats a
1007
+ missing, unreadable, or non-boolean value as `true`, so nothing here can fail
1008
+ in a way that leaves the back key broken.
1009
+
1010
+ ## Process-list helpers
1011
+
1012
+ The bundled `.bashrc` provides `pspa` (`ps -eo pid,args`) and `pspac`, which
1013
+ writes that process list to `$HOME/.pspidargs.sh` and displays it with `glow`.
1014
+ Buninu preserves an existing `HOME` rather than replacing or modifying the
1015
+ user's home, and points `ENV` at the bundled file. Whether that file is read
1016
+ depends entirely on the shell:
1017
+
1018
+ | Where | Shell | The bundled `.bashrc` |
1019
+ |---|---|---|
1020
+ | Android, including a minapk APK | `/system/bin/sh`, which is mksh | Loaded through `ENV`; all of these aliases work |
1021
+ | Linux and macOS | Bash, usually | Not loaded — an interactive Bash reads `$HOME/.bashrc` and ignores `ENV` |
1022
+ | Windows | PowerShell, or `cmd.exe` | Not loaded, and these aliases would not carry over: listing processes is spelled differently there |
1023
+ | `--local` | bunmsh | Not loaded, and not needed: bunmsh answers all five names itself |
1024
+
1025
+ So Android gets these aliases without doing anything, and everywhere else the
1026
+ bundled file sits unread — which also means your own `$HOME/.bashrc` is left
1027
+ entirely alone.
1028
+
1029
+ Under `--local` these are bunmsh's own, not aliases read from a file, so they
1030
+ work with nothing sourced — and the two process helpers are not quite the same
1031
+ two commands. `pspa` prints the same PID-and-command-line table, but through
1032
+ bunmsh's own process query, which also answers on Windows, where
1033
+ `ps -eo pid,args` has no counterpart. `pspac` colours that table inline as
1034
+ shell syntax: it writes no `$HOME/.pspidargs.sh` and does not need `glow`.
1035
+ Both are PATH-fallback builtins, so a real `pspa` or `pspac` on `PATH` still
1036
+ wins and `builtin pspa` selects bunmsh's explicitly. Its `ls`, `grep` and
1037
+ `diff` colour aliases are built in as well, which is why nothing in the bundled
1038
+ file is missing from a `--local` session. See
1039
+ [bunmsh's PATH-fallback builtins](apps/bunmsh/README.md#path-fallback-builtins).
1040
+
1041
+ On Windows the two *aliases* do not apply. Both wrap `ps -eo pid,args`, and
1042
+ that invocation has no counterpart: PowerShell does have `ps`, but as an alias
1043
+ for `Get-Process`, which takes its own options rather than those. List
1044
+ processes with `Get-Process` in PowerShell, or `tasklist` in `cmd.exe` — or use
1045
+ `--local`, where bunmsh's builtins of the same names answer by querying
1046
+ `Win32_Process` through PowerShell and print the same two columns.
1047
+
1048
+ To get the aliases in a POSIX session that did not load them, source the file
1049
+ from the prompt:
1050
+
1051
+ ```sh
1052
+ . "$BUNINU_HOME/.bashrc"
1053
+ ```
1054
+
1055
+ Source it from the prompt rather than putting that line in your own
1056
+ `$HOME/.bashrc`: `BUNINU_HOME` is only set inside a Buninu session, so
1057
+ elsewhere the same line reads `. "/.bashrc"` and every shell you open either
1058
+ complains or, if that file happens to exist, sources something you did not
1059
+ mean to.
1060
+
1061
+ That is for a Bash or mksh session that did not load the file — the remote
1062
+ route on Linux and macOS. A `--local` session has no reason to source it, since
1063
+ bunmsh defines all five names itself. Sourcing it there anyway still reports
1064
+ `alias: pspac: invalid alias` and carries on: a bunmsh alias is a list of
1065
+ words, and `pspac` is two commands joined by `;` with a redirection in the
1066
+ first, so it cannot be one — but the builtin of that name is already there, and
1067
+ an alias that fails to define leaves it reachable. See
1068
+ [Start a local shell in a Terminal](#start-a-local-shell-in-a-terminal-experimental).
1069
+
1070
+ ## Why
1071
+
1072
+ - The usual way to get a Unix
1073
+ environment onto a machine
1074
+ * A system package manager
1075
+ * A compiler
1076
+ * On Android or Windows,
1077
+ you install Linux first:
1078
+ WSL, or a proot distro
1079
+
1080
+ - Buninu's way: everything it
1081
+ needs is JavaScript on Bun
1082
+ * Nothing to build
1083
+ * Nothing installed
1084
+ system-wide
1085
+ * The bundled jsgotty
1086
+ dropped `node-pty` for
1087
+ Bun's own terminal API
1088
+ * So the same tree runs
1089
+ unchanged on a phone, a
1090
+ laptop and a server
1091
+
1092
+ - Not a bare runtime either
1093
+ * An editor and Markdown
1094
+ runtime
1095
+ * A clipboard tool
1096
+ * Text-to-speech
1097
+ * ZMODEM file transfer
1098
+ * An `xdg-open` that knows
1099
+ each platform's real
1100
+ handler
1101
+
1102
+ - An installation is one
1103
+ directory
1104
+ * Yours to edit
1105
+ * Copy it to another machine
1106
+ and your shell, the
1107
+ commands you added and
1108
+ your history go with it
1109
+ * Your own `$HOME` is never
1110
+ touched — a shell started
1111
+ here still finds your SSH
1112
+ keys and Git configuration
1113
+
1114
+ ## Contents
1115
+
1116
+ - [Install Bun](#install-bun)
1117
+ - [Start](#start)
1118
+ * [Start a remote shell in a Browser](#start-a-remote-shell-in-a-browser)
1119
+ * [Start a local shell in a Terminal (experimental)](#start-a-local-shell-in-a-terminal-experimental)
1120
+ - [Security](#security)
1121
+ - [Command-line usage](#command-line-usage)
1122
+ * [Launching a bundled app directly](#launching-a-bundled-app-directly)
1123
+ - [Commands inside the shell](#commands-inside-the-shell)
1124
+ - [Differences from upstream](#differences-from-upstream)
1125
+ - [Optional external tools](#optional-external-tools)
1126
+ - [Data & Persistence](#data--persistence)
1127
+ - [Install and update](#install-and-update)
1128
+ - [Export](#export)
1129
+ - [Environment](#environment)
1130
+ - [Add a command](#add-a-command)
1131
+ * [Platform-specific binaries](#platform-specific-binaries)
1132
+ - [Startup command (optional)](#startup-command-optional)
1133
+ - [Shell selection (optional)](#shell-selection-optional)
1134
+ - [Data directory (optional)](#data-directory-optional)
1135
+ - [Back key (Android, optional)](#back-key-android-optional)
1136
+ - [Process-list helpers](#process-list-helpers)
1137
+ - [Why](#why)
1138
+ - [License](#license)
1139
+
1140
+ ## License
1141
+
1142
+ Buninu's own code is MIT — see [LICENSE](LICENSE).
1143
+
1144
+ The apps bundled under `apps/` are separate projects on their own terms, and
1145
+ each carries its licence with it:
1146
+
1147
+ | App | Licence | Files under `apps/<app>/` |
1148
+ |---|---|---|
1149
+ | jsgotty | MIT; its bundled front-end libraries are MIT and Apache-2.0 | `LICENSE`, `NOTICE`, `LICENSES/`, `static/js/gotty.licenses.txt` |
1150
+ | jsmdcui | MIT | `LICENSE`, `runtime/syntax/LICENSE` |
1151
+ | bunmsh | MIT; mksh's own terms are not relicensed under it | `LICENSE`, `LICENSE-MKSH`, `LICENSE-MICRO` |
1152
+ | musl-la | MIT for musl itself, and see below | `LICENSE_musl.txt`, `NOTICE`, `LICENSES/` |
1153
+
1154
+ One component is worth naming here rather than leaving in a file to be found:
1155
+ `apps/musl-la` ships `libgcc_s.so.1` and `libstdc++.so.6`, built from GCC
1156
+ 14.2.0, under **GPL-3.0 with the GCC Runtime Library Exception**. That
1157
+ exception is what lets them be distributed alongside code under any licence,
1158
+ so nothing here changes Buninu's own MIT terms — but if your organisation
1159
+ screens for GPL, this is the component it will find. `apps/musl-la/NOTICE`
1160
+ records the exact build, its Corresponding Source, and SHA-256 sums for every
1161
+ binary in that directory.