UNIXWIN

AI-native 的真·Bash 家族——真语法、真 Unix 命令、原生 Windows / Linux / macOS,无 WSL、无 MSYS。

AI-native bash family — real syntax, real Unix commands, native Windows / Linux / macOS. No WSL, no MSYS.

83/83 GNU 套件 · 82 套逐字节一致 · 176+ Unix 命令 · ~14 ms git 启动

cmx@unixwin:~$

实测数字 · 全部带出处

基准与出处 →
83/83 GNU bash 套件
176+ Unix 命令
~14 ms git 启动
24 已适配 AI agent
5 平台原生构建
≈16 MB 安装后全家族

six projects · one family

产品矩阵

全部六项随 niubash 一键可得——装一次 niubash,六个产品全部就位。

niubash

Rust

AI-native 的真·Bash:真语法、真 Unix 命令、原生三平台

AI-native real bash: real syntax, real Unix commands, native on Windows/Linux/macOS.

文档 →
stable irm unixwin.dev/install.ps1 | iex

WinuxCmd

C++

原生 Windows 的 Unix 命令集,单文件约 3MB

Native-Windows Unix command set, single ~3 MB executable.

文档 →
预装 winuxcmd --version

rubash

Rust

可嵌入的 GNU Bash 5.3 兼容引擎

Embeddable GNU Bash 5.3-compatible engine.

文档 →
beta · 嵌入 cargo add rubash

niu-git

C

原生 Windows Git,无 MSYS,~14ms 启动

Native Windows Git without MSYS, ~14 ms startup.

文档 →
预装 git --version

wpm

C++

WinuxCmd 内置包管理器,官方索引 281 包

WinuxCmd's built-in package manager with a 281-package official index.

文档 →
内置 wpm install neovim

oh-my-niu

Shell

Oh-My 式框架:40+ 主题与插件

Oh-My-style framework: 40+ themes and plugins.

文档 →
随发行 niu plugin list

why --real --fast --native

为什么是 UNIXWIN

真兼容

GNU Bash 上游 83 套测试套件全部通过,其中 82 套输出与 bash 逐字节一致——唯一残差经逐字节论证是 GNU 自己的竞态。存量脚本零修改。

suites 83/83 · byte-identical 82

零 fork

( ) 与 $( ) 零进程创建——子壳在进程内完成,fd 继承、共享偏移、退出码、信号处置与 GNU 行为一致。全平台同一模型,无 POSIX 模拟层。

( ) $( ) → 0 processes

路径方言全收

C:\、D:/、/d/、/mnt/d、/cygdrive/d—— 四大生态的路径写法一个 shell 全收且真折叠。换 shell,不用改脚本。

C:\ · /d/ · /mnt/d · /cygdrive/d

无 MSYS 咒语

Git Bash 会在 spawn 前启发式改写你的参数,你得学会 MSYS_NO_PATHCONV;niu 没有 MSYS 运行时——argv 逐字节原样抵达,这个词不存在,因为它不需要存在。

argv verbatim

AI-native

从 niu 会话启动 Claude Code、Codex、Cursor,agent 按 $SHELL 约定直接用上 niubash;niu -c 单条命令、确定性输出,专为 agent 的反复调用与解析而生。

niu -c 'ls | grep src'

快

git --version 约 ~14ms,Git Bash 要 45–103ms;提示符直接读 .git/HEAD(≤29ms),对方每条提示符给 git 交 113–362ms 的税。

git ~14ms · prompt ≤29ms

Git Bash (MSYS)

argv 被运行时改写 → 三连败

niubash (niu)

argv 逐字节原样 → 一次通过

同三条命令,两种运行时:Git Bash 的 MSYS 层在 spawn 前改写参数,cd、cmd /c、git grep -n 接连失败;niu 没有 MSYS 层,argv 逐字节原样抵达,同样的命令一次通过(见「无 MSYS 咒语」)。

右侧三条命令可直接复制到 niu 里复现。

quick start · 一行命令

快速安装

winget install --id Unixwin.Niubash --source winget
  • Linux / macOS:便携包解压即用(命令中的版本号以 Releases 最新为准,ARM 设备选 aarch64/arm64 资产);Windows 安装器已捆绑 WinuxCmd(含 wpm)与 niu-git / ripgrep / fd / gawk(仅 gawk 为 x64 资产;ARM64 安装同样随附 niu-git / ripgrep / fd)—— github.com/unixwin/niubash/releases 。
  • wpm 即 WinuxCmd 内置(输入 wpm 看 help);装包如 wpm install neovim,自升级 wpm update winuxcmd。
  • 安装 免管理员权限 ,PATH 与 Windows Terminal 配置自动就绪 · 文档见 unixwin.github.io/niubash/ 。

niu × claude code

Agent 一瞥

agent 用上 niubash 后,每一条命令都跑在真 bash 语法上——输出确定、启动够快,长会话也不掉链子。各家 agent 的启动方式与配置细节见 探测机制文档。

tail -f changelogs.json

最新动态

  • niubash 1.4.4

    `ping`/`netstat`/`tracert` were `command not found` (rubash#…

  • rubash 1.4.3

    命令词干大小写折叠(#998/#1000):System32 的盘上真名全大写(`PING.EXE`/`NETSTAT.…

  • WinuxCmd 1.1.20

    bare drive-root operands (`ls /e`, `cp /e ...`, every applet…

  • oh-my-niu 1.0.1

    Released first-party `.winux` source packs for Git, Docker, …

查看完整更新日志 →