bash

Programmatically Generate qrcodes on macOS

I recently needed to make device URLs easy for a service desk team to access. To do so I just piped the URLs into a little app called qrencode. First, I needed to install qrencode, which is pretty easy to do using brew:

brew install qrencode

Once installed, it’s trivial to pipe the quoted URL into the app with an output (or -o) into a png file. For example:

echo "http://thehistoryofcomputing.libsyn.com" | qrencode -o ~/Desktop/History.png

Once generated, you can use the camera on an iOS device to automatically open URLs by pointing them at the code and then tapping the notification that appears.