Skip to main content

Module shell_env

Module shell_env 

Source
Expand description

Resolve the user’s full shell PATH for desktop GUI apps.

GUI applications may inherit a minimal PATH:

  • macOS Finder/Dock: /usr/bin:/bin:/usr/sbin:/sbin
  • Windows: usually fine, but may miss user-installed tools
  • Linux: depends on the desktop environment

This module recovers the user’s login-shell PATH so we can find CLI tools like opencode, claude, gemini, etc.

Functions§

full_path
Get the user’s full shell PATH. Cached after the first call.
which
Run a which-like check for a command using the full PATH.