sill
Native Windows Bash for AI coding agents. Run Claude Code, Codex, opencode & Gemini CLI without Git Bash, MSYS2 or WSL. Built in Rust, with MCP support.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/lemonadesaltbagel--sill)HTML
<a href="/listings/lemonadesaltbagel--sill"><img src="/api/listings/lemonadesaltbagel--sill/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
With [Scoop](https://scoop.sh):
scoop bucket add sill https://github.com/lemonadesaltbagel/scoop-sill scoop install sill/sill
This puts `sill` on PATH. The drop-in `bash.exe` is `~\scoop\apps\sill\current\bash.exe`; see [With an agent harness](#with-an-agent-harness).
Or with the installer script:
1. Download `sill-windows-x64.zip` and `install-windows.ps1` from the [latest release](../../releases/latest). 2. In PowerShell, run:
powershell -ExecutionPolicy Bypass -File install-windows.ps1 -Zip sill-windows-x64.zip -AddToPath -ClaudeCode
The installer unpacks to `%LOCALAPPDATA%\Programs\sill`. The options: - `-AddToPath` puts sill on your user PATH. - `-ClaudeCode` points Claude Code's Bash tool at sill, in `~\.claude\settings.json`. Your other settings are kept, and the old file is saved as `settings.json.bak`. - `-Mcp codex,gemini,claude` adds sill's MCP server to any of these: - Codex CLI (`~\.codex\config.toml`); - Gemini CLI (`~\.gemini\settings.json`); - Claude Desktop (`%APPDATA%\Claude\claude_desktop_config.json`).
Each is merged with what's there, and the old file is saved as `.bak`. Approvals stay as you've set them in the client.
The installer changes nothing else. sill itself creates one folder: `\tmp` on the current drive, for `/tmp` (see [Known limits](#known-limits)).
With an agent harness
| harness | how | |---|---| | Claude Code | `CLAUDE_CODE_GIT_BASH_PATH` = `...\sill\bash.exe` (what `-ClaudeCode` sets) | | opencode | `SHELL` = `...\sill\bash.exe` | | Codex CLI, Gemini CLI, Claude Desktop | As an MCP server: `-Mcp codex,gemini,claude` | | any MCP client | Command `...\sill\bash.exe`, arguments `--mcp` (stdio). Allow tool calls up to 11 minutes |
The MCP server
`bash.exe --mcp` gives the model three tools: - `bash` runs a command and returns its stdout, stderr and exit code. The working directory, exported variables, functions, aliases and options carry over to the next call (not `set -e`, and not unexported variables), however the command ends, its own `trap ... EXIT` included. A timeout (default 2 minutes, at most 10) ends the command and every program it started. With `run_in_background`, it starts a server or watcher and returns a job id at once. - `bash_output` reads a background job's new output. - `bash_kill` stops a background job and everything it started.
Each command runs in a fresh sill process, inside a Job Object it joins before it starts. So a crash or a hang can't take the server down, and a timeout or `bash_kill` ends every program the command started. Programs a command leaves running become a background job: the result says so, `bash_output` and `bash_kill` work on them, and they end with the session.
The first command runs in the project the client names (its MCP roots), if it offers one. Otherwise it runs where the client started the server, or in your home folder when that's the client's own install folder (as Claude Desktop does). `SILL_MCP_ROOT` sets it explicitly.
Output is read as UTF-8; a line that isn't is read in the system's ANSI code page (GBK on Chinese Windows), which some programs write into a pipe whatever the console's is. Java does so since JDK 18, and loses what that code page can't hold (Chinese comes out as `??` on English Windows), so the server sets `JAVA_TOOL_OPTIONS=-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8` for its commands, and leaves out the `Picked up JAVA_TOOL_OPTIONS` note each JVM prints for it. A value of your own (even an empty one) is kept.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 236 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- # sill
- **Bash for coding agents on native Windows.** sill is a drop-in `bash.exe`: a Bash interpreter (a fork of [brush](https://github.com/reubeno/brush)) with a Windows adapter built for the way agents run commands. It needs no Git, MSYS2 or WSL. Point Claude Code, opencode or Codex at it, or add it to Codex CLI or Gemini CLI as an MCP server, and the agent's shell commands behave the way the model expects from Linux, on Windows' own programs and files.
- ## Why
- An agent on Windows loses most of its failed commands at the boundary between the shell and Windows, not in its own reasoning:
- - **Arguments:** `*` and quotes get re-expanded or mangled on their way to `.exe` and `.bat` programs.
- - **Paths:** `/c/...` and `C:\...` forms get mixed up.
- - **Encoding:** non-English text turns to mojibake.
- - **Console windows:** one flashes up per command.
- - **Background servers:** they hold the harness's output pipe until it times out.
- - **Missing tools:** `make`, `rg`, `ps`, `lsof` aren't there.
- sill takes each of these on directly, with a test for each.
- ## Results
- Measured on Windows with the Git Bash that ships with Git for Windows (and, for agents, PowerShell) as the comparison. Every suite, task and runner below is public in [sill-bash-tests](https://github.com/lemonadesaltbagel/sill-bash-tests), with a workflow to rerun it.
- ### Where Windows gets in the way, sill holds up
- **Conformance suite:** 108 cases of what agents rely on, each with the reason it matters, run through `bash.exe -c` and through the MCP server, with sill installed in a folder whose name has a space. sill passes **108/108** both ways; Git Bash passes 78.
- | area | cases | sill | Git Bash |
- |---|---|---|---|
- | Encoding (non-English text through pipes, file names, git paths, `$(...)` of legacy output) | 11 | **11** | 5 |
- | Arguments to native programs (`*`, quotes, `/` switches, `.bat`) | 13 | **13** | 10 |
- | Tools agents use (`rg`, `ps`, `pgrep`, `make`, `jq`, `uname`, `stat`, ...) | 17 | **17** | 14 |
- | Processes (background jobs, `kill`, `pkill`, `disown`) | 12 | **12** | 10 |
- | Line endings and bytes | 5 | **5** | 3 |
- | Size limits (long scripts, thousands of arguments) | 4 | **4** | 3 |
- | Running scripts (`#!`, `cmd /c NAME.bat`, CRLF files, traps in subshells and functions) | 10 | **10** | 7 |
- | Programs that prompt (`git commit` with no message, `vi`, pagers) | 4 | **4** | 1 |
- | Look-alikes (inputs sill's rules must leave alone) | 12 | **12** | 7 |
- | Paths, files, errors (install hints, syntax errors in bash's words) | 20 | **20** | 18 |
- In a Chinese-locale Windows container (code page 936, no Git on the machine), sill passes **106/106** of the cases that apply there, also with a windowless console; Git Bash passes 72.
- **Real agents, fewer failed commands:** 18 tasks with automatic checks (a Makefile project, an npm dev server started and stopped, Unicode paths, a `.bat` with `%` arguments, 4,000 files, an MSVC build), DeepSeek's low-cost model, two runs per task on the Chinese-locale laptop:
- | harness | sill | Git Bash | PowerShell |
- |---|---|---|---|
- | Claude Code | 34/36 passed, **1** failed call of 120, **493 s** | 35/36, 8 of 154, 637 s | 35/36, 9 of 141, 777 s |
- | opencode | **35/36**, **3** of 104, **403 s** | 35/36, 18 of 149, 622 s | 29/36, 15 of 132, 904 s |
- | Codex CLI | **36/36**, **6** of 136, **634 s** | 36/36, 22 of 172, 846 s | 35/36, 44 of 208, 1094 s |
- **For harnesses whose shell is PowerShell**, sill's MCP server, added as it comes, on the same tasks:
- | harness | with sill's MCP server | PowerShell only |
- |---|---|---|
- | Codex CLI | **36/36** passed, **10** failed calls of 119, **501 s** | 35/36, 44 of 208, 1094 s |
- | Gemini CLI | **36/36**, 5 of 90, **335 s** | 31/36, 5 of 150, 1195 s |
- Given the choice, the models moved their shell work to sill: all of it under Gemini CLI, most of it under Codex.
- ### On everyday coding work, nothing is given up
- Two public benchmarks, limited to the tasks that work on native Windows at all, with Claude Code and DeepSeek's model. On these, all three shells solve about as many tasks (the differences are within run-to-run variation); sill gets there with fewer failed shell calls.
- **[Terminal-Bench 2.1](https://github.com/harbor-framework/terminal-bench-2-1)**, the 26 tasks whose reference solution runs on Windows (build software, process data, train and query models, crack ciphers, debug), two runs each:
- | | sill | Git Bash | PowerShell |
- |---|---|---|---|
- | tasks solved | 45/52 | 48/52 | 45/52 |
- | failed shell calls | **72 of 1,120 (6%)** | 78 of 1,150 (7%) | 89 of 1,033 (9%) |
- | turns | **1,100** | 1,302 | 1,429 |
- | time | **6.0 h** | 6.6 h | 6.3 h |
- Run without a model, the tasks' reference solutions (correct bash scripts) pass in sill as in Git Bash: 26 against 25.
- **[SWE-bench Verified](https://www.swebench.com)**, the 43 of 83 sampled tasks whose tests run on Windows (astropy, django, pytest, requests, sympy, ...), one run each:
- | | sill | Git Bash | PowerShell |
- |---|---|---|---|
- | tasks solved | 38/43 | 35/43 | 38/43 |
- | failed shell calls | **20 of 568 (4%)** | 29 of 613 (5%) | 75 of 409 (18%) |
- **Windows-boundary tasks** ([`winbench`](https://github.com/lemonadesaltbagel/sill-bash-tests)): 17 longer tasks where Windows gets in the way (MSVC and .NET builds, `.bat` and PowerShell scripts, a server to start and stop, a port or a file held by another process, GBK and UTF-8-BOM data, a CRLF merge, Unix-looking arguments such as API routes and Azure resource IDs), three runs each, on GitHub's runner and on a Chinese-locale Windows (code page 936):
- | | sill | Git Bash | PowerShell |
- |---|---|---|---|
- | tasks solved, en-US | 51/51 | 51/51 | 51/51 |
- | tasks solved, zh-CN | **45/45** | **45/45** | 42/45 |
- | turns, en-US / zh-CN | **431** / **375** | 509 / 384 | 471 / 404 |
- | failed shell calls, en-US / zh-CN | 7% / **3%** | 9% / 4% | 7% / 7% |
- Run without a model, the tasks' reference solutions pass in sill 17 of 17, in Git Bash 12: Git Bash rewrites `/api/v2/orders` or `/subscriptions/...` into `C:/Program Files/Git/...` before a program sees it, and its `kill` leaves a server running. Agents know these and work around them, at the cost of extra commands.
- Runs that say nothing about the shell aren't counted: where the model's API failed, a task's environment didn't build, or the agent looked up the task's tests or solution (on the machine or online). The runner reruns just those.
- **Bash itself:** brush's compatibility suite, with Git Bash as the reference, passes 2,435 of 2,933 runnable cases on Windows (83%). The rest are mostly Unix signals and job control (Windows has no equivalent), `coproc`, debugging options (`extdebug`, `functrace`), rarely used `declare` forms, and Git Bash's own differences, such as its `/usr/bin` paths.
- ## Install
- With [Scoop](https://scoop.sh):
- scoop bucket add sill https://github.com/lemonadesaltbagel/scoop-sill
- scoop install sill/sill
- This puts `sill` on PATH. The drop-in `bash.exe` is `~\scoop\apps\sill\current\bash.exe`; see [With an agent harness](#with-an-agent-harness).
- Or with the installer script:
- 1. Download `sill-windows-x64.zip` and `install-windows.ps1` from the [latest release](../../releases/latest).
- 2. In PowerShell, run:
- powershell -ExecutionPolicy Bypass -File install-windows.ps1 -Zip sill-windows-x64.zip -AddToPath -ClaudeCode
- The installer unpacks to `%LOCALAPPDATA%\Programs\sill`. The options:
- - `-AddToPath` puts sill on your user PATH.
- - `-ClaudeCode` points Claude Code's Bash tool at sill, in `~\.claude\settings.json`. Your other settings are kept, and the old file is saved as `settings.json.bak`.
- - `-Mcp codex,gemini,claude` adds sill's MCP server to any of these:
- - Codex CLI (`~\.codex\config.toml`);
- - Gemini CLI (`~\.gemini\settings.json`);
- - Claude Desktop (`%APPDATA%\Claude\claude_desktop_config.json`).
- Each is merged with what's there, and the old file is saved as `.bak`. Approvals stay as you've set them in the client.
- The installer changes nothing else. sill itself creates one folder: `\tmp` on the current drive, for `/tmp` (see [Known limits](#known-limits)).
- ### With an agent harness
- | harness | how |
- |---|---|
- | Claude Code | `CLAUDE_CODE_GIT_BASH_PATH` = `...\sill\bash.exe` (what `-ClaudeCode` sets) |
- | opencode | `SHELL` = `...\sill\bash.exe` |
- | Codex CLI, Gemini CLI, Claude Desktop | As an MCP server: `-Mcp codex,gemini,claude` |
- | any MCP client | Command `...\sill\bash.exe`, arguments `--mcp` (stdio). Allow tool calls up to 11 minutes |
- A harness that can only start programs from Windows PowerShell 5.1 should use the MCP server or a script file (`bash.exe script.sh`), not `bash.exe -c '...'` with quotes in the command: PowerShell 5.1 drops the inner double quotes when it builds the command line, so `& bash.exe -c 'printf "[%s]\n" "a b"'` prints `[a]n`.
- ### The MCP server
- `bash.exe --mcp` gives the model three tools:
- - `bash` runs a command and returns its stdout, stderr and exit code. The working directory, exported variables, functions, aliases and options carry over to the next call (not `set -e`, and not unexported variables), however the command ends, its own `trap ... EXIT` included. A timeout (default 2 minutes, at most 10) ends the command and every program it started. With `run_in_background`, it starts a server or watcher and returns a job id at once.
- - `bash_output` reads a background job's new output.
- - `bash_kill` stops a background job and everything it started.
- Commands run one at a time. Calls a client makes in parallel run in no set order, so a `cd` or `export` in one of them may or may not be in effect for the other; chain commands that depend on each other in one call.
- Each command runs in a fresh sill process, inside a Job Object it joins before it starts. So a crash or a hang can't take the server down, and a timeout or `bash_kill` ends every program the command started. Programs a command leaves running become a background job: the result says so, `bash_output` and `bash_kill` work on them, and they end with the session.
- The first command runs in the project the client names (its MCP roots), if it offers one. Otherwise it runs where the client started the server, or in your home folder when that's the client's own install folder (as Claude Desktop does). `SILL_MCP_ROOT` sets it explicitly.
- Output is read as UTF-8; a line that isn't is read in the system's ANSI code page (GBK on Chinese Windows), which some programs write into a pipe whatever the console's is. Java does so since JDK 18, and loses what that code page can't hold (Chinese comes out as `??` on English Windows), so the server sets `JAVA_TOOL_OPTIONS=-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8` for its commands, and leaves out the `Picked up JAVA_TOOL_OPTIONS` note each JVM prints for it. A value of your own (even an empty one) is kept.
- ## What's inside
- **Running programs**
- - **Exact arguments:** command lines are encoded for each target, using the C runtime's rules for `.exe` and cmd.exe's rules for `.bat`/`.cmd`. `*` and `?` arrive as typed.
- - **Long argument lists:** sill's own tools and the bundled GNU tools accept any number of arguments, past Windows' 32,767-character limit, through an args file. Other programs that hit the limit fail with "Argument list too long" and a note on what to use instead.
- - **`#!` scripts** run through their interpreter: `./build.sh`, `./gradlew`, `#!/usr/bin/env python3`. `sh` is sill.
- - **`cmd /c '... >nul'`:** Claude Code rewrites `>nul` to `>/dev/null`; sill reads that back as `nul`.
- - **`exec`** runs the program and exits with its status, so wrapper scripts work.
- - **`apply_patch`**, the file-editing command Codex's models are trained on, takes its patch from stdin or as an argument, and keeps each file's line endings.
- - **Background jobs** (`server > log 2>&1 &`) don't hold the harness's output pipe. `kill`, `pkill` and `killall` end whole process trees, but never the harness or the Windows session's processes.
- **Paths and text**
- - **Paths:** `$PWD`, `~`, `$HOME` and `$TMPDIR` use `C:/...` form, and `/c/...` and `/tmp` work wherever the shell opens a file. An argument to another program is rewritten only when the whole argument is a `/c/...` path to something that exists (`python /d/work/solve.py` gets `D:/work/solve.py`); switches like `/c` or `/s`, a bare drive, a path that doesn't exist and `--opt=/c/...` reach the program as written.
- - **No console windows:** a shell started without a console, as Claude Code starts it, gets one invisible UTF-8 console. No window opens per command, and Windows' messages arrive readable.
- - **Error messages:** system errors use POSIX wording ("No such file or directory"), not Windows' sentence in the user's language.
- - **git** prints non-ASCII paths unescaped.
- **Bash behavior**
- - `trap ... EXIT INT TERM`, process substitution (`diff <(a) <(b)`), `read -t`, `ulimit`, `$OSTYPE=msys`.
- - `$EUID` is a regular user's, even when elevated, as in Git Bash.
- **Package managers:** npm, npx, yarn and pnpm run `package.json` scripts in sill, unless you've configured a script shell. Scripts that look written for cmd.exe get a one-line note.
- **Visual C++:** `msvc-env [arch]` loads Visual Studio's C/C++ environment into the shell, cached: about 55 ms against 2 s for `vcvars64.bat`.
- **Bundled tools (all native Windows programs):**
- - **Built into sill:** the coreutils (uutils) and `find` (uutils findutils, printing `/` paths, also for `-exec`).
- - **GNU builds:** grep, sed, diffutils and make, with a UTF-8 code page, so any file name works (including names whose 8.3 short name is long in UTF-8, such as `文件 ü.txt`, which the C runtime's directory listing otherwise fails on).
- - **Others:** ripgrep, jq, and busybox-w32 for awk, xargs, patch, gzip and the rest.
- - **For Windows:** `ps`, `pgrep`, `pkill`, `killall`, `kill`, `lsof` (files and ports), `file`, `cygpath`, `nohup` and `setsid`.
- **Defaults for agents:**
- - UTF-8 Python.
- - No pagers, prompts or update notices.
- - Telemetry off.
- - English .NET and MSBuild messages.
- A value you've already set is kept. All of these are visible with `env`.
- ### Settings
- | variable | effect |
- |---|---|
- | `SILL_NO_ENV_DEFAULTS=1` | Turns the defaults above off, and English for sill's own messages too |
- | `LANG`, `LC_ALL`, `LC_MESSAGES` | A language other than English keeps sill's own messages in it |
- | `SILL_CONSOLE_CP` | The code page of the invisible console (default 65001, UTF-8) |
- | `SILL_TRACE=<file>` | Appends each invocation's arguments and working directory to the file, one JSON line each |
- ## Known limits
- - **`/tmp` is `\tmp` on the current drive**, as Windows and Claude Code's own file tools read `/tmp/x`. sill creates the folder when it's missing. Mind three things:
- - It's a different folder on each drive: what was written to `/tmp` while working on `D:` isn't there from `C:`.
- - It's created at the drive's root and inherits that folder's permissions: on a machine several people use, the others can typically change files in it, as in a `/tmp` without the sticky bit.
- - Use `$TMPDIR` (your user's temporary folder) for anything private.
- - **Windows has no signals.** Traps for INT and TERM are accepted and listed, but only `EXIT`, `ERR`, `DEBUG` and `RETURN` run (in subshells and functions as in bash). `kill` ends processes.
- - **Unsupported:** `coproc`, stopped jobs (`fg` after Ctrl+Z), passing descriptors above 2 to a program, `exec -a`, and `cp <(cmd) file`.
- - **Programs a finished command leaves running keep running** (`start`, an editor, a build daemon), as from a terminal. A command killed before it finishes, by a harness's timeout for one, takes everything it started with it. Through the MCP server, such leftovers become a background job of the session and end with it.
- - **Java writes its console output in the ANSI code page** when it goes to a pipe (JDK 18 and later), so through `bash.exe -c` non-ASCII text from Java arrives garbled (GBK on Chinese Windows) or as `??` (characters the code page can't hold). sill doesn't change Java's settings there, since the fix makes every JVM print a note on stderr, which breaks scripts that read `java -version 2>&1`. To get UTF-8, set `JAVA_TOOL_OPTIONS=-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8` in your environment. The MCP server does this for you.
- - **Process substitution** passes a named pipe (`\\.\pipe\...`), which programs open like a file.
- - **Elevation:** when sill runs elevated, network drives mapped in your normal session aren't visible to it, as for any elevated program.
- - **No `sudo`, `apt` or `systemctl`:** sill doesn't emulate Linux administration. These commands fail with a note naming the Windows way.
- ## Build from source
- You need a Windows machine with Rust (the version in `rust-toolchain.toml`) and Visual Studio's C++ tools:
- cargo build --release -p sill
- This gives `target\release\bash.exe`. The bundled tools are cross-built on Linux with mingw-w64:
- - `scripts/build-busybox.sh`
- - `scripts/build-gnu-tools.sh`
- - `scripts/fetch-tools.sh` (pinned and checksummed)
- `scripts/package-windows.ps1` assembles the zip, and `scripts/dist-check.sh` checks it on a PATH with only Windows' own directories. `.github/workflows/build.yml` runs all of this, and publishes a release for a `v*` tag.
- ## Layout
- | path | what |
- |---|---|
- | `crates/sill` | The app: `bash.exe` and `sill.exe`, the console and environment setup, the MCP server (`src/mcp.rs`), and the tests that replay Claude Code's shell contract |
- | `crates/sill-winargs` | argv to Windows command line, checked against `spec/argv-test-vectors.json` |
- | `crates/sill-errno` | POSIX wording for Windows error codes |
- | `third_party/brush` | The Bash interpreter, vendored; sill's changes are marked `sill:` |
- | `third_party/findutils`, `third_party/uucore` | uutils crates, vendored for small changes, marked `sill:` |
- | `third_party/gnu-tools`, `third_party/busybox-w32` | What the GNU and busybox builds add: a UTF-8 manifest, the args-file shim, a sed patch |
- | `scripts/` | Building the tools, packaging, installing, and checking the distribution |
- See [CHANGELOG.md](CHANGELOG.md) for what each release changed.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.