Niubash CLI

A native Bash-compatible shell written in Rust for Windows, Linux and macOS, running agent commands exactly as written.

  • 268 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • Runs any shell command with user rights, including writing and deleting files.
All reasons and checks

unixwin/niubash

Install

Manual install

winget install --id Unixwin.Niubash

The first command of the Quick start section installs the Windows release through winget. Linux has an apt package and a portable archive.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Runs any shell command with user rights, including writing and deleting files.

This is third-party code. Review the repository files before installing.

What it does

Niubash is a shell with GNU Bash 5.3 semantics rewritten in Rust. On Windows a single `niu.exe` carries the language engine, the WinuxCmd set of Unix commands, a real git built from the git-for-windows sources and a plugin system. No WSL, virtual machine or POSIX emulation layer is needed. For agents the README explains how to make niu the default shell: agents launched from a niu session inherit it through the `SHELL` variable. The `--ec` flag accepts a whole command as a base64 string, so nested quotes, `$` and backslashes survive passing through several hosts. `niu --version` shows exact builds of the engine and the command layer, which helps agent logs.

Who it is for. Windows developers whose agents write Bash commands and stumble over Git Bash, MSYS2 or PowerShell.

Good fit when

  • An agent on Windows emits Bash commands and nested quotes break along the way.
  • You want a real git without the MSYS environment and extra launcher hops.
  • The same shell script runs on Windows, Linux and macOS.
  • Git Bash takes hundreds of megabytes and a small portable option is wanted.

Not a fit when

  • A working WSL setup already exists and there is no reason to change shells.
  • Scripts rely on GNU extensions that the project does not cover yet.
  • You need a platform not covered in the README, for example full HarmonyOS support.

Example request

Run the tests in this project through niu and show the git log output for the last day.

Limitations

Windows is the flagship platform, and the Linux and macOS builds use the tools of your system. Android support depends on Termux, and the honest state of each platform is described in the Platforms section of the README. The README lists known differences from GNU Bash, so read them before moving production scripts to niu. The license is MIT. The last commit is dated November 2026.

How to disable. On Windows remove the program through Apps & features or `winget uninstall Unixwin.Niubash`, on Linux run `sudo apt remove niubash`. Then restore the previous shell in the agent terminal profile.

FAQ

How do I install Niubash on Windows?

Run `winget install --id Unixwin.Niubash` or download the installer from the releases page. Administrator rights are not required, and PATH and a Windows Terminal profile are set up automatically.

How does niu differ from Git Bash?

Niu implements Bash 5.3 semantics natively without POSIX emulation and carries a real git built with MSVC. Git Bash runs on top of MSYS2 and rewrites paths heuristically.

What is the `--ec` flag for?

It takes a command as one base64 string, so nothing needs escaping. Intermediate hosts then cannot distort the agent command.

How do I make niu the shell for an agent?

Any agent launched from a niu session inherits `SHELL`. For other agents, `docs/src/agents.md` explains which shell each one uses and how to point it at niu.

Where is configuration stored?

On Windows in a single `~/.niubashrc` file in plain Bash syntax. An example sits in `.niubashrc.example`.

Discussion

No questions or reviews yet.

CLI tools
Official

fauxnix translates an agent's bash commands into PowerShell and runs them on Windows with no WSL or VM, returning GNU-style output and error messages

MCP serverBroad access900Repository stars

A drop-in bash.exe for coding agents on Windows: a Bash interpreter with no Git, MSYS2 or WSL, an MCP server and a Windows adapter

CLIBroad access271Repository stars

A Docker sandbox for coding agents: a Debian image with Copilot CLI, Codex and Pi, and SSH, RDP and Docker enabled by flags.

CLIExtended access154Repository stars

The Nasiko CLI finds installed Claude Code, Codex, OpenCode and Cursor, tracks their spend and routes calls to models you pick.

CLIBroad access12KRepository stars

Three UNIX tools: a directory fork without copying, a sandboxed agent run and a patch with the changes it made.

CLIExtended access64Repository stars

CLI that runs commands and AI agents in isolated microVMs that boot in under 125 ms and keeps API keys out of the sandbox itself.

CLIBroad access62Repository stars

README in short

The README compares niu with Git Bash, MSYS2 and Cygwin, lists the platforms and gives performance data. A separate section states known limitations.

README badge

Report a problem