On Windows there is a tool Depends.exe to discover dependency of an EXE/DLL file on other DDLs. Which commandline tool is equivalent on Mac OS and Linux?
You can put something like following into your bashrc so that you can always use "ldd" as interface but it will redirect macos equivalent one if machine is mac.
# Macos equivalent of ldd
if [[ "$OSTYPE" =~ "darwin"* ]]
then
alias ldd="otool -L"
fi