<?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>Forem: BSanroma</title>
    <description>The latest articles on Forem by BSanroma (@bsanroma).</description>
    <link>https://forem.com/bsanroma</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%2F3776043%2F3df80cbf-74a0-4961-a209-2f7125d30302.png</url>
      <title>Forem: BSanroma</title>
      <link>https://forem.com/bsanroma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bsanroma"/>
    <language>en</language>
    <item>
      <title>How a Chat File on GitHub Became a Pocket DevOps Tool</title>
      <dc:creator>BSanroma</dc:creator>
      <pubDate>Mon, 16 Feb 2026 16:15:54 +0000</pubDate>
      <link>https://forem.com/bsanroma/how-a-chat-file-on-github-became-a-pocket-devops-tool-2eof</link>
      <guid>https://forem.com/bsanroma/how-a-chat-file-on-github-became-a-pocket-devops-tool-2eof</guid>
      <description>&lt;h2&gt;
  
  
  The story of how I accidentally built a local-first AI bot that controls my entire dev environment from Telegram.
&lt;/h2&gt;




&lt;p&gt;It started with a simple question I asked myself one afternoon:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How can I talk to Antigravity from my Telegram?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Antigravity is my AI coding assistant — a local agent that lives on my Mac and helps me build software. It's powerful, but it has one fundamental limitation: I have to be sitting in front of my laptop to use it.&lt;/p&gt;

&lt;p&gt;That afternoon, I was outside. Walking. And I had an idea for a fix to one of my projects. A small thing — just a config change. But I couldn't do it. My laptop was at home.&lt;/p&gt;

&lt;p&gt;So I started thinking: &lt;em&gt;What if I could just send a message and have it executed?&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 The chat.md Experiment
&lt;/h2&gt;

&lt;p&gt;My first attempt was absurd — and it worked.&lt;/p&gt;

&lt;p&gt;I created a file called &lt;code&gt;chat.md&lt;/code&gt; in one of my GitHub repositories. The idea was simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I write a message in the file from my phone (via GitHub's mobile editor).&lt;/li&gt;
&lt;li&gt;My local agent detects the file change (via polling or webhook).&lt;/li&gt;
&lt;li&gt;It reads my instruction, processes it, and writes the response back to &lt;code&gt;chat.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;I refresh the page on my phone and read the answer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It was slow. It was ugly. It required refreshing a GitHub page manually. But it &lt;em&gt;worked&lt;/em&gt;. I was having a conversation with my local machine through a Markdown file on GitHub.&lt;/p&gt;

&lt;p&gt;And that's when I realized: the core concept was valid. I just needed a better transport layer.&lt;/p&gt;

&lt;p&gt;Telegram was the obvious answer.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 From File Polling to AI-Powered Chat
&lt;/h2&gt;

&lt;p&gt;The original &lt;code&gt;chat.md&lt;/code&gt; approach taught me three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The need is real.&lt;/strong&gt; Being away from your machine and needing to do &lt;em&gt;one small thing&lt;/em&gt; happens constantly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text is enough.&lt;/strong&gt; You don't need a fancy GUI. A chat window is the perfect interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The execution must stay local.&lt;/strong&gt; The moment your code leaves your machine, you've created a security problem.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I rebuilt the concept from scratch as a Telegram bot — but with a fundamental difference from traditional bots:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I didn't hardcode commands.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of mapping &lt;code&gt;/deploy&lt;/code&gt; to a script, I connected the bot to Google Gemini. Now I could type:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Check the API logs for errors in the last hour"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And the AI would interpret my intent, figure out the right shell command, and execute it on my local machine. No predefined routes. No rigid syntax. Just natural language.&lt;/p&gt;

&lt;p&gt;It even works with &lt;strong&gt;voice notes&lt;/strong&gt;. I can literally &lt;em&gt;talk&lt;/em&gt; to my infrastructure while walking down the street.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗 The Architecture
&lt;/h2&gt;

&lt;p&gt;The setup is intentionally minimal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────┐     ┌──────────────────┐     ┌──────────────┐
│  Telegram    │◄───►│  Nexus AI Daemon │◄───►│  Your Local  │
│  (Phone)     │     │                  │     │  Projects    │
│              │     │  🤖 Gemini AI    │     │              │
│  Text/Voice  │     │  🛡️ Security    │     │  Git, Docker │
│              │     │  ⚡ Shell Access │     │  npm, logs   │
└─────────────┘     └──────────────────┘     └──────────────┘
                     Runs on YOUR machine
                     Outbound polling only
                     Nothing exposed to internet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key design decisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Polling, not webhooks.&lt;/strong&gt; The bot calls Telegram's API outbound. No ports opened. No public endpoints. No attack surface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI interpretation, not command mapping.&lt;/strong&gt; Gemini processes natural language and decides what to execute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-project aware.&lt;/strong&gt; A simple &lt;code&gt;projects.json&lt;/code&gt; file maps project names to local paths. I can say "run tests on the web project" and the bot knows where to go.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice-native.&lt;/strong&gt; Telegram voice notes are transcribed and interpreted by Gemini. DevOps by voice is surprisingly natural.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔐 Security: The Non-Negotiable Layer
&lt;/h2&gt;

&lt;p&gt;Let's be honest: a bot that executes shell commands on your local machine is a terrifying idea if done wrong.&lt;/p&gt;

&lt;p&gt;Before writing a single line of the AI logic, I established strict constraints:&lt;/p&gt;

&lt;h3&gt;
  
  
  Owner-Only Access
&lt;/h3&gt;

&lt;p&gt;Every incoming message is checked against a hardcoded &lt;code&gt;OWNER_ID&lt;/code&gt;. If the Telegram user ID doesn't match, the message is ignored entirely. Not rejected — &lt;em&gt;ignored&lt;/em&gt;. The bot pretends it doesn't exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three-Tier Command Classification
&lt;/h3&gt;

&lt;p&gt;Not all commands are created equal. The security module classifies every command before execution:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🟢 Safe commands&lt;/strong&gt; — Execute immediately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git status, npm test, ls, cat, docker ps, grep, tail
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🟡 Dangerous commands&lt;/strong&gt; — Require explicit confirmation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm, sudo, chmod, git push --force, npm publish, kill -9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a dangerous command is detected, the bot responds with inline Telegram buttons:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⚠️ Dry-Run Mode: Potentially dangerous command detected:

`sudo systemctl restart nginx`

Confirm execution?
[✅ Execute]  [❌ Cancel]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The confirmation expires after 60 seconds. No action means no execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔴 Blocked commands&lt;/strong&gt; — Never execute, even with confirmation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm -rf /    mkfs    dd if=    &amp;gt; /dev/    chmod 777 /    fork bombs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are permanently blocked at the pattern level. The AI cannot override this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rate Limiting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Maximum 100 commands per hour.&lt;/li&gt;
&lt;li&gt;2-second cooldown between commands.&lt;/li&gt;
&lt;li&gt;Prevents accidental loops, spam, and abuse.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  No Inbound Exposure
&lt;/h3&gt;

&lt;p&gt;The single most important architectural decision: &lt;strong&gt;the bot polls Telegram outbound.&lt;/strong&gt; There is no webhook, no public endpoint, no open port. The only network traffic is the bot calling Telegram's API from inside my network.&lt;/p&gt;

&lt;p&gt;This eliminates an entire category of vulnerabilities.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔑 BYOK: Bring Your Own Key
&lt;/h2&gt;

&lt;p&gt;Here's something most people don't expect about the pricing model:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every user provides their own API keys.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your own Telegram bot (created via &lt;a class="mentioned-user" href="https://dev.to/botfather"&gt;@botfather&lt;/a&gt; — free).&lt;/li&gt;
&lt;li&gt;Your own Google Gemini API key (from Google AI Studio — free tier available).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;I have zero operational costs per user.&lt;/strong&gt; No servers, no API bills, no cloud infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your keys never leave your machine.&lt;/strong&gt; They live in a local &lt;code&gt;.env&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A $3 lifetime license is sustainable&lt;/strong&gt; — because there's nothing to sustain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The BYOK model aligns perfectly with the local-first philosophy: you own everything, I own nothing.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 What I Actually Use It For
&lt;/h2&gt;

&lt;p&gt;Here's what I trigger via Telegram on a typical day:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy a static landing page to cPanel via FTP&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;git status&lt;/code&gt; across multiple projects&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm test&lt;/code&gt; on a specific module&lt;/li&gt;
&lt;li&gt;Read a config file I forgot to check before leaving&lt;/li&gt;
&lt;li&gt;Restart a local Docker container&lt;/li&gt;
&lt;li&gt;Ask "what changed in the web project since yesterday?" (the AI figures out the right &lt;code&gt;git log&lt;/code&gt; command)&lt;/li&gt;
&lt;li&gt;Send a voice note: &lt;em&gt;"Push the latest changes on the nexus project"&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It genuinely feels like having a DevOps terminal in my pocket.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 What I Learned Building This
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Local-first is underrated
&lt;/h3&gt;

&lt;p&gt;We assume everything must live in the cloud. It doesn't. The most secure server is the one that doesn't exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Security is architectural, not reactive
&lt;/h3&gt;

&lt;p&gt;By removing inbound exposure entirely, you eliminate whole classes of exploits. The sandbox and rate limiting are defense-in-depth, not the primary defense. The primary defense is &lt;em&gt;not being reachable&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. AI changes the bot paradigm
&lt;/h3&gt;

&lt;p&gt;Traditional bots require you to memorize commands. AI-powered bots let you &lt;em&gt;describe what you want&lt;/em&gt;. The difference in usability is enormous. I never check a help menu anymore.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Voice is the killer feature nobody expected
&lt;/h3&gt;

&lt;p&gt;I added voice support almost as an afterthought. It turned out to be the feature I use most. Sending a voice note while walking is faster than typing a command.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Simplicity compounds
&lt;/h3&gt;

&lt;p&gt;This entire system is a single JavaScript file. No framework. No microservices. No Kubernetes. One daemon, one &lt;code&gt;.env&lt;/code&gt; file, one &lt;code&gt;projects.json&lt;/code&gt;. And it handles everything I need.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 When This Architecture Makes Sense
&lt;/h2&gt;

&lt;p&gt;This approach is designed for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Solo developers and indie builders&lt;/li&gt;
&lt;li&gt;Digital nomads who work from multiple locations&lt;/li&gt;
&lt;li&gt;Anyone running services on local or private infrastructure&lt;/li&gt;
&lt;li&gt;Developers who value control over convenience&lt;/li&gt;
&lt;li&gt;Emergency situations when you're away from your machine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's not meant to replace enterprise CI/CD pipelines.&lt;/p&gt;

&lt;p&gt;It's meant to give independent builders superpowers.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What's Next
&lt;/h2&gt;

&lt;p&gt;The foundation is solid. The roadmap includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured JSON audit logging&lt;/strong&gt; for full command forensics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-update notifications&lt;/strong&gt; via Telegram when a new version is available&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nexus Skills marketplace&lt;/strong&gt; — pre-configured command packs for Docker, Git, Kubernetes workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team mode&lt;/strong&gt; — share a bot securely with teammates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Temporary download links&lt;/strong&gt; — Stripe webhook integration for time-limited distribution&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧩 Final Thought
&lt;/h2&gt;

&lt;p&gt;This whole project started with a Markdown file on GitHub that I was editing from my phone's browser, hoping my laptop would pick up the message.&lt;/p&gt;

&lt;p&gt;It was hacky. It was ridiculous. But it proved that the instinct was right:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developers need a way to talk to their machines when they're not sitting in front of them.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not through a cloud dashboard. Not through an exposed SSH port. Not through a third-party platform that stores your secrets.&lt;/p&gt;

&lt;p&gt;Through a simple, encrypted, AI-powered chat. Running on your own hardware. Controlled by you alone.&lt;/p&gt;

&lt;p&gt;A Telegram bot.&lt;br&gt;
A local daemon.&lt;br&gt;
A few shell scripts.&lt;br&gt;
An AI that understands what you mean.&lt;/p&gt;

&lt;p&gt;That's Nexus AI.&lt;/p&gt;

&lt;p&gt;And honestly? It started with a &lt;code&gt;chat.md&lt;/code&gt; file and a crazy idea.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://remote-nexus.dev" rel="noopener noreferrer"&gt;Nexus AI — Pocket DevOps&lt;/a&gt; is available for macOS, Windows, and Linux. $3 lifetime license. Your keys, your machine, your rules.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built by &lt;a href="https://github.com/BSanroma" rel="noopener noreferrer"&gt;Bernat Sanromà&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>devops</category>
      <category>showdev</category>
    </item>
    <item>
      <title>chain of thought</title>
      <dc:creator>BSanroma</dc:creator>
      <pubDate>Mon, 16 Feb 2026 15:33:05 +0000</pubDate>
      <link>https://forem.com/bsanroma/chain-of-thought-341d</link>
      <guid>https://forem.com/bsanroma/chain-of-thought-341d</guid>
      <description></description>
    </item>
  </channel>
</rss>
