MNU, my macOS menu bar utility that lets you call up regularly used command line operations and more, now supports iTerm2, the popular alternative to macOS’ own Terminal app.
Continue readingTag Archives: cli
Crop picture files with confidence and pixel-precise offsets, using sips and imageprep
I recently had a rather large number of screenshots to process: specifically to crop them down to a small area about a third of screen width in and two-thirds of its height down. I could have done this manually, but it’s easy enough to make mis-crops when you’re cropping a couple of images by eye, let alone a 100 or so. The solution? Get your Mac to do it for you. Here’s how.
Continue readingHow to fix ‘xcodebuild’ macOS Terminal slowdowns
For a while, running commands and scripts in macOS’ Terminal has felt slower than it should, especially when opening Terminal for the first time. Clearly my .zshrc
file was being run, but there was a very noticeable pause between the completion of the script and before the prompt appeared. The gap was much less on my M1 Mac than my Intel machine, but still noticeable. Got the same problem? Here’s how to fix it.
Just released: imageprep 6.2.0 with powerful new features
imageprep, my command line tool for batch-processing picture files, had a big update a week or so back — and now it has another one. With the second update imminent, I didn’t announce the first, 6.1.0, which I released to coincide with my post on writing command line utilities in Swift. That done, it’s time to shout about imageprep 6.2.0.

How To Write macOS Command Line Tools with Swift
I’ve spent a lot of time of late working on several macOS command line tools written in Swift. So I’ve gathered together the key points I’ve learned while creating and updating pdfmaker and imageprep: some best practices and ways to deliver many of the features common to programs the run at the command line.
Continue readingOut now: a Swift-ier version of imageprep
I’ve just released version 6.0.0 of imageprep, my macOS command line tool for processing batches of images. Born a shell script, imageprep has now not only finished school and graduated from college, but also has gained employment as a fully compiled application. It’s written in Swift so it’s quicker these days.
Continue readingHow to Script macOS Command Line Tool Notarization and Packaging for Distribution
A few posts back, I talked about the script I use to package macOS apps that I distribute outside of the Mac App Store. That script is designed to simplify the complex process of signing and notarizing not only the app itself but also the installer package its ships within. This is all made necessary by the ever more rigorous, annoying but necessary security provisions Apple is applying to macOS.

Using the Z shell on the Mac and Pi
When Apple released MacOS Catalina, it decided to switch the default command line shell from the Bourne Again Shell, aka bash, to the Z Shell, aka zsh. One reason for this was that Apple installs a rather old version of bash, 3.3.57, to allow it to include the software under a licence it’s happy with. This isn’t a problem that affects zsh, so Apple can bundle a much more recent release.
That was no problem for me, either, because I long ago used Homebrew to install an up-to-date version of bash, 5.0.17, and have been happily using in preference to the Apple one. To do so yourself, run brew install bash
and then go to System Preferences > Users & Groups. Unlock if you need to then right-click on your name in the left-hand column and select Advanced Options…. Now highlight the Login shell: field and set the path to your preferred shell, in this case /usr/local/bin/bash
. Afterwards, you can enter echo $SHELL
to confirm the change.