MachOKnife is a native macOS Mach-O browser and utility suite with an AppKit GUI, a companion CLI, Sparkle updates, and release tooling for DMG and appcast publishing.
- MachOKit-backed document browser with lazy tree expansion and MachO-Explorer-style grouping
- searchable workspace with RAW/RVA address modes,
DetailandDatapanes, and node-level copy/export actions - inspection support for thin and fat Mach-O binaries, load commands, sections, symbols, string tables, Objective-C metadata, and related grouped summaries
- localized Preferences for General, CLI, Appearance, and Updates, including immediate language refresh and adaptive window sizing
- Tools menu windows for
Retag,Build XCFramework,Mach-O Summary,Check Binary Contamination, andMerge / Split Mach-O machoe-clicommands for inspection, summary, contamination checks, merge/split, install-name editing, rpath rewriting, retagging, XCFramework packaging, and dyld-cache-style dylib repair- GRDB-backed recent files with security-scoped bookmark restoration after relaunch
- Sparkle update runtime plus scripted DMG, GitHub Release, and appcast generation
Packages/CoreMachO: low-level parsing and rewrite helpers shared by the app and CLIPackages/MachOKnifeKit: browser models, document services, and shared inspection logicPackages/MachOKnifeDB: GRDB-backed persistence primitivesMachOKnifeApp: AppKit application shell, preferences, workspace UI, and tool windowsMachOKnifeCLI:machoe-clisourcesResources/Localization: app localizationsResources/Fixtures: generated fixtures used by smoke testsResources/Updates: Sparkle feed outputScripts: build, DMG, release, and appcast helpers
Open MachOKnife.xcworkspace in Xcode and run the MachOKnife scheme, or build from Terminal:
xcodebuild build \
-workspace MachOKnife.xcworkspace \
-scheme MachOKnife \
-destination 'platform=macOS,arch=x86_64'- drag a Mach-O,
.dylib, framework binary, or app binary into the main workspace - use
File > Open… - use
File > Open Recentto reopen previously authorized files after app relaunch - use
File > Close Fileto return the workspace to the initial empty state with confirmation
- browse the document through a tree structured like MachO-Explorer
- search nodes from the main workspace
- switch the address column between
RAWandRVA - inspect semantic fields in
Detailand bytes inData - right-click any node or row to copy/export the current view
- export the selected node from the File menu or copy it from the Edit menu
General: language and core app behaviorCLI: install or uninstall the bundledmachoe-cliinto a user-selected directoryAppearance: follow system, light, or darkUpdates: manual, daily, and startup check strategies with Sparkle status visibility
Retag…: open a dedicated window for platform metadata retagging with drag and drop, target selection, output configuration, progress, and cancellationBuild XCFramework…: package iOS device/simulator/static-library inputs into an XCFramework, with optional automatic Mac Catalyst retaggingMach-O Summary…: generate a summary report for Mach-O files and archivesCheck Binary Contamination…: inspect binaries or archives for platform / architecture contaminationMerge / Split Mach-O…: merge multiple slices into one output or split fat inputs by architecture
Build the machoe-cli target from Xcode or through the MachOKnife scheme, then run:
machoe-cli info /path/to/binary
machoe-cli summary /path/to/binary
machoe-cli list-dylibs /path/to/binary
machoe-cli check-contamination /path/to/binary --mode architecture --target arm64
machoe-cli merge /path/to/arm64.a /path/to/x86_64.a --output /tmp/Merged.a
machoe-cli split /path/to/FatBinary --output-dir /tmp/SplitOutputs
machoe-cli validate /path/to/binary
machoe-cli set-id /path/to/libExample.dylib --install-name @rpath/libExample.dylib --output /tmp/libExample.dylib
machoe-cli rewrite-rpath /path/to/libExample.dylib --from /old/path --to @loader_path/Frameworks --output /tmp/libExample.dylib
machoe-cli retag-platform /path/to/libExample.dylib --platform macos --min 13.0 --sdk 14.0 --output /tmp/libExample.dylib
machoe-cli build-xcframework --source-library /path/to/libSDK.a --ios-simulator-source-library /path/to/libSDK-sim.a --headers-dir /path/to/Headers --output /tmp/SDK.xcframework
machoe-cli fix-dyld-cache-dylib /path/to/libCacheStyle.dylib --output /tmp/libCacheStyle.fixed.dylibTo build local verification fixtures:
bash Scripts/build_fixtures.sh
machoe-cli info Resources/Fixtures/generated/libFixture.dylib
machoe-cli list-dylibs Resources/Fixtures/generated/libFixture.dylibSparkle is wired through UpdateManager. The published feed lives at Resources/Updates/appcast.xml, and the app expects valid SUFeedURL and SUPublicEDKey values in the app configuration for production releases.
Build, notarize, publish, and refresh the feed with the included scripts:
bash Scripts/build_dmg.sh
bash Scripts/generate_appcast.sh --archive build/dmg/MachOKnife_V_1.3.0.dmg
bash Scripts/publish_github_release.sh --dmg build/dmg/MachOKnife_V_1.3.0.dmgbuild_dmg.shbuilds the app, re-signs it for distribution, creates the DMG, and can notarize itgenerate_appcast.shsigns Sparkle feed entries and writesResources/Updates/appcast.xmlpublish_github_release.shuploads the DMG to GitHub Releases and refreshes the appcast using the published release notes
Build the app and CLI from the workspace:
xcodebuild build \
-workspace MachOKnife.xcworkspace \
-scheme MachOKnife \
-destination 'platform=macOS,arch=x86_64'
xcodebuild build \
-workspace MachOKnife.xcworkspace \
-scheme machoe-cli \
-destination 'platform=macOS,arch=x86_64'Run package tests for the shared parsing and tooling layers:
swift test --package-path Packages/CoreMachO
swift test --package-path Packages/MachOKnifeKit




