<?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: Sudheendra chari</title>
    <description>The latest articles on DEV Community by Sudheendra chari (@sudheendrachari).</description>
    <link>https://dev.to/sudheendrachari</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%2F3783902%2Fb6f82c65-8587-49df-8016-717f90d40fb9.jpeg</url>
      <title>DEV Community: Sudheendra chari</title>
      <link>https://dev.to/sudheendrachari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sudheendrachari"/>
    <language>en</language>
    <item>
      <title>I Got Tired of My YubiKey Typing OTPs Everywhere — So I Fixed It</title>
      <dc:creator>Sudheendra chari</dc:creator>
      <pubDate>Sat, 21 Feb 2026 12:37:05 +0000</pubDate>
      <link>https://dev.to/sudheendrachari/i-got-tired-of-my-yubikey-typing-otps-everywhere-so-i-fixed-it-2h3m</link>
      <guid>https://dev.to/sudheendrachari/i-got-tired-of-my-yubikey-typing-otps-everywhere-so-i-fixed-it-2h3m</guid>
      <description>&lt;p&gt;My YubiKey Kept Spamming OTPs — So I Built a macOS Menu Bar Fix&lt;/p&gt;

&lt;p&gt;If you use a YubiKey on macOS, you probably know this moment.&lt;/p&gt;

&lt;p&gt;You plug it in.&lt;br&gt;&lt;br&gt;
Your cursor happens to be in Slack.&lt;br&gt;&lt;br&gt;
And suddenly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cccccccbhtnlrnhjkgljuhv...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your YubiKey just typed an OTP into the wrong window.&lt;/p&gt;

&lt;p&gt;It’s not dangerous.&lt;br&gt;&lt;br&gt;
It’s just… annoying.&lt;/p&gt;

&lt;p&gt;After the third time this happened to me mid-conversation, I went looking for a clean way to quickly disable the OTP interface — without digging into CLI commands every time.&lt;/p&gt;

&lt;p&gt;That’s how &lt;strong&gt;YubiToggle&lt;/strong&gt; was born.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;YubiKeys expose multiple USB interfaces (OTP, FIDO, CCID, etc.).&lt;/p&gt;

&lt;p&gt;When OTP is enabled, pressing the YubiKey sends a one-time password as keyboard input. That’s great when you intend it.&lt;/p&gt;

&lt;p&gt;It’s less great when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your cursor is in Slack&lt;/li&gt;
&lt;li&gt;Or in a terminal&lt;/li&gt;
&lt;li&gt;Or in a production shell 😅&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yes, you &lt;em&gt;can&lt;/em&gt; disable OTP using &lt;code&gt;ykman&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ykman config usb &lt;span class="nt"&gt;--disable&lt;/span&gt; OTP &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But that’s not something I wanted to do manually every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  What About YubiSwitch?
&lt;/h2&gt;

&lt;p&gt;There’s already a macOS utility called &lt;strong&gt;YubiSwitch&lt;/strong&gt; that solves this problem.&lt;/p&gt;

&lt;p&gt;But for me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It felt outdated&lt;/li&gt;
&lt;li&gt;Development activity seemed minimal&lt;/li&gt;
&lt;li&gt;The UX wasn’t very “macOS-native”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of forking it, I decided to build something small, modern, and focused.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 YubiToggle
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;YubiToggle&lt;/strong&gt; is a minimal macOS menu bar app that lets you toggle your YubiKey’s OTP interface on and off with a single click.&lt;/p&gt;

&lt;p&gt;It lives quietly in your menu bar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No Dock icon&lt;/li&gt;
&lt;li&gt;No background daemon&lt;/li&gt;
&lt;li&gt;No unnecessary features&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;One-click OTP enable/disable&lt;/li&gt;
&lt;li&gt;Clear visual state:

&lt;ul&gt;
&lt;li&gt;🟢 OTP enabled
&lt;/li&gt;
&lt;li&gt;⚪ OTP disabled
&lt;/li&gt;
&lt;li&gt;🔵 Syncing
&lt;/li&gt;
&lt;li&gt;🟠 Error&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Auto-syncs with hardware every 10 seconds&lt;/li&gt;

&lt;li&gt;Optional launch at login&lt;/li&gt;

&lt;li&gt;Optional system notifications&lt;/li&gt;

&lt;li&gt;Universal binary (Apple Silicon + Intel)&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  Built With
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Swift 6&lt;/li&gt;
&lt;li&gt;SwiftUI&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MenuBarExtra&lt;/code&gt; (no Dock presence)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ykman&lt;/code&gt; CLI under the hood&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The app is intentionally a thin wrapper around a well-maintained CLI, paired with a clean native UI.&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;YubiToggle checks the current device state using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ykman info
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And toggles OTP via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ykman config usb &lt;span class="nt"&gt;--disable&lt;/span&gt; OTP &lt;span class="nt"&gt;--force&lt;/span&gt;
ykman config usb &lt;span class="nt"&gt;--enable&lt;/span&gt; OTP &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All CLI calls are wrapped in async Swift code so the UI stays responsive.&lt;/p&gt;

&lt;p&gt;To avoid UI drift (for example, if the device is modified externally), the app refreshes the hardware state every 10 seconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  Project Structure
&lt;/h2&gt;

&lt;p&gt;The project is intentionally simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;YubiToggle/
├── Package.swift
└── Sources/YubiToggle/
    ├── YubiToggleApp.swift
    ├── CLI/YubiCLI.swift
    ├── Models/YubiKeyDevice.swift
    ├── ViewModels/YubiKeyViewModel.swift
    └── Views/
        ├── MenuBarView.swift
        └── SettingsView.swift
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No over-engineering — just enough separation to keep things clean and readable.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Few Design Decisions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;macOS 13+ only&lt;/strong&gt;&lt;br&gt;
I chose modern SwiftUI APIs over backward compatibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;ykman&lt;/code&gt; instead of raw HID access&lt;/strong&gt;&lt;br&gt;
Let Yubico handle device complexity; I focus on UX.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not notarized (yet)&lt;/strong&gt;&lt;br&gt;
macOS will ask you to “Open Anyway” on first launch. This is a one-time step.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Homebrew
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap sudheendrachari/tap
brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; yubitoggle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Manual
&lt;/h3&gt;

&lt;p&gt;Download the DMG from GitHub releases and drag the app to Applications.&lt;/p&gt;

&lt;p&gt;Repository:&lt;br&gt;
&lt;a href="https://github.com/sudheendrachari/yubi-toggle" rel="noopener noreferrer"&gt;https://github.com/sudheendrachari/yubi-toggle&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Open Source?
&lt;/h2&gt;

&lt;p&gt;This is the kind of tool that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Solves a small but real annoyance&lt;/li&gt;
&lt;li&gt;Doesn’t need to be commercial&lt;/li&gt;
&lt;li&gt;Can benefit from community feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you use a YubiKey on macOS and have ever wished you could quickly disable OTP without touching Terminal, this might be useful.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;Even tiny utilities benefit from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A clear, narrow scope&lt;/li&gt;
&lt;li&gt;Native UX&lt;/li&gt;
&lt;li&gt;Minimal features done well&lt;/li&gt;
&lt;li&gt;Treating CLI tools as first-class building blocks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes the best apps are just good interfaces over solid existing tools.&lt;/p&gt;




&lt;p&gt;If you build macOS utilities or work with hardware-backed security tools, I’d love to hear what you’ve built — or what’s annoyed you enough to consider building something yourself.&lt;/p&gt;

</description>
      <category>security</category>
      <category>yubikey</category>
      <category>otp</category>
      <category>swift</category>
    </item>
  </channel>
</rss>
