Automated macOS maintenance CLI
Project description
mac-upkeep
Automated macOS maintenance CLI. Runs weekly via brew services to keep your dev environment clean.
Requires macOS — uses Homebrew, launchd, and macOS notifications.
Install
brew install calvindotsg/tap/mac-upkeep
brew services start mac-upkeep # Monday 12 PM weekly
Or via pip/uvx:
pip install mac-upkeep
uvx mac-upkeep run # one-off without installing
Tasks
Homebrew updates, dev tool cache pruning (gcloud, pnpm, uv), Fish plugin updates, system optimization via mole, and Brewfile enforcement.
mac-upkeep tasks # See all tasks with frequency and last-run status
Tasks auto-detect installed tools — missing tools are skipped. Each task runs on a weekly or monthly schedule. Use --force <task> to run a specific task on demand.
Usage
mac-upkeep run # Run tasks (frequency-checked)
mac-upkeep run --dry-run # Preview without executing
mac-upkeep run --force brew_update # Run only brew_update
mac-upkeep run --force all # Run all, ignoring schedule
mac-upkeep run --debug # Verbose output
mac-upkeep tasks # List tasks with status
mac-upkeep init # Generate config (detects your tools)
mac-upkeep show-config --default # Show all available task options
mac-upkeep show-config # Show your config overrides
mac-upkeep setup # Print sudoers rules
mac-upkeep status # Show brew service status
mac-upkeep logs # View last 20 log lines
mac-upkeep logs -f # Follow logs
mac-upkeep --version # Show version
Configuration
Works out of the box with zero configuration. To customize, generate a starter config:
mac-upkeep init
This probes your system, detects installed tools, and writes a commented config to ~/.config/mac-upkeep/config.toml. Only detected tasks are listed. Built-in defaults apply automatically — uncomment lines to override.
To see all available tasks and options:
mac-upkeep show-config --default
Override examples
# ~/.config/mac-upkeep/config.toml
# Disable a task
[tasks.gcloud]
enabled = false
# Change frequency (weekly or monthly)
[tasks.brew_update]
frequency = "monthly"
# Set Brewfile path explicitly
[paths]
brewfile = "~/.config/Brewfile"
Custom tasks
Add your own tasks using the same format:
[tasks.docker_prune]
description = "Prune Docker system"
command = "docker system prune -f"
detect = "docker"
frequency = "monthly"
# Control execution order
[run]
order = ["brew_update", "brew_upgrade", "docker_prune", "brew_cleanup", "brew_bundle"]
Environment variables
MAC_UPKEEP_GCLOUD=false mac-upkeep run # Disable a task
MAC_UPKEEP_GCLOUD_FREQUENCY=monthly mac-upkeep run # Override frequency
Sudoers
mo_clean and mo_optimize require passwordless sudo for the mo binary:
mac-upkeep setup | sudo tee /etc/sudoers.d/mac-upkeep && sudo chmod 0440 /etc/sudoers.d/mac-upkeep
sudo visudo -c
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mac_upkeep-2.1.0.tar.gz.
File metadata
- Download URL: mac_upkeep-2.1.0.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75158a9397bed8b8c356619cd435808e5731bd27c0c13189cdd6b050e3c0b7e7
|
|
| MD5 |
c6e98c59ac0b9b20db5a94f42409621c
|
|
| BLAKE2b-256 |
5a5e6ee87ecbafed7930d3742f4392c0686c8af7c86d9801e34f1ca046338ace
|
Provenance
The following attestation bundles were made for mac_upkeep-2.1.0.tar.gz:
Publisher:
release.yml on calvindotsg/maintenance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mac_upkeep-2.1.0.tar.gz -
Subject digest:
75158a9397bed8b8c356619cd435808e5731bd27c0c13189cdd6b050e3c0b7e7 - Sigstore transparency entry: 1252151457
- Sigstore integration time:
-
Permalink:
calvindotsg/maintenance@607be97bad478436c025785e8d6561b60da7394a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/calvindotsg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@607be97bad478436c025785e8d6561b60da7394a -
Trigger Event:
push
-
Statement type:
File details
Details for the file mac_upkeep-2.1.0-py3-none-any.whl.
File metadata
- Download URL: mac_upkeep-2.1.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc81c75f59d883882e576e2cacfc76d1b8c37db48a90db62bae755f03309c333
|
|
| MD5 |
4388f5d19d06886e63d56c6b92bbec1d
|
|
| BLAKE2b-256 |
78a73207bad93805a500dd86d76a73c9aaf8be48ca08b73b6d36aace9a378e7a
|
Provenance
The following attestation bundles were made for mac_upkeep-2.1.0-py3-none-any.whl:
Publisher:
release.yml on calvindotsg/maintenance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mac_upkeep-2.1.0-py3-none-any.whl -
Subject digest:
fc81c75f59d883882e576e2cacfc76d1b8c37db48a90db62bae755f03309c333 - Sigstore transparency entry: 1252151496
- Sigstore integration time:
-
Permalink:
calvindotsg/maintenance@607be97bad478436c025785e8d6561b60da7394a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/calvindotsg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@607be97bad478436c025785e8d6561b60da7394a -
Trigger Event:
push
-
Statement type: