Bash for AI agents on Windows by deterministic bash-to-PowerShell translation
open sourceMITself-hostablefreeMCP
fauxnix lets AI coding agents keep writing bash on Windows without WSL, a VM or Git Bash. It translates each command into PowerShell and .NET calls, runs it natively and returns output that looks like GNU/Linux: ls -l columns, bash-style error messages, coreutils exit codes, and UTF-8 or GBK text handled. It covers 109 commands (files, text filters such as grep, sed and awk, processes, archives and network basics) plus pipes, redirections, quoting and variables, and fails with a clear error on anything it can't translate, with no LLM calls at runtime. It runs as an MCP server whose bash tool keeps the working directory and environment between calls, and a batch tool runs several steps in one round trip, or as a CLI. One command configures Claude Code, Codex, OpenCode, Kimi Code or Qwen Code, and an experimental facade points Claude Code's built-in Bash tool at it. It's MIT licensed and installs from npm as fauxnix-cli.
Problems it solves
- my AI coding agent writes bash commands that fail on Windows
- run Linux-style commands on Windows without WSL or a VM
- Claude Code on Windows without Git Bash installed
- the agent keeps getting PowerShell quoting and encoding errors
- give Codex or OpenCode a bash tool on a Windows machine
- translate bash commands to PowerShell automatically
- garbled UTF-8 or GBK output when an agent runs commands on Windows
- an MCP server that gives agents a persistent shell on Windows
Features
- deterministic bash-to-PowerShell translation with no LLM calls
- 109 commands: file ops, grep, sed, awk, sort, find, xargs, ps, kill, curl, tar, zip and more
- pipes, &&, ||, redirections, quoting, variables and parameter expansion
- GNU-style output, bash-style errors and coreutils exit codes
- UTF-8, GBK and CRLF handled
- MCP server with a persistent session: cwd, env, cd -, positional parameters
- bash_batch tool that compiles and runs several steps in one call
- one-command setup for Claude Code, Codex, OpenCode, Kimi Code and Qwen Code
- doctor command that checks encoding, config and the MCP round trip
- experimental native shell facade for Claude Code's Bash tool
View 1 more
- translate command that shows the PowerShell without running it
Limitations
- Runs only on Windows, with PowerShell 5.1+ and Node.js 22.20 or later1
- Translates a subset of the Linux command line; commands it can't translate fail with an error1
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has an MCP server | plan not known |