sigoden / llm-functions

Easily create LLM tools and agents using Bash/JavaScript/Python, also a library of commonly used LLM tools and agents.
MIT License
166 stars 22 forks source link

realpath: illegal option -- m #104

Closed eugeis closed 1 month ago

eugeis commented 1 month ago

Describe the bug I am using the coder agent on Macbook and getting the error:

realpath: illegal option -- m
usage: realpath [-q] [path ...]

I checked and the command "realpath -m" is used in multiple tools.

In Mac the command realpath does not have -m parameter. usage: realpath [-q] [path ...]

sigoden commented 1 month ago

The built-in Bash in macOS is version 3.2 (released in 2007), and the known tools (ls, cp, grep, sed, awk, etc.) are based on BSD. For better functionality and compatibility, it is recommended to install Bash version 5 and GNU tools.

Use brew to install Bash and GNU tools:

brew install bash coreutils gawk gnu-sed grep

And update the PATH environment variable:

export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/gawk/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/grep/libexec/gnubin:$PATH"
eugeis commented 1 month ago

thx