<?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: Jenil Pokar</title>
    <description>The latest articles on DEV Community by Jenil Pokar (@jenil_pokar_cb4d7e4377c87).</description>
    <link>https://dev.to/jenil_pokar_cb4d7e4377c87</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%2F2371332%2F573e9544-3567-404b-96e0-cf9c4c9872cd.png</url>
      <title>DEV Community: Jenil Pokar</title>
      <link>https://dev.to/jenil_pokar_cb4d7e4377c87</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jenil_pokar_cb4d7e4377c87"/>
    <language>en</language>
    <item>
      <title>I built a CLI tool that auto-copies OTPs from Gmail — no more tab switching</title>
      <dc:creator>Jenil Pokar</dc:creator>
      <pubDate>Fri, 27 Mar 2026 06:36:46 +0000</pubDate>
      <link>https://dev.to/jenil_pokar_cb4d7e4377c87/i-built-a-cli-tool-that-auto-copies-otps-from-gmail-no-more-tab-switching-2bd7</link>
      <guid>https://dev.to/jenil_pokar_cb4d7e4377c87/i-built-a-cli-tool-that-auto-copies-otps-from-gmail-no-more-tab-switching-2bd7</guid>
      <description>&lt;p&gt;*&lt;em&gt;Every time I needed to log into something, the same thing happened:&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enter email and password&lt;/li&gt;
&lt;li&gt;Wait for the OTP email&lt;/li&gt;
&lt;li&gt;Switch to Gmail&lt;/li&gt;
&lt;li&gt;Find the email&lt;/li&gt;
&lt;li&gt;Copy the 6-digit code&lt;/li&gt;
&lt;li&gt;Switch back&lt;/li&gt;
&lt;li&gt;Paste it before it expires&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's maybe &lt;strong&gt;15 seconds&lt;/strong&gt;. But it happens dozens of times a day, and it's &lt;br&gt;
just annoying enough to break focus every single time.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;OTPilot&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;OTPilot runs silently in the background. When you press a hotkey &lt;br&gt;
(default: Ctrl+Shift+O), it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fetches your last 10 emails from Gmail&lt;/li&gt;
&lt;li&gt;Finds the OTP&lt;/li&gt;
&lt;li&gt;Copies it to your clipboard&lt;/li&gt;
&lt;li&gt;Shows a desktop notification&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it. No tab switching. No waiting. Just paste.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to install
&lt;/h2&gt;

&lt;p&gt;pip install otpilot&lt;/p&gt;

&lt;p&gt;Requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.8+&lt;/li&gt;
&lt;li&gt;Gmail account&lt;/li&gt;
&lt;li&gt;Google Cloud project with Gmail API enabled (free, one-time 5 minute setup)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to set it up
&lt;/h2&gt;

&lt;p&gt;otpilot setup&lt;/p&gt;

&lt;p&gt;The setup wizard walks you through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Importing your Google credentials&lt;/li&gt;
&lt;li&gt;One-time Gmail sign-in (OAuth — read-only access)&lt;/li&gt;
&lt;li&gt;Setting your preferred hotkey&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then run:&lt;/p&gt;

&lt;p&gt;otpilot start&lt;/p&gt;

&lt;p&gt;It sits in your system tray and waits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Privacy
&lt;/h2&gt;

&lt;p&gt;This was my main concern when building it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your credentials never leave your machine&lt;/li&gt;
&lt;li&gt;Gmail access is read-only — it cannot send, delete, or modify anything&lt;/li&gt;
&lt;li&gt;Emails are fetched only when you press the hotkey — no background polling&lt;/li&gt;
&lt;li&gt;OAuth tokens are stored locally at ~/.otpilot/&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Google Cloud setup
&lt;/h2&gt;

&lt;p&gt;The one friction point is the one-time Google Cloud setup to get a &lt;br&gt;
credentials.json file. It takes about 5 minutes and the full guide is &lt;br&gt;
in the repo. Once it's done, you never touch it again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Platforms
&lt;/h2&gt;

&lt;p&gt;Works on macOS, Linux, and Windows.&lt;/p&gt;

&lt;p&gt;Linux users need xclip or xsel for clipboard support:&lt;/p&gt;

&lt;p&gt;sudo apt install xclip&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/codewithjenil/otpilot" rel="noopener noreferrer"&gt;https://github.com/codewithjenil/otpilot&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Website: &lt;a href="https://jenil-otpilot.vercel.app" rel="noopener noreferrer"&gt;https://jenil-otpilot.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install: pip install otpilot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MIT licensed. Feedback and contributions welcome — especially around &lt;br&gt;
OTP extraction patterns, since different services format their emails &lt;br&gt;
differently.&lt;/p&gt;

</description>
      <category>python</category>
      <category>cli</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
