github yvgude/lean-ctx v2.21.4

latest releases: v3.7.1, v3.7.0, v3.6.26...
one month ago

Windows Shell Fix + Antigravity Support

Fixed — Windows: ctx_shell fails with "& was unexpected at this time"

  • PowerShell always preferred — On Windows, find_real_shell() now always attempts to locate PowerShell (pwsh.exe or powershell.exe) before falling back to cmd.exe. Previously, PowerShell was only used if PSModulePath was set — but when IDEs (VS Code, Codex, Antigravity) spawn the MCP server, this env var is often absent. Since AI agents send bash-like syntax (&&, pipes, subshells), cmd.exe cannot parse these commands. This was the root cause of "& was unexpected at this time" errors reported by Windows users.
  • LEAN_CTX_SHELL override — Users can set LEAN_CTX_SHELL=powershell.exe (or any shell path) to force a specific shell, bypassing all detection logic.

Added — antigravity agent support

  • lean-ctx init --agent antigravity — Now recognized as alias for gemini, creating the same hook scripts and settings under ~/.gemini/. Previously, Antigravity users had to know to use --agent gemini or run lean-ctx setup.

Testing

  • 19 new E2E tests covering shell detection, LEAN_CTX_SHELL override, shell command execution (pipes, &&, subshells, env vars), agent init (antigravity alias, unknown agent handling), Windows path handling in generated scripts, and bash script execution with Windows binary paths.
  • 10 new unit tests for Windows shell flag detection and shell detection logic.
  • All 659 tests passing, zero clippy warnings.

Upgrade

cargo install lean-ctx          # or
npm update -g lean-ctx-bin      # or
brew upgrade lean-ctx

Full Changelog: v2.21.4...v2.21.4

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.