Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:20000419 Fauxnix Native Shell Launcher

From Leeroopedia
Knowledge Sources
Domains Launcher, Node_SEA, Windows
Last Updated 2026-10-26 00:00 GMT

Overview

A launcher-build technique that produces a bash.exe executable — a copy of the active node.exe with a facade bundle injected via Node SEA + postject, or a small GA stub with a routing config — so a harness can point its built-in Bash tool at fauxnix with no MCP sidecar.

Description

The Native Shell Launcher principle solves the problem of integrating fauxnix with a harness (Claude Code) that expects a real bash.exe on disk. The launcher's basename must be exactly bash.exe. Two build paths exist: the experimental SEA path copies node.exe and injects the prebuilt facade-sea.cjs bundle as a Node SEA blob via postject (roughly 85 MB per install); the GA stub path copies a small prebuilt stub binary and writes a routing config (fauxnix-launch.json) pointing at this installation's node + bundle. A marker file (bash.exe.launcher.json) tracks the inputs (package version, node version, bundle hash) so staleness is detected and a rebuild is triggered only when needed. The launcher is installed by setting the user-level CLAUDE_CODE_GIT_BASH_PATH env var, with the previous value saved for restore.

Usage

Use this principle when a tool must present itself as a native shell executable to a harness that spawns binaries by path. The SEA approach is the experimental quick path; the stub-with-routing-config is the GA plan for a smaller footprint.

Theoretical Basis

if stub available:
  copy stub → bash.exe
  write routing { node: process.execPath, bundle: dist/facade-sea.cjs }
else:
  node --experimental-sea-config sea-config.json   # produces sea-prep.blob
  copy node.exe → bash.exe
  postject inject bash.exe NODE_SEA_BLOB sea-prep.blob  # rewrite PE resource section
write marker { formatVersion, packageVersion, nodeVersion, bundleHash, ... }

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment