# Repository Briefing: 20000419/fauxnix
> Source: https://repoforai.com/repo/20000419/fauxnix (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/20000419/fauxnix
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A (80/100 · Maintenance 35/35 · Adoption 5/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.3.0 (2026-11-30) — https://github.com/20000419/fauxnix/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: MCP, CLI, Self-Hosted
- **Momentum**: 900 ★ total (+0 24h / +0 7d) · 5 forks
- **Topics**: `ai-agents`, `bash`, `claude-code`, `cli`, `codex`, `coreutils`, `mcp`, `mcp-server`, `opencode`, `powershell`, `shell`, `translator`
- **When to Use**: Best for: Windows coding-agent fleets and CI runners that need familiar Bash-style file and text workflows on native Windows, without maintaining Git Bash or WSL. Skip if: Your automation depends on full Bash/GNU or Linux semantics, byte-exact binary pipelines, or an execution sandbox supplied by the tool itself.

## Overview
```text
### Architecture & Core Mechanics
Fauxnix is a TypeScript translation and execution layer, not a Bash shell or Linux emulator. src/parser.ts turns a supported Bash subset into an AST; src/translator.ts and generators under src/commands/ emit PowerShell blocks with a shared contract for line-oriented stdout, stdin, stderr, and exit status. src/executor.ts handles process spawning, redirects, and session persistence. src/mcp.ts and src/cli.ts expose the same translation path through MCP and the CLI respectively.

The Node.js package declares @modelcontextprotocol/sdk, zod, iconv-lite, and postject. The executor normalizes PowerShell errors and strips CLIXML noise, with UTF-8 or GBK decoding at the process boundary and a separate per-file UTF-8-to-GBK fallback. Scripts are passed as UTF-16LE -EncodedCommand payloads, with temporary .ps1 files used when the command-line limit would be exceeded. The experimental Claude Code facade is an alternate entrypoint: it wraps the translator in a Node SEA-based bash.exe instead of routing each call through MCP.

### Key Capabilities & Differentiators
The 109 translated commands cover filesystem work, text pipelines, shell and process operations, networking basics, and archives. The curated 60-command subset uses CommandSpec to return GNU-style errors for unknown options; that guarantee does not extend to the whole catalog. find retains predicate parsing, sed and awk have dedicated parsers, and tar delegates to native tar.exe. The v2.3.0 release lists heredocs, shell functions, background jobs with wait, and C-style for loops. Its release entry lists grep -P, but the command inventory describes it as pending; verify the installed artifact before depending on it.

The primary Git Bash differential suite matches 269 of 270 cases, with one documented empty-regex-alternative mismatch and 41 supplementary checks outside that count. This is useful regression evidence, not a universal parity rate. In a five-task, single-host DeepSeek-V4-Pro comparison, PowerShell, fauxnix, and Git Bash used 14, 7, and 4 tool calls respectively; timings for T1–T4 were 163, 66, and 57 seconds. Those measurements describe that agent workflow, not translator latency or fleet throughput.

### Trade-offs & Limitations
Use fauxnix when the operational problem is getting Bash-oriented agents to work with native Windows paths and environment variables without provisioning Git Bash or WSL. Git Bash is the better default if the client already detects it reliably and you need more complete Bash/GNU behavior. WSL fits Linux-specific scripts better but adds a Linux environment and a filesystem boundary. Raw PowerShell avoids a translation layer and is preferable when the automation is already written for Windows.

Compatibility limits are operational, not cosmetic: standalone assignments use export-like semantics, tail -f and output redirects on non-final pipeline stages are rejected, and chmod maps only the read-only bit. Gzip file mode is byte-exact, but pipeline mode is text-oriented; validated decompression to text can also need temporary disk proportional to decoded size. Treat MCP and the facade as ways to run commands on the host, not as isolation boundaries. Keep client approvals in place and test representative file mutations, encodings, and pipelines before making the translator a default.

### Hardware & Deployment Guide
Deploy locally on Windows with Node.js 22.20.0 or newer and PowerShell. Windows PowerShell 5.1 is the default; PowerShell 7 is a CI-tested opt-in selected via FAUXNIX_PS=pwsh. Install the fauxnix-cli npm package to get the fauxnix executable, use its installer for the target harness, then run fauxnix doctor to validate encoding, client configuration, and the MCP round trip. For manual setup with a direct-spawning client, use absolute paths to node.exe and the installed dist/index.js, followed by mcp, rather than relying on the extensionless npm shim.

The translator itself needs no model endpoint or GPU. Size for local processes, concurrent workloads, and temporary disk usage; network-oriented commands may still require connectivity. The experimental Claude Code facade uses an approximately 85 MB Node SEA launcher and depends on private harness scaffolding, so validate client upgrades before rolling it out broadly. In release terms, v2.1.1 corrected descriptor redirects, v2.2.0 hardened rm against drive deletion and link traversal, and v2.3.0 widened the shell-language surface. Check the published package version before relying on behavior shown for the checkout.
```

## Key Capabilities
```text
- Execution path: A Bash-subset AST feeds per-command PowerShell generators; the native executor owns redirects and session persistence.
- Encoding: The process boundary supports UTF-8 or GBK(936), while text file reads independently try strict UTF-8 before falling back to GBK.
- Option validation: The curated 60-command set uses CommandSpec to reject unknown options and exposes metadata through fauxnix list --json.
- Parity testing: 269 of 270 primary Git Bash differential cases match; 41 supplementary checks sit outside that denominator.
- Windows integration: MCP installers use absolute Node and entrypoint paths to avoid direct-spawn failures with the npm shim.
- File-operation safety: v2.2.0 hardened rm against drive-root deletion and link traversal; mv rejects unsupported replacement cases without predeleting the destination.
```

## Quick Start / Clone
```bash
npx fauxnix-cli@latest "ls -la src | head -3"
npx fauxnix-cli@latest translate "find . -name '*.log' -mtime +7 -delete"
```
