<?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: Kuntal Gorai</title>
    <description>The latest articles on DEV Community by Kuntal Gorai (@kuntalgorai).</description>
    <link>https://dev.to/kuntalgorai</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%2F1073393%2F50095c26-ad58-4fe5-86df-9345fb4b0416.jpg</url>
      <title>DEV Community: Kuntal Gorai</title>
      <link>https://dev.to/kuntalgorai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kuntalgorai"/>
    <language>en</language>
    <item>
      <title>👻🧑‍💻"Haunted Shell: I tried let my terminal possess with help of local llm models and it was fun way to end my hacktoberfest 2026"</title>
      <dc:creator>Kuntal Gorai</dc:creator>
      <pubDate>Sat, 31 Oct 2026 15:32:15 +0000</pubDate>
      <link>https://dev.to/kuntalgorai/haunted-shell-i-tried-let-my-terminal-possess-with-help-of-local-llm-models-and-it-was-fun-2p6p</link>
      <guid>https://dev.to/kuntalgorai/haunted-shell-i-tried-let-my-terminal-possess-with-help-of-local-llm-models-and-it-was-fun-2p6p</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Haunted Shell&lt;/strong&gt; lets a ghost possess my PowerShell prompt.&lt;/p&gt;

&lt;p&gt;Every time I run a command, a ghost reads it and whispers one line back in dim purple text, right under the output. The ghost is an open-weight model running on my own laptop. It's creepy, a bit playful, and it knows what I did:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;C:\Users\kuntal&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Test-Ghost&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;~&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;You&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;invoked&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;spectral&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;presence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;lingering&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;here&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;eager&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;haunt&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;forever&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;trapped&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;terminal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;realm.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The theme gave me two ideas, and I built both into the ghost:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Halloween: the possession.&lt;/strong&gt; When I mistype a command (&lt;code&gt;gti status&lt;/code&gt;, &lt;code&gt;pyhton&lt;/code&gt;, &lt;code&gt;claer&lt;/code&gt;), the ghost &lt;em&gt;possesses the typo&lt;/em&gt;. It works out which real command I meant and hints at it in character, as if it has been watching my fingers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Día de los Muertos: the calavera and the ofrenda.&lt;/strong&gt; When a command dies, it can earn a &lt;em&gt;calavera literaria&lt;/em&gt;, the playful four-line rhyming epitaph Mexicans write for the living and the dead every November. At the end of the night, &lt;code&gt;ofrenda&lt;/code&gt; builds a little altar for every command that died in the session, lists them &lt;em&gt;en memoria&lt;/em&gt;, and writes a short remembrance.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;PS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;D:\code&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ERR&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ERESOLVE&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;R.I.P.&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="n"&gt;PASTE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;REAL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CALAVERA&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;YOUR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;TERMINAL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;HERE&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What inspired it: a terminal is where my code goes to die, so that's where I wanted the ghost to live. Any developer's shell history is basically a graveyard of failed builds, typos and &lt;code&gt;git push --force&lt;/code&gt; regrets. I wanted something that mourns them with me, in the spirit of a holiday that remembers the dead with humor instead of fear.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;✏️   &lt;iframe src="https://www.youtube.com/embed/Y1Btdp4Dbls" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Here's a demo link of letting my terminal possessed to give out eerie command after every command I write and more haunting message when the command I type has some error.&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kuntal0901" rel="noopener noreferrer"&gt;
        kuntal0901
      &lt;/a&gt; / &lt;a href="https://github.com/kuntal0901/haunted-shell" rel="noopener noreferrer"&gt;
        haunted-shell
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Haunted Shell&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;em&gt;A ghost possesses your terminal.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Haunted Shell is a PowerShell module that lets a ghost live in your prompt. After you run a command, a small open-weight model running &lt;strong&gt;on your own laptop&lt;/strong&gt; reads the command and whether it worked, and the ghost whispers one eerie line back.&lt;/p&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;PS D:\code&amp;gt; gti status
gti : The term 'gti' is not recognized as the name of a cmdlet...
PS D:\code&amp;gt;
  ~ You reached for git and grasped only fog; I know what your fingers meant.

PS D:\code&amp;gt; npm install
npm ERR! code ERESOLVE
PS D:\code&amp;gt;

    +  R.I.P.  npm install  +
    Here lies npm install, so eager, so brave,
    Its node_modules dug a bottomless grave,
    La Catrina just laughed at the dependency tree,
    Now it rests in the panteon, finally free.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(Example output: the ghost says something different every time.)&lt;/p&gt;
&lt;p&gt;No cloud, no API key, no account. It works with the…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kuntal0901/haunted-shell" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The repo has the PowerShell module, a one-command installer for Windows, an uninstaller, and a smaller bash/zsh version for Linux, macOS and WSL.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The open pieces:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/ollama/ollama" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;&lt;/strong&gt; (MIT) runs the model locally and exposes a small HTTP API on &lt;code&gt;localhost:11434&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.llama.com/" rel="noopener noreferrer"&gt;Llama 3.2 3B&lt;/a&gt;&lt;/strong&gt;, an open-weight model from Meta, is the ghost's voice. It's 2 GB, and on my laptop's CPU it writes a whisper in about 3 seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PowerShell&lt;/strong&gt; (the module works on Windows PowerShell 5.1 and PowerShell 7, with no extra dependencies).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How it fits together:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The module wraps the &lt;code&gt;prompt&lt;/code&gt; function. Every time the prompt draws, it reads the last command from history, works out whether it failed (&lt;code&gt;$?&lt;/code&gt;, &lt;code&gt;$LASTEXITCODE&lt;/code&gt; and new entries in &lt;code&gt;$Error&lt;/code&gt;), and builds a short prompt for the model.&lt;/li&gt;
&lt;li&gt;The model call runs on a separate PowerShell runspace, so the shell never freezes. While it writes, the prompt shows a small &lt;code&gt;~ the ghost stirs...&lt;/code&gt; animation. Pressing any key skips the wait, and that whisper shows up at a later prompt instead.&lt;/li&gt;
&lt;li&gt;Each kind of haunting gets its own system prompt and token cap: one sentence (50 tokens) for whispers, four rhyming lines (90 tokens) for calaveras. The whole personality lives in a &lt;code&gt;prompts.json&lt;/code&gt; file, so you can rewrite the ghost without touching the code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typo possession doesn't trust the model to guess.&lt;/strong&gt; Before calling the model, the module scans PATH, aliases and functions for the closest real command, using an edit distance that counts swapped letters (&lt;code&gt;gti&lt;/code&gt; → &lt;code&gt;git&lt;/code&gt; is one edit). That answer goes into the prompt, so even a 3B model always hints at the right command.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A privacy guard&lt;/strong&gt; checks every command before it goes anywhere. Anything that looks like a secret (&lt;code&gt;password&lt;/code&gt;, &lt;code&gt;token&lt;/code&gt;, &lt;code&gt;apikey&lt;/code&gt;, &lt;code&gt;Bearer&lt;/code&gt;, long random strings) is never sent, not even to the local model.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A few things I learned along the way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows PowerShell 5.1 has its own parser.&lt;/strong&gt; My first typo matcher used 2D-array indexing inside a method call, which PowerShell 7 accepts and 5.1 refuses to parse. I rewrote it with a flat array.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt themes fight back.&lt;/strong&gt; My oh-my-posh theme loads after the module and quietly replaced the ghost's prompt hook. Now the module listens for the shell's &lt;code&gt;OnIdle&lt;/code&gt; event and re-wraps whatever prompt is active, so it works alongside oh-my-posh or Starship in any load order. It also passes the real &lt;code&gt;$?&lt;/code&gt; through, so the theme still turns red when a command fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model gets warmed up at shell start&lt;/strong&gt; with &lt;code&gt;keep_alive: 30m&lt;/code&gt;, so only the very first whisper pays the cost of loading the model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Setup takes about 10 minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;winget&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Ollama.Ollama&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-e&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;powershell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Bypass&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-File&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;\install.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# open a new PowerShell window&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Test-Ghost&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A terminal is the most private place on a computer.&lt;/strong&gt; My shell history has file paths, client project names, server names, the occasional half-typed password, and many &lt;code&gt;git commit -m "please work"&lt;/code&gt;. I would never stream every command I type to a cloud API just to get a spooky joke back. With an open-weight model running locally, the ghost sees everything and tells no one: nothing leaves my laptop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It works with the lights (and the Wi-Fi) off.&lt;/strong&gt; There's no account, no API key, no rate limit, and no service that can shut down next year and take my ghost with it. It keeps haunting on a plane.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It costs nothing to run.&lt;/strong&gt; A whisper after every command is hundreds of model calls a day. On a paid API that's a real monthly bill for a joke. Here it's free, forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It runs on a normal laptop.&lt;/strong&gt; I built this on a Windows laptop with 16 GB of RAM and Intel Iris Xe graphics, so no GPU at all. A 3B open model on the CPU answers in about 3 seconds, which feels like the ghost is replying to me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The ghost is mine to change.&lt;/strong&gt; Swapping the brain is one setting: &lt;code&gt;qwen2.5:1.5b&lt;/code&gt; for an older laptop, &lt;code&gt;gemma3:4b&lt;/code&gt; for better poetry. The voice is a JSON file. With a closed API I'd be stuck with whatever personality, safety tuning and pricing the provider picked, and whatever model they deprecate next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where open worked better than closed:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latency I control.&lt;/strong&gt; The model stays loaded in memory, so there's no network round trip and no cold start after the first call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tiny, tuned calls.&lt;/strong&gt; I cap output at 50 tokens and tune each kind of haunting separately, with no per-request pricing to worry about.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trust I can explain.&lt;/strong&gt; I can tell anyone exactly where their commands go: to a process on their own machine, whose source they can read.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The honest trade-off: a 3B model is less witty than a frontier model, and it takes a few seconds on CPU. For a ghost that only needs one good line at a time, that's the right deal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Spirit of It
&lt;/h2&gt;

&lt;p&gt;{{OPTIONAL: the moment it landed for you. For example the first calavera that made you laugh, or the ofrenda listing a day's worth of your failed commands. Delete this section if you'd rather skip it.}}&lt;/p&gt;

&lt;p&gt;Built with Ollama, Llama 3.2 3B and PowerShell. MIT licensed. &lt;em&gt;En memoria de todos los comandos caídos.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“¡Nos vemos en el próximo Hacktoberfest, si los espíritus lo permiten!” (See you next Hacktoberfest, if the spirits allow!)&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>gemma</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Reel Sloth: I saved 'for later' reels for years. Now a local Gemma sorts them while I sleep 🦥</title>
      <dc:creator>Kuntal Gorai</dc:creator>
      <pubDate>Sun, 25 Oct 2026 10:12:13 +0000</pubDate>
      <link>https://dev.to/kuntalgorai/reel-sloth-i-saved-for-later-reels-for-years-now-a-local-gemma-sorts-them-while-i-sleep-28jg</link>
      <guid>https://dev.to/kuntalgorai/reel-sloth-i-saved-for-later-reels-for-years-now-a-local-gemma-sorts-them-while-i-sleep-28jg</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Everyone has a "Saved" folder on Instagram that is secretly a graveyard. A reel lists five books you &lt;em&gt;must&lt;/em&gt; read, another shows a movie you &lt;em&gt;have&lt;/em&gt; to watch, another one shows a Claude skill that will "change how you code". You tap save, think "later", and never open that folder again. The information is all there, it's just trapped inside videos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reel Sloth&lt;/strong&gt; does the "later" part for you. You give it your saved reels and it hands back a tidy, checkable backlog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎬 &lt;strong&gt;Movies &amp;amp; shows&lt;/strong&gt; to watch&lt;/li&gt;
&lt;li&gt;📚 &lt;strong&gt;Books&lt;/strong&gt; to read&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;AI tools &amp;amp; Claude skills&lt;/strong&gt; to try&lt;/li&gt;
&lt;li&gt;📍 &lt;strong&gt;Places&lt;/strong&gt; to visit&lt;/li&gt;
&lt;li&gt;🛒 &lt;strong&gt;Products&lt;/strong&gt; to buy&lt;/li&gt;
&lt;li&gt;…plus recipes, fitness and "other"
How it works for the user:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Give it links.&lt;/strong&gt; Paste reel or post links into a small web page, or (the truly lazy way) point it at the &lt;strong&gt;Instagram data export&lt;/strong&gt; (&lt;code&gt;saved_posts.json&lt;/code&gt; / the downloaded .zip) and it picks up &lt;em&gt;everything you ever saved&lt;/em&gt;, collections included.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go to sleep.&lt;/strong&gt; &lt;code&gt;--overnight&lt;/code&gt; mode paces the downloads so Instagram doesn't block it, keeps Windows awake while it runs, retries politely, and can be stopped and resumed at any time because every reel is cached.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wake up to a list.&lt;/strong&gt; Each item comes out with a category, an action (watch / read / try / visit / buy) and a link back to the reel. Copy it as Markdown or plain text, download &lt;code&gt;.md&lt;/code&gt; / &lt;code&gt;.csv&lt;/code&gt; / &lt;code&gt;.json&lt;/code&gt;, or let it sync into a &lt;strong&gt;🦥 Reel Backlog&lt;/strong&gt; database in Notion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check things off.&lt;/strong&gt; That's the only effort left.
It reads all three places a reel hides information: &lt;strong&gt;the caption, what's said out loud, and the text on screen&lt;/strong&gt; (lots of "top 5 books" reels only show titles as overlay text and never say them).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Who gets to be lazier:&lt;/strong&gt; anyone who saves reels as a to-do list and never gets to the list. That's me, and probably you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;✏️   &lt;iframe src="https://www.youtube.com/embed/5uQeLwppnwQ" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Here's a real run on 6 of my own saved posts (5 videos and a 6-photo carousel): &lt;strong&gt;15 clean backlog items out&lt;/strong&gt;, namely 3 movies, 5 books, 5 Claude skills, 1 place (the &lt;em&gt;A Moving Line&lt;/em&gt; comics exhibition at MAP Bengaluru) and 1 product (WinDock), with every model running on my PC's CPU.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kuntal0901" rel="noopener noreferrer"&gt;
        kuntal0901
      &lt;/a&gt; / &lt;a href="https://github.com/kuntal0901/reel-sloth" rel="noopener noreferrer"&gt;
        reel-sloth
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🦥 Reel Sloth&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Save reels, do nothing, still end up organized.&lt;/p&gt;
&lt;p&gt;Reel Sloth takes the Instagram reels you saved "for later" and turns them into a tidy backlog
movies to watch, books to read, Claude skills and AI tools to try, dev tools and APIs to try, recipes
to cook. Everything is extracted and classified by open models running on your own machine.&lt;/p&gt;
&lt;p&gt;Categories: 🎬 Movies &amp;amp; Shows · 📚 Books · 🤖 AI tools &amp;amp; Claude skills (AI models, apps, agents, prompts
Claude skills) · 🛠️ Dev tools &amp;amp; APIs (libraries, frameworks, APIs, languages, developer sites and SaaS) ·
🍳 Recipes · 📍 Places · 💪 Fitness · 🛒 Products · 💡 Other. Reels saved in a "Coding"-style
collection lean toward Dev tools.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Status: working end to end on real reels (6 sample posts → 19 items → Notion). See &lt;a href="https://github.com/kuntal0901/reel-sloth/PLAN.md" rel="noopener noreferrer"&gt;PLAN.md&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Setup (Windows, Python 3.11+)&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-powershell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;cd D:\hacktoberfest&lt;span class="pl-k"&gt;-&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kuntal0901/reel-sloth" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Repo: &lt;a href="https://github.com/kuntal0901/reel-sloth" rel="noopener noreferrer"&gt;https://github.com/kuntal0901/reel-sloth&lt;/a&gt; (MIT license)&lt;/p&gt;

&lt;p&gt;Python, about 1,600 lines, with 48 unit tests covering parsing, cleanup, the Instagram export import, overnight mode, Notion sync and export. Every model is set in one &lt;code&gt;config.toml&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The open-source AI stack, all running locally:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;th&gt;Open piece&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Download reel + caption&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/yt-dlp/yt-dlp" rel="noopener noreferrer"&gt;&lt;code&gt;yt-dlp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Optional browser cookies if Instagram asks for a login&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speech to text&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://github.com/SYSTRAN/faster-whisper" rel="noopener noreferrer"&gt;&lt;code&gt;faster-whisper&lt;/code&gt;&lt;/a&gt; (&lt;code&gt;small&lt;/code&gt;, int8, CPU), audio decoded with PyAV&lt;/td&gt;
&lt;td&gt;Works offline after a one-time 460 MB download&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read on-screen text&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Qwen2.5-VL 3B&lt;/strong&gt; (&lt;code&gt;qwen2.5vl:3b&lt;/code&gt;) via &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Keyframes + carousel slides, one image per call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sort into categories&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Gemma 4 E2B&lt;/strong&gt; (&lt;code&gt;gemma4:e2b&lt;/code&gt;) via Ollama&lt;/td&gt;
&lt;td&gt;Returns JSON: category, items, action, note&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UI&lt;/td&gt;
&lt;td&gt;&lt;a href="https://gradio.app" rel="noopener noreferrer"&gt;Gradio&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;One page: paste, sort, copy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;links / Instagram export ──► yt-dlp ──► video + caption
                                 │
            ┌────────────────────┼──────────────────────┐
            ▼                    ▼                      ▼
   faster-whisper          keyframes/slides         caption text
    (transcript)        ► qwen2.5vl (overlay text)
            └────────────────────┬──────────────────────┘
                                 ▼
                 gemma4:e2b ► JSON ► code-based cleanup + dedupe
                                 ▼
             SQLite cache ─┬─► Markdown / TXT / CSV / JSON (copy mode)
                           └─► Notion "Reel Backlog" (optional)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;My machine is a &lt;strong&gt;Windows PC with 16 GB of RAM and no GPU&lt;/strong&gt;, so most of the work was making open models behave on modest hardware.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. One model in RAM at a time
&lt;/h3&gt;

&lt;p&gt;Whisper, a vision model and an LLM don't all fit comfortably in 16 GB. The pipeline runs the vision stage, then unloads Qwen2.5-VL (&lt;code&gt;keep_alive=0&lt;/code&gt;) before Gemma loads. Slow and steady, but it never swaps.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Only look at the screen when it's worth it
&lt;/h3&gt;

&lt;p&gt;Qwen2.5-VL on CPU takes about &lt;strong&gt;a minute per image&lt;/strong&gt;, so my first real run of 6 posts took ~35 minutes. The fix was to be lazy on purpose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast&lt;/strong&gt; mode (the default) only reads the screen for photo posts and for videos with under 40 spoken words. If someone talks through their list, the transcript is enough.&lt;/li&gt;
&lt;li&gt;Max 2 keyframes per video, near-duplicate frames skipped, at most 3 carousel slides.&lt;/li&gt;
&lt;li&gt;One image per call. Sending several frames at once overflowed the model's 4k context window, so each frame now gets its own request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thorough&lt;/strong&gt; mode reads every reel and every slide; &lt;strong&gt;Off&lt;/strong&gt; skips vision completely.
On the same 2 reels that took the pipeline from &lt;strong&gt;711 s to 314 s (2.3× faster)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3. Don't trust a 2B model with the last mile
&lt;/h3&gt;

&lt;p&gt;Gemma 4 E2B is great at the hard, fuzzy part: deciding that a reel is "about books" and pulling out the titles. It's less consistent at the boring details. Between runs it would misspell a title it had &lt;em&gt;heard&lt;/em&gt; correctly, split a book from its author or subtitle so one book became two items, or add vague items that weren't really things to do. Tweaking the prompt to fix one of these made another one worse.&lt;/p&gt;

&lt;p&gt;So instead of fighting the prompt, I let Gemma do the understanding and wrote &lt;strong&gt;plain code for the cleanup&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;titles are snapped to the spelling that was actually spoken in the reel (edit distance against the transcript),&lt;/li&gt;
&lt;li&gt;titles are put in title case,&lt;/li&gt;
&lt;li&gt;a subtitle or author that the model split off as its own item is folded back into the right book,&lt;/li&gt;
&lt;li&gt;generic "junk" titles are dropped and event details are folded into notes,&lt;/li&gt;
&lt;li&gt;near-duplicate items across reels are merged.
The JSON comes from Ollama's &lt;code&gt;format=json&lt;/code&gt;, then gets validated, with one repair retry if it's broken. My first full run on 6 posts gave 19 items, with duplicates and fragments. With the cleanup in place, the same 6 posts give &lt;strong&gt;15 clean ones&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  4. Built for the overnight run
&lt;/h3&gt;

&lt;p&gt;Everything is cached in SQLite, so re-running costs nothing for reels you've already processed. Overnight mode waits a random 20–40 s between downloads, backs off for 10 minutes if Instagram pushes back, stops after 3 blocked links in a row, logs everything, and picks up where it left off next time. The Notion sync never duplicates rows, and things you've ticked &lt;strong&gt;Done&lt;/strong&gt; are never touched.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Your saved feed is a diary.&lt;/strong&gt; What you save says a lot about you: what you want to read, where you want to travel, what you worry about, what you want to buy. With Reel Sloth, the videos, transcripts and screen text are processed &lt;strong&gt;on my own machine&lt;/strong&gt;. No hosted AI model ever sees them. Notion is optional, and the copy/export mode needs no account at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's free to run, so the lazy option is actually viable.&lt;/strong&gt; The whole point is to throw &lt;em&gt;hundreds&lt;/em&gt; of saved reels at it overnight. A closed API would bill per minute of audio, per image and per token, and an "every reel I ever saved" run would cost real money. Here it costs electricity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I could match the model to the job.&lt;/strong&gt; Whisper for speech, a small vision model for overlay text, and Gemma for sorting, each picked to fit a CPU and 16 GB. I could unload one before loading the next, which is something you can't control with someone else's API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything is swappable.&lt;/strong&gt; &lt;code&gt;llm&lt;/code&gt;, &lt;code&gt;vlm&lt;/code&gt; and &lt;code&gt;whisper&lt;/code&gt; in &lt;code&gt;config.toml&lt;/code&gt; take any Ollama tag or Whisper size. Got a GPU? Use a bigger Gemma and Whisper &lt;code&gt;medium&lt;/code&gt;. A better small model comes out next month? Change one line. The categories are just a prompt you can edit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It still works when the internet doesn't.&lt;/strong&gt; Once the reels are downloaded, transcription, vision and sorting all run offline.
Where open beat closed, concretely: a closed API would have been faster to start with, but it would have seen every reel I've saved, charged me for every overnight run, and left me no way to trade quality for speed the way Fast / Thorough / Off does.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;✏️ &lt;/p&gt;
&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Claude Code"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Claude Code Session for Building reel sloth app&lt;/span&gt;
      &lt;span class="agent-session-model-badge"&gt;claude&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I have not started anything yet, suggest me some ideas. My deadline is today EOD.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;With only today to work with, I'd pick something that runs on Ollama with a small open model and can be demoed in one short clip. Here are four ideas that fit the sloth theme:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lazy folder tidier.&lt;/strong&gt; A local model reads the messy files in your Downloads folder, then renames and sorts them into folders, with a dry-run preview first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group chat morning brief.&lt;/strong&gt; Export a WhatsApp or Telegram chat and get a two-line summary plus any "someone asked you something" items.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fridge photo to grocery list.&lt;/strong&gt; A local vision model looks at a fridge photo and lists what's running low. Most fun to demo, but harder to get reliable in a day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline bedtime story.&lt;/strong&gt; It writes a calm story from a few words and reads it aloud with Piper TTS.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'd go with the folder tidier, since it's the safest to finish today. Also, what laptop are you on, and roughly how much RAM?&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Okay, what about an app that takes your Instagram reels and classifies them into multiple things, like if it's some movie, book recommendations, Claude skills etc. Uses open source models to extract video data and generate a todo / recommendation list inside my Google Keep. You can refine it to the things that can be done more organized. Let me know about this idea.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;I like this idea a lot. It fits the theme well (everyone saves reels and then never does anything with them), and running it locally is a real selling point because your saved feed says a lot about you. There are two catches to plan around:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instagram has no API for your saved reels.&lt;/strong&gt; The full data export can take up to 48 hours, so for today the input will be reel links you paste in (or a text file of links). The app then downloads each reel with &lt;code&gt;yt-dlp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Keep has no official API for personal accounts.&lt;/strong&gt; The unofficial &lt;code&gt;gkeepapi&lt;/code&gt; library usually works with a token, but it can be fragile. I'll keep a fallback (Google Tasks, Notion or a Markdown file) ready so your demo doesn't depend on it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Draft plan for today:&lt;/strong&gt;&lt;br&gt;
1. &lt;strong&gt;Extract.&lt;/strong&gt; Download each reel with &lt;code&gt;yt-dlp&lt;/code&gt;, get a transcript with &lt;code&gt;faster-whisper&lt;/code&gt;, read on-screen text from a few frames with a local vision model through Ollama, and pull the caption.&lt;br&gt;
2. &lt;strong&gt;Classify.&lt;/strong&gt; A local LLM returns structured JSON for each reel: a category (Movies, Books, Claude skills/AI tools, Recipes, Places, Workouts, Other), the actual items named, and one action like "watch", "read" or "try".&lt;br&gt;
3. &lt;strong&gt;Organize and push.&lt;/strong&gt; Remove duplicates, group by category, and create one checklist per category with a link back to the source reel.&lt;br&gt;
4. &lt;strong&gt;Demo and post.&lt;/strong&gt; A small Gradio page, a short screen recording, and a write-up on why local matters.&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;You can replace Keep with Notion.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Good call, Notion is a better fit. It has an official API, so the fragile Keep step goes away. Step 3 now creates one Notion database called "Reel Backlog" with these columns: Item, Category, Action (watch/read/try), Done checkbox, and a link to the source reel. You'll get a filtered view per category, like "🎬 Movies to watch".&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Okay, you can access the folder in D: hacktoberfest to start with the project, but create a plan before writing a single line of code.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Got it. No code yet. I'll connect to your D:\hacktoberfest-2026 folder first, then write the plan there.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The plan is ready, and no code has been written yet. I put it in a new folder at &lt;code&gt;D:\hacktoberfest-2026\reel-sloth\PLAN.md&lt;/code&gt;. It covers the architecture, the Notion database layout, the folder structure, four time-boxed steps, what to cut if we run short on time, and the "why open" angle.&lt;/p&gt;

&lt;p&gt;Ollama already has &lt;strong&gt;gemma4&lt;/strong&gt; and &lt;strong&gt;qwen2.5vl&lt;/strong&gt; pulled on your PC, so we'll use those.&lt;/p&gt;

&lt;p&gt;Edit the plan however you like, and say go when you want me to start step 1.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I have created a token giving access to a page, my RAM is 16 GB, and also make sure to create a version where the extracted data is also copyable for those who don't want to integrate with Notion.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Got it: 16 GB RAM, Notion token ready, and a copy-paste mode so Notion is optional. I'll update the plan, then start step 1.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The step 1 code is now in &lt;code&gt;D:\hacktoberfest-2026\reel-sloth&lt;/code&gt;. It downloads each reel, transcribes the speech, reads on-screen text from 4 frames with qwen2.5vl, and caches everything so no reel is processed twice. Copy mode (Markdown checklist, CSV, JSON) is always on, and Notion only kicks in when your token is set. The unit tests pass on my side, but I can't reach Instagram from here, so the first real run has to happen on your PC.&lt;/p&gt;

&lt;p&gt;Please put your Notion token in &lt;code&gt;.env&lt;/code&gt; yourself rather than pasting it here.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I have posted the reels in samples/links.txt and Notion tokens in .env.example.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Two fixes before the first run:&lt;br&gt;
- &lt;strong&gt;Tokens:&lt;/strong&gt; I moved your Notion values into &lt;code&gt;.env&lt;/code&gt;, which git ignores, and reset &lt;code&gt;.env.example&lt;/code&gt; to blank. &lt;code&gt;.env.example&lt;/code&gt; is the file that gets committed, so the token would have gone public with the repo.&lt;br&gt;
- &lt;strong&gt;Photo posts:&lt;/strong&gt; your 6 links are &lt;code&gt;/p/&lt;/code&gt; posts, and at least one is a photo carousel. The app only handled videos, so it now also handles photo and carousel posts by reading the slides with qwen2.5vl.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The first real run worked partway. All 6 posts downloaded in about 21 seconds without needing a login (5 videos and 1 six-photo carousel), but no items came out because of bugs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Whisper crashed on the newest PyAV. I now decode the audio myself.&lt;/li&gt;
&lt;li&gt;The 6 carousel images were too much for qwen2.5vl in one go. It now reads one image at a time.&lt;/li&gt;
&lt;li&gt;A failed post was never retried. It is now.&lt;/li&gt;
&lt;li&gt;Progress bars were cluttering the output.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All four are fixed and tested, with 15 tests passing.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;What is the current progress then? What changes need to be done?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;&lt;strong&gt;Where it stands:&lt;/strong&gt; the app is fully built. On your PC, downloading and transcription now work for all 6 posts. The test run is in the step where qwen2.5vl reads on-screen text, which runs only on your CPU.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What needs to change:&lt;/strong&gt; only speed.&lt;br&gt;
- &lt;strong&gt;Fast mode, now the default:&lt;/strong&gt; the slow screen-reading step only runs for photo posts and videos with little speech. Videos where someone talks through their picks skip it, since the transcript already has the titles.&lt;br&gt;
- &lt;strong&gt;Fewer, smaller frames:&lt;/strong&gt; 2 frames per video instead of 4, smaller images, and frames that look the same are skipped.&lt;br&gt;
- &lt;strong&gt;A toggle on the web page:&lt;/strong&gt; Fast, Thorough or Off.&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;&lt;strong&gt;It works end to end.&lt;/strong&gt; Your 6 posts turned into &lt;strong&gt;19 items&lt;/strong&gt; with no errors, and they're in Notion now.&lt;br&gt;
- 🎬 Movies &amp;amp; Shows (3): We Bought a Zoo, The Guernsey Literary and Potato Peel Pie Society, Heart of Dixie&lt;br&gt;
- 📚 Books (6): A Year to Live, A Thousand Splendid Suns, East of Eden, Tuesdays with Morrie, Cobalt Red, plus one duplicate&lt;br&gt;
- 🤖 Claude skills (5): Chief of Staff, Anatomy, Teach, Marketing Psychology, Last 30 Days&lt;br&gt;
- 📍 Places (4) and 🛒 Products (1, WinDock)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Still to improve:&lt;/strong&gt; the run took about 35 minutes (roughly 30 images at about 1 minute each), and there are a few quality slips: a duplicate Morrie entry, ALL CAPS titles copied from book covers, and exhibit details filed as "Places".&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;&lt;strong&gt;The speed fix works: 2.3x faster.&lt;/strong&gt; On the same 2 reels the run went from &lt;strong&gt;711s to 314s&lt;/strong&gt;. Screen reading dropped from 546s to 156s, because the book reel's speech already named the book, so it skipped screen reading entirely. It also stopped producing a junk "Screen recording" item.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One setback:&lt;/strong&gt; re-sorting your 6 reels with a stricter prompt made things worse, not better (23 items). The small 2B Gemma started splitting authors and subtitles into their own items. Notion still has the earlier, cleaner items, and I haven't changed it. To fix this I'd do the cleanup in code instead of relying on the small model's judgment.&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;&lt;strong&gt;The cleanup worked: 15 clean items&lt;/strong&gt;, and the rules are now in code, so results no longer depend on the small model's mood. All 44 tests pass, 11 of them built from today's real failures.&lt;br&gt;
- "A Way to Live" (a misread cover) became &lt;strong&gt;A Year to Live&lt;/strong&gt;, using the spoken title.&lt;br&gt;
- East of Eden and Tuesdays with Morrie are no longer ALL CAPS. Authors and subtitles are now notes, not separate items, and the "20th anniversary edition" duplicate is gone.&lt;br&gt;
- &lt;strong&gt;Places&lt;/strong&gt; went from 4 to 1.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I ran a dry run against your Notion first. It only reads and changes nothing. The cleanup would fix 3 titles and archive 4 junk rows, but some notes would get worse: for example, the comics exhibit would lose its venue and dates. I recommend fixing only the titles and archiving, while keeping your notes as they are.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I tried running the app after pasting the reel and clicking on "Sort my reels", it is throwing an error.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;(.venv) D:\hacktoberfest-2026\reel-sloth&amp;gt;python -m reel_sloth.app&lt;br&gt;
* Running on local URL:  http://&lt;span class="agent-session-redacted"&gt;[REDACTED]&lt;/span&gt;:7860&lt;br&gt;
Traceback (most recent call last):&lt;br&gt;
  [...]&lt;br&gt;
  File "D:\hacktoberfest-2026\reel-sloth\reel_sloth\store.py", line 65, in get&lt;br&gt;
    row = self.db.execute(&lt;br&gt;
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 16304 and this is thread id 4168.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Thanks, that traceback pinpoints it, and it's my bug. The web page opened the reel database once at startup, but Gradio handles each click on a different thread, and SQLite refuses to share a connection across threads. The command line never hit this because it runs everything on one thread. The fix is to open the database per click, and I'm applying and testing it on your PC now with a real click on your link.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;&lt;strong&gt;Fixed, so please retry:&lt;/strong&gt; press Ctrl+C in the app's terminal, then run &lt;code&gt;python -m reel_sloth.app&lt;/code&gt; again.&lt;/p&gt;

&lt;p&gt;I tested it with a real button click on your link (Fast mode, Notion unticked) and it produced 2 items: &lt;strong&gt;Mastering Behavioral Interviews: The Guide to Storytelling in Tech&lt;/strong&gt; and &lt;strong&gt;Staff Engineer&lt;/strong&gt; by Will Larson. If something fails in future, the Progress box shows the actual message (like "Ollama is not running") instead of blank Error boxes. 51 tests pass, including one that clicks from a separate thread the way Gradio does.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;&lt;strong&gt;It's live: github.com/kuntal0901/reel-sloth.&lt;/strong&gt; Only the &lt;code&gt;main&lt;/code&gt; branch went up, with an MIT license added. Before pushing I checked the whole history, and no Notion token, &lt;code&gt;.env&lt;/code&gt;, config, cache or videos were ever committed.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        27 of 27 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;Before: open the Saved folder, rewatch a reel, pause it on the right frame, type the book title into a notes app, repeat. Roughly a minute or two per reel, which is exactly why I never did it.&lt;/p&gt;

&lt;p&gt;After: paste links (or point it at the export), press one button or start it before bed, and wake up to a checklist. On my test batch, 6 saved posts turned into 15 items in my Notion backlog without me watching a single reel again, including five Claude skills and an exhibition in Bengaluru I'd saved and completely forgotten about.&lt;/p&gt;

&lt;p&gt;Here is a screenshot of me processing over 250 reels backed up from instagram export and sorting it overnight.😌&lt;br&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%2Fkqfk7i50klnhds9u0q5i.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%2Fkqfk7i50klnhds9u0q5i.png" alt=" " width="799" height="190"&gt;&lt;/a&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%2F861pjwm31io8h4nlnqhz.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%2F861pjwm31io8h4nlnqhz.png" alt=" " width="800" height="613"&gt;&lt;/a&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%2Fibzzi9sudwezgaguzyw1.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%2Fibzzi9sudwezgaguzyw1.png" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;br&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%2Fin649nq5vce6irbdynao.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%2Fin649nq5vce6irbdynao.png" alt=" " width="800" height="427"&gt;&lt;/a&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%2Fos9dpcuen4nbok8rv5ys.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%2Fos9dpcuen4nbok8rv5ys.png" alt=" " width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Scope of Improvements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introducing a UI version of sorting the reels overnight currently the app supports only a terminal version.&lt;/li&gt;
&lt;li&gt;Better processing of reels right now the notion step is kept at last after all reels are completed which can done in parallel with the reels that are processed and extracted.&lt;/li&gt;
&lt;li&gt;The categories of classification are limited could be improved over that. And the extracted reels can be smart in the sense if it has recommended some links it should add in the references section.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma.&lt;/strong&gt; Gemma 4 E2B (&lt;code&gt;gemma4:e2b&lt;/code&gt;, via Ollama) is the brain of Reel Sloth. It reads the combined caption, transcript and on-screen text of every reel, decides what the reel is about, and extracts each movie, book, tool or place as structured JSON, entirely on a CPU-only laptop.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>gemma</category>
      <category>opensource</category>
    </item>
    <item>
      <title>MedPort: a private medical portfolio that reads your lab reports on your own laptop</title>
      <dc:creator>Kuntal Gorai</dc:creator>
      <pubDate>Mon, 19 Oct 2026 06:31:34 +0000</pubDate>
      <link>https://dev.to/kuntalgorai/medport-a-private-medical-portfolio-that-reads-your-lab-reports-on-your-own-laptop-2mj4</link>
      <guid>https://dev.to/kuntalgorai/medport-a-private-medical-portfolio-that-reads-your-lab-reports-on-your-own-laptop-2mj4</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Every time someone in my family sees a new doctor, the same thing happens: a plastic bag of lab reports from three different labs, a phone gallery full of blurry PDFs, and a doctor flipping through pages trying to find last year's HbA1c.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MedPort&lt;/strong&gt; turns that pile into one clean page. You drop in lab reports and discharge summaries, and a small open-weight model running on your own laptop reads them into a portfolio a doctor can scan in thirty seconds: allergies, conditions, current medications, out-of-range results, and trend charts that line up the same test across different labs and years.&lt;/p&gt;

&lt;p&gt;Your reports never leave your machine. There is no account, no cloud, and no API key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who would pay for it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Caregivers of elderly parents&lt;/strong&gt; juggling reports from several hospitals. This is the sharpest pain, and a one-time fee or about ₹299 / $5 a month is an easy yes for them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;People with chronic conditions&lt;/strong&gt; (diabetes, thyroid, kidney) who track the same labs for years.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;People moving cities or countries&lt;/strong&gt; who need one coherent history to hand to a new doctor.&lt;/li&gt;
&lt;li&gt;Later, &lt;strong&gt;small clinics&lt;/strong&gt; that want intake summaries without sending patient data to a cloud API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What it does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reads&lt;/strong&gt; PDFs, scans and phone photos, rebuilding table rows so values land in the right place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extracts&lt;/strong&gt; only what is printed (lab values, diagnoses, medications, allergies) and never interprets or gives advice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checks itself:&lt;/strong&gt; every value the model returns is matched against the page text and dropped if it isn't there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lines up results&lt;/strong&gt; across labs: "SGPT", "ALT (SGPT)" and "Alanine transaminase" all become one trend line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lets you review&lt;/strong&gt; each value next to the original before it counts. Anything you haven't checked is marked "unreviewed".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shares&lt;/strong&gt; the portfolio as a printable PDF, a passphrase-locked file that opens in any browser, or a QR code a doctor scans on the same Wi-Fi.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Goes with you&lt;/strong&gt; to the hospital: a phone companion app keeps a PIN-encrypted copy that works with no laptop and no internet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Everything below uses fictional reports generated by &lt;code&gt;samples/make_samples.py&lt;/code&gt;, read by &lt;code&gt;gemma4:e2b&lt;/code&gt; on a CPU-only laptop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Upload, and the model reads each report in the background.&lt;/strong&gt; The review screen puts the original next to what was extracted, so you confirm every value before it counts.&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%2F9ppj15poltjeeoyp3pcv.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%2F9ppj15poltjeeoyp3pcv.png" alt="Review screen: the original report next to the extracted values" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The portfolio a doctor reads in thirty seconds:&lt;/strong&gt; allergies, conditions, medications, out-of-range results, and trends across labs.&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%2Fsuopwa00x3ymjiao542c.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%2Fsuopwa00x3ymjiao542c.png" alt="The portfolio page" width="800" height="431"&gt;&lt;/a&gt;&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%2Fyerc87u69liwgo8oiyha.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%2Fyerc87u69liwgo8oiyha.png" alt="Lab results lined up across different labs and dates" width="799" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Share it&lt;/strong&gt; as a PDF, a passphrase-locked file, or a QR code on the same Wi-Fi.&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%2Ft6xqu0dyod3yubt8dgkq.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%2Ft6xqu0dyod3yubt8dgkq.png" alt="QR share card" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. At the hospital, on the phone, with no laptop and no internet.&lt;/strong&gt;&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%2Fegpjyq2ak1ecyljrg4iw.jpg" 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%2Fegpjyq2ak1ecyljrg4iw.jpg" alt="The phone app showing the portfolio offline" width="800" height="1788"&gt;&lt;/a&gt;&lt;br&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%2Fju7blwup3b8jhruqb75y.jpg" 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%2Fju7blwup3b8jhruqb75y.jpg" alt="Out-of-range results on the phone" width="800" height="1788"&gt;&lt;/a&gt;&lt;br&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%2Fdkb4z8shpydq2lxtrlog.jpg" 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%2Fdkb4z8shpydq2lxtrlog.jpg" alt="Send to doctor from the phone" width="800" height="1788"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kuntal0901" rel="noopener noreferrer"&gt;
        kuntal0901
      &lt;/a&gt; / &lt;a href="https://github.com/kuntal0901/medport" rel="noopener noreferrer"&gt;
        medport
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;MedPort&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A private medical portfolio that runs on your own computer. Drop in lab reports and discharge
summaries; a local open-weight model reads them into a one-page summary you can hand to any doctor
allergies, conditions, current medications, out-of-range results, and trend charts across labs and years
Your reports never leave your machine.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Install (Windows)&lt;/h2&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Download &lt;code&gt;MedPort-windows.zip&lt;/code&gt; from the latest release, unzip it, and double-click &lt;code&gt;MedPort.exe&lt;/code&gt;.
Your browser opens MedPort; keep the black window open while you use it. (Not code-signed yet: if
SmartScreen appears, choose More info -&amp;gt; Run anyway.)&lt;/li&gt;
&lt;li&gt;Optional but recommended: install &lt;a href="https://ollama.com/download" rel="nofollow noopener noreferrer"&gt;Ollama&lt;/a&gt; and run &lt;code&gt;ollama pull qwen2.5:3b&lt;/code&gt;,
so a local open model reads your reports. MedPort shows these steps on first run.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Your data stays in &lt;code&gt;%USERPROFILE%\.medport&lt;/code&gt;. Nothing is uploaded anywhere.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Run it from source&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;pip install -r requirements.txt
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; 1. Install Ollama (https://ollama.com) and pull a small open model&lt;/span&gt;
ollama pull qwen2.5:3b          &lt;/pre&gt;…
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kuntal0901/medport" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;MIT licensed. There is a Windows download (unzip, double-click &lt;code&gt;MedPort.exe&lt;/code&gt;, and it opens in your browser), or run from source with &lt;code&gt;pip install -r requirements.txt&lt;/code&gt; and &lt;code&gt;python -m medport&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The open pieces doing the work:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Piece&lt;/th&gt;
&lt;th&gt;What it does in MedPort&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Local inference server. MedPort talks to it over &lt;code&gt;localhost&lt;/code&gt; only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Gemma 4 (&lt;code&gt;gemma4:e2b&lt;/code&gt;)&lt;/strong&gt;, thinking off&lt;/td&gt;
&lt;td&gt;The extractor I run day to day on my laptop.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen2.5 3B / Qwen2.5-VL 3B&lt;/td&gt;
&lt;td&gt;Default text model, and the vision model used as OCR for photos and scans.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PyMuPDF&lt;/td&gt;
&lt;td&gt;Pulls text from PDFs and rebuilds table rows from word positions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FastAPI + Jinja + SQLite&lt;/td&gt;
&lt;td&gt;The app itself, all on the user's machine.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read.&lt;/strong&gt; PyMuPDF extracts text. Pages with no text layer (scans, photos) go to the local vision model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extract.&lt;/strong&gt; Each page goes to the model with a JSON schema through Ollama's structured output at temperature 0. The prompt asks only for what is printed on the page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ground.&lt;/strong&gt; Small models occasionally invent a value. Every number and name the model returns is checked against the page text, and anything not found is dropped. A rule parser also runs, and rows it finds that the model skipped are added back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Normalize.&lt;/strong&gt; A lookup table maps about 40 common tests to one name and a LOINC code, so results from different labs share a trend line. Out-of-range flags come from each report's own reference range.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review, then share.&lt;/strong&gt; The user confirms values against the original before anything is shown as reviewed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Making it fast on a normal laptop.&lt;/strong&gt; My laptop is an i5 with 16 GB of RAM and no GPU. Gemma 4 and Qwen3 are "thinking" models, and switching thinking off made extraction about 3x faster on CPU with no loss on this narrow task. Long reports are sent in chunks, reading runs in the background with a live "page 2 of 5" status, and there is a per-page timeout and a per-report time budget. If a page runs out of time, the rule parser takes over, so a report never just hangs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It still works with no model at all.&lt;/strong&gt; With Ollama off, the rule parser handles common lab layouts, and pressing &lt;strong&gt;Read again&lt;/strong&gt; later reruns the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The phone companion.&lt;/strong&gt; At a hospital, you have your phone, not your laptop. Running &lt;code&gt;py -m medport --lan&lt;/code&gt; serves a small installable web app to the phone over home Wi-Fi. Phones only allow offline apps and in-browser encryption over HTTPS, so MedPort creates its own tiny certificate authority, restricted with X.509 name constraints to private addresses, which means it can't be used to impersonate any public website. The phone pairs with a one-time code and keeps an AES-256-GCM copy encrypted with a key derived from your PIN (PBKDF2, 310k rounds). From the phone you can show the portfolio, print it, or &lt;strong&gt;Send to doctor&lt;/strong&gt;, which builds a passphrase-locked file on the phone itself and opens the share sheet for WhatsApp or email.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One real-world bug worth mentioning.&lt;/strong&gt; The first real report I tried (from an Indian hospital lab) wrapped long test names inside table cells, which put the value on its own line, and both the model and the parser lost the row. Fixing that, with an anonymised copy kept as a test fixture, mattered more than any prompt tweak.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;For MedPort, open models aren't a cost optimisation. They are the only way the product can exist.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy is the product.&lt;/strong&gt; Health records are the data people least want on someone else's server. With a closed API, "your reports stay private" is a policy promise from a company you have never met. With a local open-weight model, it is a fact you can check by turning off Wi-Fi. The whole demo runs offline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It works where the problem is.&lt;/strong&gt; Hospital Wi-Fi is bad, and you can't ask a patient to sign up for a cloud service in a waiting room. The laptop reads reports with no internet, and the phone shows them with no internet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero cost per report.&lt;/strong&gt; A caregiver might upload 50 reports in the first week. With a paid API, every report costs me money, so I would need a subscription just to cover inference. Locally the marginal cost is zero, so a one-time price works and the business is viable at ₹299.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swap models with one setting.&lt;/strong&gt; &lt;code&gt;MEDPORT_MODEL&lt;/code&gt; switches between Gemma 4, Qwen2.5, Llama 3.2 or MedGemma. When a better small model comes out, users get it with &lt;code&gt;ollama pull&lt;/code&gt;, and nobody can deprecate the model out from under them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Room to fine-tune.&lt;/strong&gt; Every correction a user makes on the review screen is a labelled example. The extraction task is narrow enough that a 1 to 3B model fine-tuned on those corrections (with consent, on-device) should beat a general-purpose giant, which a closed API would never let me ship to the user's own laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No lock-in.&lt;/strong&gt; No API key to leak, no pricing change or account ban that can break someone's medical history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Where closed would have won:&lt;/strong&gt; a frontier API reads messy scans more accurately out of the box, and I wouldn't have spent time on a grounding check. But the grounding check plus a review screen turned out to be the right design anyway. Even a perfect model shouldn't put a lab value in front of a doctor without the patient confirming it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemma&lt;/strong&gt;: MedPort runs Google's open-weight &lt;strong&gt;Gemma 4 (&lt;code&gt;gemma4:e2b&lt;/code&gt;)&lt;/strong&gt; locally through Ollama as its day-to-day extraction model on a CPU-only laptop.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>DOSE-touch-grass: an offline Gemma coach that hands you a stone and tells you to put your phone down</title>
      <dc:creator>Kuntal Gorai</dc:creator>
      <pubDate>Sun, 11 Oct 2026 17:23:00 +0000</pubDate>
      <link>https://dev.to/kuntalgorai/dose-touch-grass-an-offline-gemma-coach-that-hands-you-a-stone-and-tells-you-to-put-your-phone-down-24am</link>
      <guid>https://dev.to/kuntalgorai/dose-touch-grass-an-offline-gemma-coach-that-hands-you-a-stone-and-tells-you-to-put-your-phone-down-24am</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;We all know the four "happy chemicals": &lt;strong&gt;D&lt;/strong&gt;opamine, &lt;strong&gt;O&lt;/strong&gt;xytocin, &lt;strong&gt;S&lt;/strong&gt;erotonin and &lt;strong&gt;E&lt;/strong&gt;ndorphins. The phone has figured out how to hand out cheap dopamine on demand, so we keep coming back to it. &lt;strong&gt;DOSE&lt;/strong&gt; turns that around: you tell it which feeling you're short on, and it sends you &lt;em&gt;outside&lt;/em&gt; to get it the real way.&lt;/p&gt;

&lt;p&gt;How it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pick a chemical.&lt;/strong&gt; Dopamine (achievement, novelty), Oxytocin (connection), Serotonin (calm, sunlight) or Endorphins (movement). There's also &lt;em&gt;Surprise me&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get a challenge.&lt;/strong&gt; Choose one from a library of 48 hand-written outdoor challenges, or ask the &lt;strong&gt;AI coach&lt;/strong&gt;. You tell it where you are, who you're with, how much energy you have and how many minutes you've got (it can also take the current weather), and &lt;strong&gt;Gemma 3, running locally in your browser&lt;/strong&gt;, writes a 15–45 minute challenge for that exact moment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the phone away.&lt;/strong&gt; A timer runs with a chime and vibration at the end. DOSE also counts "screen peeks", meaning how often you opened the app during the challenge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reflect.&lt;/strong&gt; You get a fun fact about the chemical, a short journal questionnaire, and an optional reflection that Gemma writes from your answers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch the ratio.&lt;/strong&gt; The journal tracks your &lt;strong&gt;grass vs. screen ratio&lt;/strong&gt; over time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Who it's for:&lt;/strong&gt; anyone who has caught themselves scrolling and thought &lt;em&gt;"I should really go outside"&lt;/em&gt; without knowing what to actually do once they got there. DOSE gives you one small, specific thing to do, and then it gets out of your way.&lt;/p&gt;

&lt;p&gt;The app is built so that the screen is the shortest part of the experience: about 30 seconds to get a challenge, then 15–45 minutes outside.&lt;/p&gt;

&lt;h3&gt;
  
  
  I took it outside 🌱
&lt;/h3&gt;

&lt;p&gt;To test it, I picked &lt;strong&gt;Serotonin&lt;/strong&gt;, chose a short session, and asked the coach for a challenge. Gemma came back with this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Go out onto the grass and pick up a stone. Hold it, notice every sensation it gives you: its weight, temperature, texture. Let your thoughts go and focus only on its structure and beauty for 15 minutes.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It sounded almost too simple. It turned out to be one of the most satisfying 15 minutes of my week.&lt;/p&gt;

&lt;p&gt;The stone was smooth on one side and rough on the other, with tiny ridges I'd never have noticed if I'd been looking at a screen. It's strange that an object with no life in it, which has been lying in the same spot for who knows how long, can pass some kind of energy on to your mind and body. Focusing on its texture and smoothness slowly crowded out everything else I'd been thinking about. When the chime went off, I felt calm and honestly a little joyful.&lt;/p&gt;

&lt;p&gt;Back inside, I filled in the journal questionnaire and asked Gemma for a reflection. It picked up on what I'd written and gave me useful feedback about why the challenge worked for me. What stayed with me most is that &lt;strong&gt;this whole loop ran on my own laptop, offline, with an open model.&lt;/strong&gt; None of my thoughts about the stone, my mood or my journal went to anyone's server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live app:&lt;/strong&gt; &lt;a href="https://dose-touch-grass.vercel.app/" rel="noopener noreferrer"&gt;https://dose-touch-grass.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To try the AI coach&lt;/strong&gt; you need a WebGPU browser: desktop Chrome/Edge 113+ or Android Chrome 121+. The first time, it downloads the model (about 700 MB). After that it loads from the cache in a few seconds and works offline. In browsers without WebGPU, the full challenge library, timer and journal still work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kuntal0901" rel="noopener noreferrer"&gt;
        kuntal0901
      &lt;/a&gt; / &lt;a href="https://github.com/kuntal0901/dose-touch-grass" rel="noopener noreferrer"&gt;
        dose-touch-grass
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🌱 DOSE: Touch Grass&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;An on-device AI coach that gets you off your phone and outside.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pick the feel-good chemical you're craving (&lt;strong&gt;D&lt;/strong&gt;opamine, &lt;strong&gt;O&lt;/strong&gt;xytocin, &lt;strong&gt;S&lt;/strong&gt;erotonin or &lt;strong&gt;E&lt;/strong&gt;ndorphins), and DOSE gives you a short screen-free challenge to do outdoors. A timer runs while you're out, and a private journal keeps track of how it went.&lt;/p&gt;
&lt;p&gt;The coach is &lt;strong&gt;Gemma 3 1B running entirely in your browser&lt;/strong&gt; through WebGPU. There are no API keys, no server and no account, and your journal never leaves your device.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Built for the &lt;a href="https://dev.to/challenges" rel="nofollow"&gt;DEV Hacktoberfest Open-Source AI Challenge&lt;/a&gt;, Week 1: &lt;em&gt;Touch Grass&lt;/em&gt; · &lt;code&gt;#hf26challenge&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;em&gt;add your Vercel URL here&lt;/em&gt; · &lt;strong&gt;Write-up:&lt;/strong&gt; &lt;em&gt;add your DEV post here&lt;/em&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why open-source AI?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;An app that wants you to put your phone down shouldn't send your mood journal to a cloud API.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private:&lt;/strong&gt; inference runs locally, so your mood, energy and journal…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kuntal0901/dose-touch-grass" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The open-source AI stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://ai.google.dev/gemma" rel="noopener noreferrer"&gt;Gemma 3 1B Instruct&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;gemma3-1b-it-q4f16_1-MLC&lt;/code&gt;), quantized to 4 bits, about 700 MB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/mlc-ai/web-llm" rel="noopener noreferrer"&gt;WebLLM&lt;/a&gt;&lt;/strong&gt; from MLC runs the model in the browser on &lt;strong&gt;WebGPU&lt;/strong&gt;, inside a &lt;strong&gt;Web Worker&lt;/strong&gt; so the UI never freezes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next.js 16&lt;/strong&gt;, Tailwind v4, shadcn/ui and zustand. There's &lt;strong&gt;no backend at all&lt;/strong&gt;: the journal lives in &lt;code&gt;localStorage&lt;/code&gt;, and a service worker caches the app shell for offline use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://open-meteo.com/" rel="noopener noreferrer"&gt;Open-Meteo&lt;/a&gt;&lt;/strong&gt; (also open source) adds optional weather context, with coordinates rounded before the request.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pick chemical ─► CoachPanel ─► engine.ts ──postMessage──► llm.worker.ts
                                   ▲                         │ WebLLM + Gemma 3 1B
                                   │                         ▼ (WebGPU)
                    parse + validate (prompts.ts) ◄── streamed tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Making a 1B model behave in a browser
&lt;/h3&gt;

&lt;p&gt;Getting Gemma to &lt;em&gt;load&lt;/em&gt; was the easy part. Getting it to &lt;em&gt;behave&lt;/em&gt; was the real work. Some of what I learned:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. One config flag made all the difference.&lt;/strong&gt; WebLLM's prebuilt Gemma 3 record sets a 4096-token context window, but the model uses a 512-token &lt;strong&gt;sliding window&lt;/strong&gt;, and WebLLM rejects having both. My first fix was to disable the sliding window. The model loaded, but it rambled endlessly, never emitted end-of-turn, and wrote several JSON objects in a row. The right fix is to keep the sliding window Gemma 3 was trained with and drop the fixed context:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;context_window_size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sliding_window_size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;attention_sink_size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That one change took the output from garbage to coherent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. JSON mode works against small models.&lt;/strong&gt; Under WebLLM's JSON-schema grammar, Gemma 1B padded whitespace until it hit &lt;code&gt;max_tokens&lt;/code&gt; and never closed the object. It also kept leaving out the &lt;code&gt;steps&lt;/code&gt; array. So I dropped JSON and asked for plain lines instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Title: ...
Description: ...
1. ...
2. ...
3. ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A tolerant parser accepts &lt;code&gt;**Title:**&lt;/code&gt;, &lt;code&gt;Step 1:&lt;/code&gt;, inline &lt;code&gt;Steps: 1. … 2. …&lt;/code&gt; and other variations, and keeps a JSON salvage path as a fallback. As soon as step 3 is complete, generation is interrupted, so there's no rambling afterward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A validator rejects off-theme output.&lt;/strong&gt; Any challenge that mentions screens, phones or apps is rejected, and the coach retries automatically. A coach that tells you to "open a meditation app" would defeat the whole point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The UI must never spin forever.&lt;/strong&gt; On my Intel Iris Xe laptop I hit &lt;code&gt;DXGI_ERROR_DEVICE_HUNG&lt;/code&gt;. WebLLM then unloads the model, and any pending generation waits forever. So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;each attempt has a 90 s timeout, then &lt;code&gt;interruptGenerate()&lt;/code&gt;, then a hard reset that terminates the worker and reloads from the cache;&lt;/li&gt;
&lt;li&gt;the worker wraps &lt;code&gt;GPUAdapter.prototype.requestDevice&lt;/code&gt; to watch &lt;code&gt;device.lost&lt;/code&gt; and broadcasts it on a &lt;code&gt;BroadcastChannel&lt;/code&gt;, so the UI can show a clear error right away instead of hanging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Shader warm-up.&lt;/strong&gt; A 4-token generation followed by &lt;code&gt;resetChat()&lt;/code&gt; after load makes the first real request noticeably faster.&lt;/p&gt;

&lt;p&gt;On an integrated Iris Xe GPU this runs at about 5 tokens/s, so a full challenge takes 20–35 seconds. The live preview of the title as it streams in makes that wait feel short.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next
&lt;/h3&gt;

&lt;p&gt;The README has an honest roadmap. Gemma 1B sometimes writes a challenge that fits its chemical only loosely, occasionally names the wrong chemical in the text, and my length caps can cut a sentence off mid-thought. Next up: few-shot examples per chemical, trimming at sentence boundaries instead of character limits, a validator that catches the wrong chemical, and an opt-in "quality mode" with a bigger Gemma on capable GPUs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;For this app, a closed API would have been the wrong tool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy is the product.&lt;/strong&gt; DOSE asks how you feel, where you are, who you're with, and has you write a journal about it. That's some of the most personal data there is. With an open-weight model running in the browser, &lt;strong&gt;none of it leaves your device&lt;/strong&gt;. There's no account, no server and no logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It works where it's needed.&lt;/strong&gt; The point is to go outside, often to places with bad or no signal. Once Gemma is cached, the coach works &lt;strong&gt;completely offline&lt;/strong&gt;. A cloud API would fail at exactly the moment you need it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs nothing to run.&lt;/strong&gt; There are no per-token costs and no API keys to protect. I host static files on Vercel's free tier, and anyone can fork it and run their own copy for $0. A wellbeing tool shouldn't need a subscription to pay for someone else's GPUs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I could fix what was broken.&lt;/strong&gt; Every bug in the "making it behave" section above I could only fix because the whole stack is open. I read WebLLM's source to find the sliding-window conflict, changed the model's runtime config, and changed how decoding stops. With a closed API, "the model rambles" would have stayed a support ticket.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model is swappable.&lt;/strong&gt; It's a single constant. When a better small open model comes out, DOSE gets better without any change to its architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The irony isn't lost on me: an AI model running on your laptop GPU, whose only job is to get you away from the laptop. Open models make that possible without a cost, either to your wallet or to your privacy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma.&lt;/strong&gt; Gemma 3 1B is the core of the app: it writes every personalized challenge and every journal reflection, entirely on-device, through WebLLM and WebGPU.&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
