niubash
RustAI-native real bash: real syntax, real Unix commands, native on Windows/Linux/macOS.
AI-native 的真·Bash:真语法、真 Unix 命令、原生三平台
An AI-native family of real Bash — real syntax, real Unix commands, native on Windows / Linux / macOS. No WSL, no MSYS.
AI-native 的真·Bash 家族——真语法、真 Unix 命令、原生 Windows / Linux / macOS,无 WSL、无 MSYS。
83/83 GNU suites · 82 byte-identical · 176+ Unix commands · ~14 ms git startup (Windows, same machine)
# install · session 1/3
PS C:\> irm https://unixwin.dev/install.ps1 | iex
downloading niubash-win-x64-setup.exe …
✓ Niubash 1.5.1 installed
PS C:\> niu --version
Niubash 1.5.1 — bash-compatible shell for Windows
# agent takeover · session 2/3
cmx@unixwin:~$ claude
✓ shell: niubash (rubash engine) — $SHELL auto-detected
agent> niu -c 'git log --oneline -1'
f0c0ffe niubash 1.5.1 — real syntax, real commands, native on three platforms
agent>
# speed · session 3/3
cmx@unixwin:~$ time git --version
git version 2.56.0.windows.4.niugit
✓ real 0m0.014s ← niu-git
user 0m0.006s · sys 0m0.002s
# Git Bash on the same machine: real 0.045s – 0.103s (3–7× slower)
cmx@unixwin:~$
six projects · one family
All six ship with one niubash install — install niubash once and the whole family is in place.
AI-native real bash: real syntax, real Unix commands, native on Windows/Linux/macOS.
AI-native 的真·Bash:真语法、真 Unix 命令、原生三平台
irm unixwin.dev/install.ps1 | iex Native-Windows Unix command set, single ~3 MB executable.
原生 Windows 的 Unix 命令集,单文件约 3MB
winuxcmd --version Embeddable GNU Bash 5.3-compatible engine.
可嵌入的 GNU Bash 5.3 兼容引擎
cargo add rubash Native Windows Git without MSYS; git starts in ~14 ms (Windows, same-machine measurement).
原生 Windows Git,无 MSYS;git 启动 ~14 ms(Windows 同机实测)
git --version WinuxCmd's built-in package manager with a 282-package official index.
WinuxCmd 内置包管理器,官方索引 282 包
wpm install neovim Oh-My-style framework: 40+ themes and plugins.
Oh-My 式框架:40+ 主题与插件
niu plugin list why --real --fast --native
All 83 upstream GNU Bash test suites pass, and 82 of them produce byte-identical output — the one remaining delta was proven byte-for-byte to be a race in GNU's own code. Existing scripts run unmodified.
suites 83/83 · byte-identical 82 ( ) and $( ) create zero processes —
subshells complete in-process, with fd inheritance, shared offsets, exit codes and
signal disposition matching GNU. One model on every platform, no POSIX emulation layer.
( ) $( ) → 0 processes C:\, D:/, /d/, /mnt/d,
/cygdrive/d — one shell accepts the path notations of four
ecosystems and genuinely folds them together. Switch shells without
rewriting your scripts.
C:\ · /d/ · /mnt/d · /cygdrive/d
Git Bash heuristically rewrites your arguments before spawn, so you end up learning
MSYS_NO_PATHCONV. niu ships no MSYS runtime — argv arrives
byte-for-byte as typed. That variable doesn't exist here because it doesn't
need to.
argv verbatim
Launch Claude Code, Codex or Cursor from a niu session and the agent picks up niubash
through the $SHELL convention; niu -c runs a single command
with deterministic output, built for agents' repeated calls and parsing.
niu -c 'ls | grep src' git --version in about ~14 ms where Git Bash needs
45–103 ms (both Windows, same machine, niu-git measurement); the prompt's git segment spawns at most once per pass (p50 26 ms in a
repo, measured on Windows) while the other shell pays a 113–362 ms git tax on every single prompt.
git ~14ms (Windows, same machine) · prompt ≤1 spawn/pass Git Bash (MSYS)
runtime rewrites argv → three straight failures
niubash (niu)
argv byte-for-byte → passes first try
cd, cmd /c and git grep -n one after
another; niu ships no MSYS layer — argv arrives byte-for-byte as typed,
and the same commands pass on the first try (see the "no MSYS incantations" card).
The three commands on the right are copy-paste reproducible in niu.
quick start · one line
winget install --id Unixwin.Niubash --source winget irm https://unixwin.dev/install.ps1 | iex curl -fsSL -o niubash.tar.gz https://github.com/unixwin/niubash/releases/download/v1.5.1/niubash-v1.5.1-linux-x86_64.tar.gz && tar xzf niubash.tar.gz curl -fsSL -o niubash.tar.gz https://github.com/unixwin/niubash/releases/download/v1.5.1/niubash-v1.5.1-macos-x86_64.tar.gz && tar xzf niubash.tar.gz wpm for help); install packages like wpm install neovim, self-upgrade with wpm update winuxcmd.niu × claude code
$ claude # launched from a niu session; $SHELL already points at niubash
✓ shell: niubash (rubash engine) — git ~14 ms (Windows, same machine), 176+ unix commands
agent> niu -c 'ls | grep src'
src
agent> niu -c 'git log --oneline -1'
f0c0ffe niubash 1.5.1 — real syntax, real commands, native on three platforms
agent>
# the quoting-hell terminator: the whole command becomes one base64 word no host layer can touch
agent> niu --ec "Z2l0IGxvZyAtMSAtLWZvcm1hdD0iY29tbWl0ICVoIG9uICVjZCIgLS1kYXRlPSJmb3JtYXQ6JVktJW0tJWQi"
commit a08e7afd on 2026-11-02
✓ no quotes, nothing to break — nested quoting, $ expansion, heredocs, backslash collapse: the whole failure class, gone
Once your agent runs on niubash, every command executes with real bash syntax —
deterministic output, fast startup, nothing falling over in long sessions. How each agent
is launched and wired is covered in the
detection-mechanism docs; and the way commands
reach the shell has a terminal form too — --ec takes base64 in, real bash
out, with the cookbook in the same doc.
tail -f changelogs.json
niubash 1.5.1
Deep-audit host fix wave (1.5.1-bound, 2026-11-04): seven no…
rubash 1.5.1
深审修复波(1.5.1 向,2026-11-04):两轮深度审计(约 214 条经队长复核的发现)中可局部修复项全部落地…
WinuxCmd 1.2.2
locale value model (#1549): `locale` answers keyword operand…
oh-my-niu 2.1.0
See the changelog for details.
Release notes are quoted from the original Chinese changelogs.