- macOS: 14.0 (Sonoma) or later
- Swift: 6.0 or later
- Xcode: 16.0 or later (includes Swift compiler)
- Architecture: ARM64 (Apple Silicon)
# Check macOS version
sw_vers
# Check Swift version
swift --version
# Check Xcode version
xcodebuild -versiongit clone https://github.com/sadopc/machscope.git
cd MachScopeswift buildThe debug binary is located at .build/debug/machscope.
swift build -c releaseThe release binary is located at .build/release/machscope.
swift test# Run directly with swift run
swift run machscope parse /bin/ls
# Or use the built binary
.build/debug/machscope parse /bin/ls# Build release version
swift build -c release
# Copy to /usr/local/bin
sudo cp .build/release/machscope /usr/local/bin/
# Verify installation
machscope --versionAdd to your ~/.zshrc or ~/.bashrc:
alias machscope='/path/to/MachScope/.build/release/machscope'To use the debug command, MachScope needs the debugger entitlement.
# Build first
swift build
# Sign with debugger entitlement
codesign --force --sign - \
--entitlements Resources/MachScope.entitlements \
.build/debug/machscope- Open System Settings
- Go to Privacy & Security > Developer Tools
- Enable Terminal (or your terminal app)
- Restart Terminal
swift run machscope check-permissionsYou should see:
Debugger ✓ Ready
sudo rm /usr/local/bin/machscopeswift package clean
rm -rf .buildInstall Xcode Command Line Tools:
xcode-select --installClean and rebuild:
swift package clean
swift buildEnsure you have read access to the repository:
ls -laMake sure you have a valid signing identity:
security find-identity -v -p codesigningFor ad-hoc signing (no certificate needed), use - as the identity:
codesign --force --sign - ...- Quick Start Guide - Get started using MachScope
- Usage Guide - Complete command reference