github yvgude/lean-ctx v3.4.2

latest releases: v3.8.9, v3.8.8, v3.8.7...
one month ago

Fixed

  • Unicode SIGABRT in ctx_overview — directory path truncation used byte-index slicing (&dir[len-47..]) which panicked on multi-byte UTF-8 characters (Chinese, Japanese, Korean, emoji paths). Replaced with truncate_start_char_boundary() that respects char boundaries. Fixes #154.
  • Windows shell detection in Git Bash / MSYS2find_real_shell() now checks MSYSTEM/MINGW_PREFIX env vars before PSModulePath, preventing incorrect PowerShell detection when running inside Git Bash. Fixes #156.

Added

  • Shell hint in MCP instructions (Windows) — on Windows, instructions now include detected shell type with explicit guidance (e.g. "SHELL: bash (POSIX). Use POSIX commands, not PowerShell cmdlets"), helping LLMs generate correct commands for the active shell environment.
  • Shell mismatch hint in ctx_shell responses (Windows) — when a command fails and contains PowerShell cmdlets while the detected shell is POSIX, a correction hint is appended to the response.
  • shell_name() public API — returns the short shell basename (e.g. "bash", "powershell", "cmd") for use in instructions and hints.

Upgrade

lean-ctx update                 # recommended (auto-downloads + refreshes shell hooks)
cargo install lean-ctx          # or
npm update -g lean-ctx-bin      # or
brew upgrade lean-ctx

Note: After upgrading via cargo/npm/brew, run lean-ctx setup to refresh shell aliases. lean-ctx update does this automatically.

Full Changelog: v3.4.2...v3.4.2

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.