← Agent directory

Goose

Ready GOOSE_SHELL env var Windows macOS Linux Difficulty Easy

One env var: on Windows the shell tool spawns GOOSE_SHELL and passes -c to any name that is not cmd/PowerShell — point it at niu.exe and done.

PowerShell · persist GOOSE_SHELL to the user environment
[Environment]::SetEnvironmentVariable('GOOSE_SHELL', "$env:LOCALAPPDATA\Programs\Niubash\niu.exe", 'User')

Steps

  1. Run the persistence command above, reopen the terminal, then start goose
  2. Have goose run any command (say ls) and confirm the output is bash dialect, not cmd

Verify

echo "SHELL=$SHELL"; uname -s — expect MSYS_NT- (goose's shell tool goes through niu -c at this point)

Rollback

[Environment]::SetEnvironmentVariable('GOOSE_SHELL', $null, 'User')

Notes & pitfalls

Sources

Chinese edition of this page: /agents/goose/