Grant Full Disk Access to Terminal to fix the shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted error on macOS.
Since macOS Mojave (10.14), macOS restricts apps from reading certain directories without Full Disk Access. When you run AntCubeTool from Terminal, Terminal is the app that requires this permission—not AntCubeTool itself.
Grant Full Disk Access to Terminal
The steps vary by macOS version.
macOS Ventura (13) and later
Open System Settings.
Go to Privacy & Security > Full Disk Access.
Enable the toggle next to Terminal.
Quit and relaunch Terminal.
macOS Monterey (12) and earlier
Open System Preferences.
Go to Security & Privacy > Privacy > Full Disk Access.
Click the lock icon and authenticate with an admin password.
Click +, navigate to Applications > Utilities, and select Terminal.
Quit and relaunch Terminal.
After relaunching, run your AntCubeTool command again. The error should not appear.
If the error persists after relaunching, remove Terminal from the Full Disk Access list, re-add it, and relaunch again.