o
odinpkg.dev
packages / tool / mackitforagent

mackitforagent

v1.0.0tool

A single-binary macOS utility toolkit for Apple Silicon (disk cleaner, image/video optimizer, screenshots, live system monitor), written in Odin.

MIT · updated 1 week ago

mackitforagent

A multi-purpose macOS command-line tool, written in Odin.

Currently ships an Apple Silicon (arm64) build only.

Install

One-liner — pulls the latest release binary, no Odin toolchain required:

curl -fsSL https://raw.githubusercontent.com/tuanhm1811/mackitforagent/main/install.sh | bash

The script downloads mackitforagent-vX.Y.Z-darwin-arm64.tar.gz from the latest GitHub Release, picks a sensible install dir (/usr/local/bin if writable, otherwise ~/.local/bin), strips the macOS quarantine xattr so Gatekeeper doesn't block the first run, and prints a PATH hint if the chosen dir isn't already on $PATH.

Agent skill (Claude Code)

If you use Claude Code, install the companion agent skill so Claude can drive mackitforagent on your behalf — cleaning caches, taking app-specific screenshots, optimising media, and so on:

npx skills add tuanhm1811/mackitforagent

The skill assumes the mackitforagent binary is already on $PATH, so install that first (see above).

Update

The binary updates itself — same install logic, no flags needed:

mackitforagent update            # install latest if newer
mackitforagent update --check    # report only; exits non-zero when update available
mackitforagent update --force    # re-run the installer even if already current

Usage

mackitforagent                              # interactive command menu
mackitforagent help <command>               # detailed help for a command
mackitforagent version                      # print version

clean — disk cleaner

mackitforagent clean                        # interactive cleaner
mackitforagent clean --risky                # include risky categories
mackitforagent clean -f                     # force file picker on every category
mackitforagent clean categories             # list all 16 cleanable categories
mackitforagent clean uninstall              # remove apps + their leftovers
mackitforagent clean maintenance --dns      # flush DNS cache
mackitforagent clean config --init          # create ~/.mackitforagent/clean/config.json
mackitforagent clean backup --list          # list pre-delete backups

clop — image & video optimiser

mackitforagent clop                         # interactive picker (operation + files)
mackitforagent clop -o photo.png            # optimise in place
mackitforagent clop -o ~/Pictures -r        # recurse into a directory
mackitforagent clop -d 50% clip.mp4         # downscale by factor
mackitforagent clop -c webp cover.png       # convert image format
mackitforagent clop -s IMG_2156.jpg         # strip EXIF metadata
mackitforagent clop -o -a -k photo.jpg      # aggressive preset, keep .orig backup

Operations shell out to format-specific CLIs (pngquant, jpegoptim, gifsicle, ffmpeg, vips, cwebp, heif-enc, exiftool). Missing tools trigger an interactive brew install prompt on first use. Supported formats: .png .jpg .jpeg .gif (images) and .mp4 .mov .m4v (videos).

shot — screenshots

mackitforagent shot                         # interactive picker (type to filter)
mackitforagent shot -s                      # capture full screen
mackitforagent shot -l                      # list running GUI apps with PIDs
mackitforagent shot -p 1234                 # capture a specific app by PID

All screenshots land in ~/Desktop as PNGs. First run may prompt for the Screen Recording permission in System Settings → Privacy.

update — self-updater

See Update above.

Build from source

Requires Odin (any recent dev-* build).

git clone https://github.com/tuanhm1811/mackitforagent.git
cd mackitforagent
make build                           # → build/mackitforagent
make test
make install                         # → /usr/local/bin/mackitforagent (or ~/.local/bin)

Override the embedded version for local builds:

make build VERSION=0.2.0-dev
./build/mackitforagent version              # → mackitforagent 0.2.0-dev

License

MIT.

Releasing

Releases are driven by git tags. Tagging vX.Y.Z triggers .github/workflows/release.yml, which:

  1. Builds mackitforagent on macos-14 (arm64), injecting the tag value into the binary via make release VERSION=X.Y.Z (no source edit needed).
  2. Tars the binary as mackitforagent-vX.Y.Z-darwin-arm64.tar.gz.
  3. Publishes it to a GitHub Release — which install.sh and mackitforagent update pull from.

Cutting a release

git tag v0.1.0
git push origin v0.1.0

The tag name (minus the leading v) becomes the binary's version — no source edits required.