<?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: Kanmi Obasa</title>
    <description>The latest articles on DEV Community by Kanmi Obasa (@konfirmed).</description>
    <link>https://dev.to/konfirmed</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F688407%2F1073003d-22a1-43f8-a97d-6cb3e2b9b399.png</url>
      <title>DEV Community: Kanmi Obasa</title>
      <link>https://dev.to/konfirmed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/konfirmed"/>
    <language>en</language>
    <item>
      <title>I built a CLI that catches Lighthouse regressions before they ship</title>
      <dc:creator>Kanmi Obasa</dc:creator>
      <pubDate>Sun, 01 Mar 2026 07:58:32 +0000</pubDate>
      <link>https://dev.to/konfirmed/i-built-a-cli-that-catches-lighthouse-regressions-before-they-ship-2aid</link>
      <guid>https://dev.to/konfirmed/i-built-a-cli-that-catches-lighthouse-regressions-before-they-ship-2aid</guid>
      <description>&lt;p&gt;Google Lighthouse is great for one-off audits. But if you fix your LCP on Tuesday and ship a bundle regression on Friday, nobody notices until Search Console emails you three weeks later.&lt;/p&gt;

&lt;p&gt;Lighthouse tells you how fast your site is today. &lt;strong&gt;kanmi tells you when it gets slower.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @knfrmd/kanmi
kanmi audit https://your-site.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Kanmi Performance Audit
  https://your-site.com
  mobile · Slow 4G, 4x CPU · LH 12.0.0 · 14.2s
  ─────────────────────────────────────────────

  Performance      72
  Accessibility    95
  Best Practices   100
  SEO              91

  Lab Metrics
  ─────────────────────────────────────────────
  LCP      4,200ms    NEEDS IMPROVEMENT
  TBT        380ms    NEEDS IMPROVEMENT
  CLS       0.003     GOOD
  FCP      1,800ms    GOOD

  Top Issues
  ─────────────────────────────────────────────
  * Reduce unused JavaScript (~1.2s savings)
  * Eliminate render-blocking resources (~800ms savings)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One command. Scores, lab metrics, top issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;kanmi audit &amp;lt;url&amp;gt;&lt;/code&gt;&lt;/strong&gt; - run Lighthouse, print results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;kanmi monitor &amp;lt;url&amp;gt;&lt;/code&gt;&lt;/strong&gt; - run 3 audits (median), save to local history, detect regressions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;kanmi ci&lt;/code&gt;&lt;/strong&gt; - enforce thresholds in GitHub Actions, exit 1 on failure&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why not Lighthouse CI?
&lt;/h2&gt;

&lt;p&gt;Lighthouse CI is powerful but assumes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A server (LHCI server or temporary storage)&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;.lighthouserc.js&lt;/code&gt; project config&lt;/li&gt;
&lt;li&gt;CI-specific setup before you see any value locally&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;kanmi works with one command. No server. No database. Just JSON files in &lt;code&gt;~/.kanmi/history/&lt;/code&gt; and automatic comparison against your own baseline.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about WebPageTest, Calibre, SpeedCurve?
&lt;/h3&gt;

&lt;p&gt;Excellent tools for continuous monitoring and real-user dashboards. But they're hosted services with accounts, billing, and long-term data storage.&lt;/p&gt;

&lt;p&gt;kanmi is designed for a different workflow: &lt;strong&gt;"did this deployment make performance worse?"&lt;/strong&gt; - answered locally in under a minute, with no account required.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lighthouse&lt;/td&gt;
&lt;td&gt;One-off audits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lighthouse CI&lt;/td&gt;
&lt;td&gt;CI pipelines with server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WebPageTest / Calibre / SpeedCurve&lt;/td&gt;
&lt;td&gt;Hosted monitoring + RUM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;kanmi&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Local regression detection&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Monitoring catches what audits miss
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kanmi monitor https://shop.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This runs 3 Lighthouse audits (takes the median to reduce Lighthouse noise), saves the result, and compares against your last 5 runs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Kanmi Monitor
  Run #8 | 2026-02-28 | 3 runs (median)
  ─────────────────────────────────────────────

  Performance      92  unchanged

  Regressions
   CRIT  LCP: 2,100ms -&amp;gt; 2,600ms (+500ms)

  Regression Policy
  ─────────────────────────────────────────────
  Baseline     median of last 5 runs
  Rule         flag if delta &amp;gt;= max(abs, baseline × rel%)
  Fail         exit 1 on critical/high severity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Regression detection uses dual thresholds - absolute &lt;em&gt;and&lt;/em&gt; relative. LCP flags at &lt;strong&gt;+150ms or +10%&lt;/strong&gt;, whichever is larger. This prevents false positives on slow sites (where 150ms is noise) and catches small regressions on fast sites (where 10% matters).&lt;/p&gt;

&lt;p&gt;It won't evaluate regressions until you have 5 baseline runs. No false alarms on thin data.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI gate
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kanmi ci &lt;span class="nt"&gt;--urls&lt;/span&gt; https://example.com &lt;span class="nt"&gt;--performance&lt;/span&gt; 90
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exits 1 if thresholds fail or critical regressions are detected. Add &lt;code&gt;--post-comment&lt;/code&gt; to annotate PRs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering notes
&lt;/h2&gt;

&lt;p&gt;Three decisions worth sharing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Score scale contract.&lt;/strong&gt; Lighthouse scores are 0-1 internally. Every wrapper I've seen converts to 0-100 somewhere and introduces bugs. kanmi keeps data as 0-1 everywhere - JSON output, storage, history. The 0-100 conversion happens once, at the terminal display layer. This is enforced by a JSON schema that CI validates on every push.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;URL normalization.&lt;/strong&gt; If you monitor &lt;code&gt;https://www.example.com/?utm_source=email&lt;/code&gt; Monday and &lt;code&gt;https://example.com/&lt;/code&gt; Tuesday, those need to be the same baseline. kanmi strips protocols, &lt;code&gt;www.&lt;/code&gt;, tracking params (14 of them), hash fragments, and default ports before storing. 40 unit tests cover this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Stranger mode" CI.&lt;/strong&gt; A CI job packs the CLI into a tarball, installs it in an empty &lt;code&gt;/tmp&lt;/code&gt; directory, and validates that the binary runs and the JSON output matches the schema. If it breaks for a fresh install, CI catches it before npm publish.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @knfrmd/kanmi
kanmi audit https://your-site.com
kanmi monitor https://your-site.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it a few times and you'll start seeing regression detection kick in automatically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/konfirmed/kanmi-suite" rel="noopener noreferrer"&gt;GitHub: konfirmed/kanmi-suite&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>performance</category>
      <category>lighthouse</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
