<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harvey Marzban</title>
    <description>The latest articles on DEV Community by Harvey Marzban (@mmarvey).</description>
    <link>https://dev.to/mmarvey</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F109689%2F7d306f7f-418e-4e6a-a8e5-3348afc2c5cc.png</url>
      <title>DEV Community: Harvey Marzban</title>
      <link>https://dev.to/mmarvey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mmarvey"/>
    <language>en</language>
    <item>
      <title>I Rewrote My macOS Update Script in Go and Accidentally Built a Plist Parser</title>
      <dc:creator>Harvey Marzban</dc:creator>
      <pubDate>Tue, 01 Dec 2026 13:03:52 +0000</pubDate>
      <link>https://dev.to/mmarvey/i-rewrote-my-macos-update-script-in-go-and-accidentally-built-a-plist-parser-38fd</link>
      <guid>https://dev.to/mmarvey/i-rewrote-my-macos-update-script-in-go-and-accidentally-built-a-plist-parser-38fd</guid>
      <description>&lt;p&gt;Last year &lt;code&gt;brew upgrade --cask&lt;/code&gt; killed Slack and my editor five minutes before standup. My updater was a 20-line Bash script that ran everything in order, wiped old versions, and broke quietly on corporate Macs with Workbrew or MDM apps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frovp9lwvg1zlt3wwqoi3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frovp9lwvg1zlt3wwqoi3.png" alt="Developer meme: brew upgrade force-quitting Zoom, Slack, and IDE 5 minutes before standup" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Every time I tell myself it's just updating &lt;code&gt;ripgrep&lt;/code&gt;. Every time it goes straight for Slack.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I replaced it with &lt;strong&gt;&lt;a href="https://github.com/HMarzban/macup" rel="noopener noreferrer"&gt;macup&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;v6.1.1&lt;/code&gt;), a parallel Go + Bubble Tea updater that sticks mostly to the standard library.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8fm73pow1ua8670edz6e.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8fm73pow1ua8670edz6e.gif" alt="macup v6.1.1 terminal demo" width="720" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;22-second demo (&lt;a href="https://hmarzban.github.io/macup/demo.mp4" rel="noopener noreferrer"&gt;MP4&lt;/a&gt;): parallel lanes, 7-tab report, Doctor checks, and offline rollback.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Plists, APFS clones, and not killing Slack
&lt;/h3&gt;

&lt;p&gt;Scanning &lt;code&gt;/Applications&lt;/code&gt; meant forking &lt;code&gt;/usr/bin/plutil&lt;/code&gt; 50+ times just to read &lt;code&gt;Info.plist&lt;/code&gt; files. I got annoyed and wrote a fuzz-tested pure-Go &lt;code&gt;bplist00&lt;/code&gt; + XML parser (&lt;code&gt;internal/plist&lt;/code&gt;) instead. Same trick for &lt;code&gt;$GOBIN&lt;/code&gt;: &lt;code&gt;debug/buildinfo&lt;/code&gt; reads versions directly from compiled binaries and even flags Rosetta &lt;code&gt;amd64&lt;/code&gt; tools hiding on Apple Silicon.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;macup&lt;/code&gt; also refuses to kill open GUI apps. It stages pure-&lt;code&gt;.app&lt;/code&gt; casks until you quit, protects Workbrew and MDM-owned corporate apps, keeps 7-day Cellar kegs, and clones &lt;code&gt;.app&lt;/code&gt; bundles with APFS Copy-on-Write (&lt;code&gt;cp -cRp&lt;/code&gt;). If &lt;code&gt;debug/macho&lt;/code&gt; catches a broken &lt;code&gt;LC_RPATH&lt;/code&gt; dylib or &lt;code&gt;codesign&lt;/code&gt; sees a changed &lt;code&gt;TeamIdentifier&lt;/code&gt;, it rolls back offline automatically.&lt;/p&gt;

&lt;p&gt;I promise this started as a weekend Bash rewrite.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepm9cigtzeip2dffktqh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepm9cigtzeip2dffktqh.png" alt="Developer meme: Saturday cleaning up a 20-line Bash script vs Monday writing a pure-Go bplist00 parser and APFS rollback" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In my defense, &lt;code&gt;debug/macho&lt;/code&gt; was just sitting right there in the standard library.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  0 MB idle Autopilot, zero privacy popups
&lt;/h3&gt;

&lt;p&gt;The optional &lt;code&gt;launchd&lt;/code&gt; Autopilot stays at 0 MB idle instead of keeping a daemon resident in RAM. Before doing anything, it runs TCC-free macOS probes (no Full Disk Access popups) and backs off during calls, on battery, or over a hotspot.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 28-CVE surprise before v6.1.1
&lt;/h3&gt;

&lt;p&gt;Right before tagging &lt;code&gt;v6.1.1&lt;/code&gt;, I turned on &lt;code&gt;govulncheck&lt;/code&gt; in CI and got hit with &lt;strong&gt;28 CVEs&lt;/strong&gt;. None were in my code: &lt;code&gt;setup-go&lt;/code&gt; was reading &lt;code&gt;1.26.0&lt;/code&gt; from &lt;code&gt;go.mod&lt;/code&gt; and building with an unpatched &lt;code&gt;.0&lt;/code&gt; toolchain. Switching CI to &lt;code&gt;1.26.x&lt;/code&gt; with &lt;code&gt;check-latest: true&lt;/code&gt; cleared all 28 in one commit. Worth checking if your CI still uses &lt;code&gt;go-version-file: go.mod&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it read-only
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew install HMarzban/tap/macup
macup check &lt;span class="c"&gt;# read-only&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or build from source with &lt;code&gt;go install github.com/HMarzban/macup/cmd/macup@latest&lt;/code&gt;. Full notes live in the &lt;a href="https://hmarzban.github.io/macup/docs/" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, and the MIT source is on &lt;a href="https://github.com/HMarzban/macup" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>go</category>
      <category>macos</category>
      <category>cli</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
