Skip to content

Offer BaoCode Bash on Windows, and run the built-in core's commands with it - #978

Merged
leookun merged 3 commits into
mainfrom
bash-exe
Nov 13, 2026
Merged

leookun merged 3 commits into
mainfrom
bash-exe

Conversation

@leookun

@leookun leookun commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

BaoCode Bash (baocode-dev/bash-exe, forked from oh-my-pi's shell) is a bash.exe for Windows: bash 5.3 with rg, grep, sed, awk, find, jq, tar and some 80 other tools built in, taking C:\x, C:/x, /c/x and /mnt/c/x alike.

CI (.github/workflows/bash-exe.yml)

  • Builds bash-exe on Windows x64 and arm64 and runs tool/test_bash_exe.ps1 there: the tools, the four path spellings, Windows programs (cmd /c, git, find /c going to Windows' find), exit statuses, stdin, background jobs, and a command run exactly as bao_agent runs one (the cwd file).
  • bash-exe-X.Y.Z tags build bash-exe's vX.Y.Z and publish to dl.baocode.dev/tools/bash-exe/X.Y.Z/ (a zip with the license for people, bash.exe gzipped for the app), then latest.json with sizes and SHA-256. The release environment now lets bash-exe-* tags in.

App

  • lib/bash_exe/: install, update, uninstall (checked against size and SHA-256; a folder per version in the data directory so a running one is never overwritten).
  • Settings → General → Command Line: status, version, Install (size) / Update / Uninstall.
  • Above every settings page, a recommendation for all but new users (first run here under 7 days ago, or under 5 messages sent), with Not Now for good. Shown only while the built-in core runs the agents: the Claude Code CLI is not given it yet (CLAUDE_CODE_GIT_BASH_PATH), pending a test on a real Windows machine.

bao_agent

  • Shell.find: CLAUDE_CODE_GIT_BASH_PATH → BaoCode Bash (BAOCODE_BASH, set by the app when installed) → Git Bash → cmd.exe.
  • The Bash tool tells the model the tools are built in and how paths may be written; the environment section names the shell instead of unknown on Windows.

Tests: test/bash_exe/bao_bash_test.dart, bao_agent utils_test.dart (Shell), and the Windows smoke test in CI.

🤖 Generated with BaoCode

kun6687 and others added 2 commits November 13, 2026 17:50
Co-Authored-By: BaoCode <noreply@baocode.dev>
…ith it

- lib/bash_exe/: installs, updates and removes it (dl.baocode.dev/tools/
  bash-exe/latest.json, checked against its size and SHA-256), a folder
  per version in the data directory. Settings -> General -> Command Line
  shows it; above every settings page it is recommended to all but a new
  user (first run here under 7 days ago, or under 5 messages sent), until
  put off for good, while the built-in core runs the agents.
- bao_agent: Shell.find takes it (BAOCODE_BASH) after the shell
  CLAUDE_CODE_GIT_BASH_PATH sets and before Git Bash; the Bash tool tells
  the model its tools are built in and how paths may be written, and the
  environment section names the shell in place of "unknown".
- CI publishes bash.exe gzipped for the app beside the zip, and the
  smoke test runs a command as bao_agent does.

Co-Authored-By: BaoCode <noreply@baocode.dev>
@leookun leookun changed the title BaoCode Bash on Windows Offer BaoCode Bash on Windows, and run the built-in core's commands with it Nov 13, 2026
…l leaves at once

Co-Authored-By: BaoCode <noreply@baocode.dev>
@leookun
leookun marked this pull request as ready for review November 13, 2026 10:36
@leookun
leookun merged commit 053a707 into main Nov 13, 2026
6 checks passed
@leookun
leookun deleted the bash-exe branch November 13, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants