| name | open-gui |
| description | Use when the user explicitly invokes $open-gui or asks to open a file, folder, URL, app, or other local target in the macOS GUI using the open command. Resolve descriptive phrases like "this folder" to the correct shell target, then run open. |
Open GUI
Open the user's requested target with macOS open.
Workflow
- Interpret the user's descriptive argument as the target to open.
- Resolve common phrases:
this folder, current folder, current directory, here, . -> .
repo, repository, project -> the current repository root if inside a Git repo, otherwise .
parent folder -> ..
home folder -> ~
- If the target is a file or folder name, verify it exists before opening. Use
rg --files or shell path checks when needed.
- If the target is a URL, app name, or Finder-compatible target, no existence check is required.
- Run
open "$TARGET" from the relevant working directory. Quote the target safely.
- If the description is ambiguous and there is no reasonable default, inspect local context first; ask only when the target cannot be determined.
Examples
$open-gui this folder -> open .
$open-gui current repo -> open "$(git rev-parse --show-toplevel)"
$open-gui the README -> find the README path, then open "$README_PATH"
$open-gui Safari -> open -a Safari