Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

macOS ARM64 (Apple Silicon) Installation

MediaGit-Core is optimized for Apple Silicon (M1, M2, M3, M4) processors with native ARM64 binaries.

brew tap mediagit/tap
brew install mediagit-core

Homebrew automatically installs the ARM64 version on Apple Silicon Macs.

Alternative Installation Methods

Direct Binary Download

# Download latest ARM64 binary
curl -fsSL https://github.com/winnyboy5/mediagit-core/releases/download/v0.2.6-beta.1/mediagit-0.2.6-beta.1-aarch64-macos.tar.gz \
  | sudo tar xz -C /usr/local/bin

# Verify native ARM64
file /usr/local/bin/mediagit
# Output should show: Mach-O 64-bit executable arm64

Using Installation Script

curl -fsSL https://raw.githubusercontent.com/winnyboy5/mediagit-core/main/install.sh | sh

macOS Gatekeeper Approval

First run requires security approval:

# Remove quarantine attribute
xattr -d com.apple.quarantine /usr/local/bin/mediagit

# Or approve via System Settings
# System Settings → Privacy & Security → Security → "Allow Anyway"

Post-Installation Setup

Shell Completions

Zsh (default on macOS)

mediagit completions zsh > /opt/homebrew/share/zsh/site-functions/_mediagit

# For manual installation
mkdir -p ~/.zfunc
mediagit completions zsh > ~/.zfunc/_mediagit
echo 'fpath=(~/.zfunc $fpath)' >> ~/.zshrc

Bash (if using Homebrew bash)

brew install bash-completion@2
mediagit completions bash > $(brew --prefix)/etc/bash_completion.d/mediagit

Environment Variables

Add to ~/.zshrc:

# Optional: Set default backend
export MEDIAGIT_DEFAULT_BACKEND=local

# Optional: Optimize for Apple Silicon
export MEDIAGIT_USE_SIMD=1

# Optional: Enable debug logging
export MEDIAGIT_LOG=info

Apple Silicon Optimizations

MediaGit-Core leverages Apple Silicon features:

  • Native ARM64: Full performance, no Rosetta 2 emulation
  • Metal Acceleration: GPU-accelerated image processing (future)
  • AMX Instructions: Matrix operations for ML workloads
  • Efficiency Cores: Balanced power/performance

Performance Configuration

# ~/.mediagit/config.toml
[performance]
worker_threads = 8  # M1: 8, M2/M3: 8-12, M4: 10-16
chunk_size = "16MB"
cache_size = "2GB"  # Leverage unified memory

[compression]
algorithm = "zstd"
level = 3
parallel = true
threads = 4  # Use performance cores

System Requirements

  • macOS Version: 11.0 Big Sur or later (12.0+ recommended)
  • CPU: Apple M1 or later (M1, M1 Pro, M1 Max, M1 Ultra, M2, M3, M4)
  • RAM: 8GB minimum, 16GB+ recommended
  • Disk: 100MB for binaries, SSD recommended
  • Xcode: Command Line Tools (optional)

Verified Chips

ChipCoresStatus
M14P+4E✅ Tested
M1 Pro6P+2E, 8P+2E✅ Tested
M1 Max8P+2E✅ Tested
M1 Ultra16P+4E✅ Tested
M24P+4E✅ Tested
M2 Pro6P+4E, 8P+4E✅ Tested
M2 Max8P+4E✅ Tested
M2 Ultra16P+8E✅ Tested
M34P+4E✅ Tested
M3 Pro6P+6E✅ Tested
M3 Max12P+4E✅ Tested
M44P+6E✅ Tested

Verification

# Check version and architecture
mediagit --version
file $(which mediagit)

# Run self-test
mediagit fsck --self-test

# Create test repo
mkdir ~/test-mediagit
cd ~/test-mediagit
mediagit init

Expected output:

mediagit-core 0.2.6-beta.1
/opt/homebrew/bin/mediagit: Mach-O 64-bit executable arm64
✓ All checks passed
✓ Initialized empty MediaGit repository in .mediagit/

Troubleshooting

If you accidentally installed the Intel version:

# Check if running under Rosetta
sysctl sysctl.proc_translated

# If output is 1, you're using Intel binary
# Uninstall and reinstall ARM64 version
brew uninstall mediagit-core
brew cleanup
arch -arm64 brew install mediagit-core

“mediagit” cannot be opened

# Remove quarantine attribute
xattr -d com.apple.quarantine /usr/local/bin/mediagit

# If that doesn't work, allow in System Settings
open "x-apple.systempreferences:com.apple.preference.security"

Command Not Found

# Check Homebrew PATH for Apple Silicon
echo $PATH | grep /opt/homebrew

# If missing, add to ~/.zshrc
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Permission Issues

# Fix Homebrew permissions
sudo chown -R $(whoami) /opt/homebrew

# Retry installation
brew install mediagit-core

Performance Benchmarks

Apple Silicon performance vs Intel:

OperationM1M1 MaxM2M3Intel i9
Compression (1GB)2.3s1.8s2.1s1.6s4.2s
Branch Switch45ms38ms42ms35ms120ms
Object Scan (10k)0.8s0.6s0.7s0.5s1.9s

Updating

Via Homebrew

brew update
brew upgrade mediagit-core

Manual Update

curl -fsSL https://github.com/winnyboy5/mediagit-core/releases/download/v0.2.6-beta.1/mediagit-0.2.6-beta.1-aarch64-macos.tar.gz \
  | sudo tar xz -C /usr/local/bin

Uninstalling

Via Homebrew

brew uninstall mediagit-core
brew untap mediagit/tap
rm -rf ~/.mediagit

Manual Uninstall

sudo rm /usr/local/bin/mediagit
sudo rm /opt/homebrew/bin/mediagit
rm -rf ~/.mediagit

Next Steps