@ai-ecoverse/wasm-bash

中文文档
5.3.0-23发布于 2026/10/22GPL-3.0-or-later零依赖构建来源已验证近 30 天下载 5.3万

GNU bash 5.3, the shell, with line editing, history, completion and job control.

原始使用文档

@ai-ecoverse/wasm-bash

GNU bash 5.3 with readline (history, line editing, tab completion) for slicc's panel terminal. Fork/job control via Asyncify + slicc shims.

pnpm add -g @ai-ecoverse/wasm-bash
bash -i

It needs slicc-kernel 1.130.2 or later (engines, since 5.3.0-21). On older kernels a ^C that arrives while an interactive bash forks a job can end bash with exit 130 instead of returning it to its prompt (homescoop#1230, slicc-kernel#1146).

Users (5.3.0-13, slicc-kernel ≥ 1.44.0)

bash runs as the user the kernel says. $UID, $EUID, $GROUPS, ~ and the \u/\$ prompt escapes come from slicc-kernel's process credentials and its /etc/passwd. Root (the kernel's default) gets uid 0, /root and a # prompt. A user added with kernel.users.add({ name }) gets its own uid, home and $.

There is no fallback: on an older kernel the ids are -1 and the prompt says "I have no name!". File owners are the kernel's; 1.44.0 reports uid 1000 for every file.

Patches (5.3.0-17)

5.3.0-17 is the certified 5.3.0-15 build under a new number: npm never served 5.3.0-15 or 5.3.0-16 (their publishes were swallowed, npm/cli#9889, and both numbers are burned).

GNU bash 5.3 with these homescoop patches (GPL-3.0-or-later, like bash; the list with the files each one changes is in THIRD-PARTY-NOTICES.md):

  • environ.patch: the shell's environment comes from environ (Emscripten calls main(argc, argv) without envp).
  • eval-tty-signals.patch: a ^C or ^Z typed right after Enter reaches the new job (the recorder between command reads).
  • jobs-notify-unqueue.patch: a SIGCHLD that arrives while job status is printed is reaped, so a killed stopped job reports "Killed".
  • jobs-parent-terminal.patch: the shell gives the terminal to a new foreground job itself, since the forked child takes it late.
  • pipestatus-restore-null.patch: PIPESTATUS is filled again after a PROMPT_COMMAND ran before the first pipeline (an upstream 5.3 bug).
  • readline-sigint-discard.patch: a ^C while bash takes an accepted line drops that line (never "leep" for "sleep"); a ^C noticed late leaves the next line whole, minus what was typed before it.

Since 5.3.0-18 a signal bash sends itself with its default action (kill -TERM $$, kill -9 $$, a timeout script killing its own shell) ends bash by that signal in the kernel, so a parent's wait or spawnSync sees the signal and not exit 143 (slicc-kernel#422; needs slicc-kernel ≥ 1.73.2, older ones keep the exit status). Trapped and ignored signals stay inside bash, as before.

版本与发布记录

@ai-ecoverse/wasm-bash 共发布 24 个版本,首次发布于 2026/09/27;过去 12 个月发布了 24 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
5.3.0-23latest2026/10/2215 天前
5.3.0-222026/10/2016 天前
5.3.0-212026/10/2017 天前
5.3.0-202026/10/1918 天前
5.3.0-192026/10/1620 天前
5.3.0-182026/10/1323 天前

关于 @ai-ecoverse/wasm-bash 的常见问题

@ai-ecoverse/wasm-bash 是什么?

GNU bash 5.3, the shell, with line editing, history, completion and job control.

如何安装 @ai-ecoverse/wasm-bash?

在项目目录运行 npm install @ai-ecoverse/wasm-bash,或使用 pnpm add / yarn add / bun add。

@ai-ecoverse/wasm-bash 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ai-ecoverse__wasm-bash 是否存在。

@ai-ecoverse/wasm-bash 可以商用吗?

@ai-ecoverse/wasm-bash 使用 GPL-3.0-or-later 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以 GPL-3.0 兼容许可开源,并附带专利与反锁定条款。仅内部使用不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@ai-ecoverse/wasm-bash 的下载量有多少?

根据 npm 官方下载统计,@ai-ecoverse/wasm-bash 在 2026/10/05 – 2026/11/03 这 30 天内被下载 52,602 次,日均约 1,753 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ai-ecoverse/wasm-bash 还在维护吗?

最新版本 5.3.0-23 发布于 2026/10/22(15 天前);至今共发布 24 个版本,其中过去 12 个月发布了 24 个;首次发布于 2026/09/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。