A macOS system snapshot and restore assistant.
FreshMac captures and restores macOS system state: installed Homebrew packages, environment configurations, and user preferences. Useful for backup, system migration, or documenting current configuration.
Alpha. Tested on Apple Silicon (M1+) and Intel Macs running recent macOS. Do not rely on this for critical data without independent verification.
./bin/export.shGenerates output/freshmac_snapshot.txt containing package list and configuration state.
DRY_RUN=1 ./bin/export.shShow snapshot without writing to file.
./bin/restore.sh --snapshot output/freshmac_snapshot.txtInstalls packages and restores configurations from snapshot.
bin/- Snapshot export and restore scriptspipeline/- Package resolution and vendor enrichment utilitiesdocs/- Technical specifications (SNAPSHOT_SCHEMA.md)output/- Snapshot files and working data
See docs/SNAPSHOT_SCHEMA.md for schema definition (v0.1).
- Homebrew-only (no macOS system settings)
- Snapshots capture installed packages, not configurations
- Vendor enrichment is best-effort (may fail for private packages)
- No support for cask or mas package managers
-
macOS 10.15+
-
Homebrew installed
-
Python 3.8+
-
Bash 3.2+
-
Snapshots your installed Homebrew packages and taps
-
Resolves discovered applications to Homebrew packages where available
-
Enriches unresolved applications with official vendor download sources
-
Guides safe restoration after a macOS reset
- No uninstalling or cleanup of your system
- No automatic installation of manually-tracked applications
- No system modifications by default (dry-run safe)
- No guarantees of full automation; manual review and intervention remain necessary
# Generate a snapshot of your system
./bin/export.sh
# Preview restoration (safe, non-destructive)
DRY_RUN=true ./bin/restore.sh output/freshmac_snapshot.txt
# Execute restoration (only after reviewing preview)
DRY_RUN=false ./bin/restore.sh output/freshmac_snapshot.txt
# Validate snapshot schema (optional)
./bin/verify_snapshot_v01.sh output/freshmac_snapshot.txtSnapshots are plain-text, version-controlled files with a frozen schema.
Schema Version: v0.1 (frozen)
Canonical Sections:
- HOMEBREW TAPS — Required taps for your formulae
- HOMEBREW RESTORE COMMAND — One or two
brew installcommands - MANUAL INSTALLATIONS WITH OFFICIAL SOURCES — Apps not in Homebrew
Snapshots are human-readable and can be version-controlled. See docs/SNAPSHOT_SCHEMA.md for the complete specification.
- DRY_RUN defaults to true — Preview mode shows what restore would do, with no changes
- Only
brew installandbrew install --caskare executed — No arbitrary shell commands - Manual installs are informational only — Vendor download links are provided; you decide whether to install
- Deterministic outputs — Same inputs always produce identical snapshots
- macOS 10.13 or later
- Bash 3.2+ (system default)
- Python 3.6+ (optional, for app resolution and enrichment)
- Homebrew (optional, for package restore)
- bin/export.sh — Collects system state and generates snapshot
- bin/restore.sh — Validates snapshot and guides restoration
- bin/verify_snapshot_v01.sh — Lightweight schema validator
- pipeline/resolver.py — Resolves app names to Homebrew packages
- pipeline/enrich.py — Enriches unresolved apps with vendor sources
Alpha — Schema v0.1 is frozen and stable; implementation continues to improve.
Not yet v1.0. Behavior may refine in minor updates without changing the schema contract.
- docs/SNAPSHOT_SCHEMA.md — Snapshot format specification