Skip to content

Instantly share code, notes, and snippets.

@leonkasovan
Last active August 14, 2026 01:49
Show Gist options
  • Select an option

  • Save leonkasovan/dc946bc3b87b160bf4006a24470e5010 to your computer and use it in GitHub Desktop.

Select an option

Save leonkasovan/dc946bc3b87b160bf4006a24470e5010 to your computer and use it in GitHub Desktop.

Setting Shell for Coding Agents

Setup MSYS2 MinGW64 Shell for CLI Coding Agents (in Powershell)

$env:SHELL="C:\msys64\usr\bin\bash.exe"; $env:MSYSTEM="MINGW64"; $env:CHERE_INVOKING="1"; $env:GOROOT="C:\msys64\mingw64\lib\go"; $env:GOPATH="$env:USERPROFILE\go"
freebuff
mimo
opencode

Setup MSYS2 MinGW64 Shell for CLI Coding Agents (in cmd.exe)

@echo off
set SHELL=C:\msys64\usr\bin\bash.exe
set MSYSTEM=MINGW64
set CHERE_INVOKING=1
set GOROOT=C:\msys64\mingw64\lib\go
set GOPATH=C:\msys64\home\Administrator\go
set GOCACHE=C:\msys64\home\Administrator\.cache\go-build
set PATH=C:\msys64\usr\bin\;C:\msys64\mingw64\bin;%PATH%
echo "MSYS2 shell ready for agentic AI."

Setup w64devkit MinGW64 Shell for CLI Coding Agents (in cmd.exe)

@echo off
set SHELL=C:\w64devkit\bin\sh.exe
set PATH=C:\w64devkit\bin;C:\go1.26.5.windows-amd64\go\bin;%PATH%
set GOROOT=C:\go1.26.5.windows-amd64\go
set GOCACHE=C:\Users\Novan\AppData\Local\go-build
set GOPATH=C:\Users\Novan\go
echo "w64devkit shell ready for agentic AI."

Reduce token usage with tokless

irm https://raw.githubusercontent.com/HoangP8/tokless/main/scripts/install.ps1 | iex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment