Instagram doesn’t make it easy to enable 2FA unless you’re using Google Authenticator or Duo Security. If you want to use it with another authenticator app—like 1Password—this script will generate the QR code you need to easily set that up.
The Ruby script makes use of Bundler’s inline functionality and will automatically install the depenedncies as system gems.
ruby qr.rb