20000419/fauxnix

Run Linux-style commands on Windows via deterministic bash→PowerShell translation. No VM, no WSL. MCP server + CLI built for AI agents (Claude Code, Codex, OpenCode...). GNU-style output, bash-style errors, UTF-8/GBK handled.

What it solves

AI agents are typically trained on vast amounts of Bash (Linux/Unix) commands but struggle with PowerShell, often producing commands that are syntactically incorrect or produce unexpected output formats on Windows. fauxnix provides a translation layer that allows agents to continue writing Bash while executing those commands natively on Windows without requiring a Virtual Machine (VM) or Windows Subsystem for Linux (WSL).

How it works

Fauxnix acts as a deterministic translation engine (requiring zero LLM calls at runtime) that converts a supported subset of Bash commands into equivalent PowerShell scripts. It parses Bash input into an Abstract Syntax Tree (AST), translates that AST into a PowerShell block, and executes it via a native Windows executor. To ensure the agent receives familiar results, it rewrites PowerShell's verbose error messages and output into GNU/Linux-style formatting and handles character encoding (UTF-8/GBK) automatically.

Who it’s for

Developers building AI agents (such as Claude Code, Codex, or Qwen Code) that need to operate on Windows environments, CI runners, or locked-down machines where installing a full Bash toolchain like Git Bash is impractical.

Highlights

  • Broad Command Support: Translates 109 commands across file operations, text filters (grep, sed, awk), system management, networking, and archives.
  • MCP Integration: Built-in support for the Model Context Protocol (MCP), allowing easy connection to various AI agent harnesses.
  • CWD and Session Persistence: Maintains current working directory, environment variables, and positional parameters across tool calls, behaving like a logged-in shell.
  • High Fidelity: Matches GNU coreutils behavior in 99.6% of tested cases against a Git Bash differential corpus.
  • Native Execution: No VM or WSL required; runs natively on Windows PowerShell 5.1+ and Node.js.

Related

  • Project
  • Project
  • Project
  • Project
  • Project