Those people who think they know everything are a great annoyance to those of us who do.
— Isaac Asimov
Asimov automatically excludes development dependencies from macOS Time Machine backups. It scans your home directory for known dependency directories (e.g. node_modules/, vendor/, .venv/), verifies that the corresponding config file exists alongside them, and tells Time Machine to skip them. No more wasting backup space on files you can restore with a single command.
Requirements: macOS with Bash (e.g. macOS 14+).
brew install asimov
sudo brew services start asimov # run daily via launchdThat's it. Asimov will now run once a day and exclude any dependency directories it finds.
To run on-demand instead:
asimovTo see what would be excluded without changing Time Machine (dry run):
asimov --dry-runUse asimov --help for options and asimov --version for the version.
| Option | Description |
|---|---|
--dry-run |
Print what would be excluded without changing Time Machine |
--help |
Show usage and options, then exit |
--version |
Show version and exit |
Asimov recognizes dependency directories across 30+ patterns in these ecosystems:
| Ecosystem | Directories excluded |
|---|---|
| JavaScript / TypeScript | node_modules, .next, .nuxt, .angular, .svelte-kit, .turbo, .yarn, .parcel-cache, bower_components, elm-stuff |
| Python | .venv, venv, .tox, .nox, __pypackages__, build, dist |
| Rust | target |
| Go | vendor |
| PHP | vendor |
| Ruby | vendor |
| Java / Kotlin / Scala | .gradle, build, target |
| .NET (C# / F#) | bin, obj |
| Swift / Apple | .build, Carthage, Pods |
| Dart / Flutter | .dart_tool, .packages, build |
| Elixir | deps, _build, .build |
| Clojure | target, .cpcache, .shadow-cljs |
| Haskell | .stack-work |
| OCaml | _build |
| Zig | .zig-cache, zig-out |
| R | renv |
| DevOps / IaC | .terraform, .terragrunt-cache, .vagrant, .direnv, cdk.out |
| Game dev | .godot |
| Global caches | ~/.cache, ~/.gradle/caches, ~/.m2/repository, ~/.npm/_cacache, ~/.nuget/packages, ~/.kube/cache |
Each directory is only excluded when its corresponding config file (the "sentinel") exists — so node_modules is only excluded if package.json is present, vendor only if composer.json, go.mod, or Gemfile exists, etc.
brew install asimovFor the latest development version:
brew install asimov --headSchedule Asimov to run daily:
sudo brew services start asimovgit clone https://github.com/stevegrunwell/asimov.git --depth 1
cd asimov
make installThis copies Asimov to /usr/local/bin, sets up a daily launchd schedule, and runs it immediately.
Tip: Edit
com.stevegrunwell.asimov.plistbefore runningmake installto customize the schedule.
make uninstall # manual installations
# or
brew uninstall asimovAsimov is a thin wrapper around Apple's tmutil. It builds a single find command from all known dependency patterns, walks your home directory (skipping ~/Library and ~/.Trash), and pipes matching paths through tmutil addexclusion. It also unconditionally excludes well-known global tool caches (like ~/.cache, ~/.gradle/caches, and ~/.npm/_cacache) that can always be safely restored. Directories already excluded are skipped automatically — safe to run as often as you like.
Note: Asimov only excludes directories from Time Machine backups. It does not affect Spotlight indexing. To prevent Spotlight from indexing a directory, add it to the Privacy tab in System Settings > Spotlight (or Siri & Spotlight on newer macOS versions).
List everything excluded from Time Machine:
make exclusionsRemove an exclusion added in error:
tmutil removeexclusion /path/to/directoryContributions are welcome! See CONTRIBUTING.md for setup, guidelines, and how to add new dependency patterns.
MIT — Steve Grunwell