<?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: Cody Topp</title>
    <description>The latest articles on DEV Community by Cody Topp (@codytopp).</description>
    <link>https://dev.to/codytopp</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%2F4191658%2F590f6efb-1e82-4ae5-8a37-8caf9816a23b.jpg</url>
      <title>DEV Community: Cody Topp</title>
      <link>https://dev.to/codytopp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codytopp"/>
    <language>en</language>
    <item>
      <title>Slothsort: A Local Gemma Agent That Tidies Your Downloads Folder While You Do Nothing</title>
      <dc:creator>Cody Topp</dc:creator>
      <pubDate>Sat, 24 Oct 2026 01:49:22 +0000</pubDate>
      <link>https://dev.to/codytopp/slothsort-a-local-gemma-agent-that-tidies-your-downloads-folder-while-you-do-nothing-54d7</link>
      <guid>https://dev.to/codytopp/slothsort-a-local-gemma-agent-that-tidies-your-downloads-folder-while-you-do-nothing-54d7</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;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%2Fm5xflyxi1gdt1e0xzy56.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%2Fm5xflyxi1gdt1e0xzy56.png" alt="Slothsort's plan: every file, before and after, decided locally" width="800" height="1133"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;If you work in design, your Downloads folder probably looks like this: &lt;code&gt;Screen Shot 2026-10-14 at 9.41.02 PM.png&lt;/code&gt;, &lt;code&gt;Untitled-1.png&lt;/code&gt;, &lt;code&gt;document(3).pdf&lt;/code&gt;, &lt;code&gt;logo_FINAL_final_v3 (1).png&lt;/code&gt;. Every one of those files meant something the day it landed. A month later, finding the right one means opening them one by one.&lt;/p&gt;

&lt;p&gt;Tidying it is the job everyone means to do on Friday and nobody does. So in the spirit of International Sloth Day, I built something that does it for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Slothsort&lt;/strong&gt; reads every loose file in a folder, gives each one a name you'd actually search for, and files it into a sensible folder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Screen Shot 2026-10-14 at 9.41.02 PM.png&lt;/code&gt; â†’ &lt;code&gt;Screenshots/2026-10-06_lakeside-cafe-online-order-checkout-failure.png&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;document(3).pdf&lt;/code&gt; â†’ &lt;code&gt;Invoices &amp;amp; Receipts/2026-10-11_invoice-88231-for-500-a2-posters.pdf&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;IMG_4471.png&lt;/code&gt; â†’ &lt;code&gt;Illustrations/2026-10-04_farmers-market-schedule.png&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;logo_FINAL_final_v3 (1).png&lt;/code&gt; â†’ &lt;code&gt;Duplicates/&lt;/code&gt; (byte-identical to the original, which stays put)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It runs entirely on your own machine with Gemma 3 and Tesseract. Set it up once as a nightly job and you never think about the folder again. That's the whole pitch: &lt;strong&gt;the laziest possible way to have an organised drive.&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7pp4vlhdlbwqob2ne5t.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb7pp4vlhdlbwqob2ne5t.gif" alt="Slothsort demo: before, the plan, after" width="800" height="978"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt; thirteen files, the usual mix of screenshots, exports, a duplicated logo, an invoice, a brief, a font and source files.&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%2Fookpg27a1v9ipl0k6v2x.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%2Fookpg27a1v9ipl0k6v2x.png" alt="Before" width="799" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The plan:&lt;/strong&gt; &lt;code&gt;python3 -m slothsort plan ~/Downloads&lt;/code&gt; looks at everything and moves nothing. It writes a single HTML page with a thumbnail, the old name, the new home and &lt;em&gt;who decided&lt;/em&gt;: the file extension, a duplicate check, or the model. You approve with &lt;code&gt;apply&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After:&lt;/strong&gt; one run, 38 seconds on an otherwise idle 8-core CPU with no GPU (slower when the machine is busy).&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%2Fd2yhk636ec5f7f3x6pkd.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%2Fd2yhk636ec5f7f3x6pkd.png" alt="After" width="800" height="638"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you don't like it, &lt;code&gt;python3 -m slothsort undo ~/Downloads&lt;/code&gt; puts every file back exactly where it was.&lt;/p&gt;

&lt;p&gt;The demo folder is generated by a script in the repo with made-up brands, so you can reproduce this run yourself. No real client files were used.&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/ctopp11" rel="noopener noreferrer"&gt;
        ctopp11
      &lt;/a&gt; / &lt;a href="https://github.com/ctopp11/slothsort" rel="noopener noreferrer"&gt;
        slothsort
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Tidies your Downloads folder overnight with local Gemma + OCR, then finds any file in milliseconds. Private, offline, one-command undo.
    &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;Slothsort 🦥&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/ctopp11/slothsort/docs/logo-512.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fctopp11%2Fslothsort%2FHEAD%2Fdocs%2Flogo-512.png" alt="Slothsort logo — a sloth asleep on a file folder" width="256"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Do nothing. Find everything.&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;Slothsort tidies your Downloads folder overnight with a local open model, then finds any file in milliseconds. Your files never leave your machine.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🌙 &lt;strong&gt;Wake up tidy.&lt;/strong&gt; Every loose file gets a dated, searchable name and a proper folder: Screenshots, Invoices &amp;amp; Receipts, Logos &amp;amp; Brand, Source Files and more. Duplicates are set aside.&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Find anything fast.&lt;/strong&gt; &lt;code&gt;slothsort find "northgate invoice"&lt;/code&gt; answers from a private index, including text read inside screenshots and PDFs. Median 20 ms on a 100,000-file synthetic benchmark (&lt;a href="https://github.com/ctopp11/slothsort/docs/BENCHMARKS.md" rel="noopener noreferrer"&gt;numbers&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;🔒 &lt;strong&gt;Private and 100% local.&lt;/strong&gt; Gemma 3 through Ollama, plus Tesseract OCR. No account, no API key, no per-file cost. Works offline.&lt;/li&gt;
&lt;li&gt;↩️ &lt;strong&gt;One-command undo.&lt;/strong&gt; Nothing moves until you've seen the plan, and &lt;code&gt;slothsort undo&lt;/code&gt; puts every file back.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;ollama pull gemma3:4b
python3 -m slothsort run &lt;span class="pl-k"&gt;~&lt;/span&gt;/Downloads      &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; plan, tidy and index in one go&lt;/span&gt;
python3 -m slothsort&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/ctopp11/slothsort" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma3:4b
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; slothsort plan ~/Downloads
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; slothsort apply ~/Downloads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The truly lazy version is one cron line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 2 * * * cd ~/slothsort &amp;amp;&amp;amp; python3 -m slothsort run ~/Downloads --overnight
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;strong&gt;Open pieces:&lt;/strong&gt; Gemma 3 4B running locally through Ollama, Tesseract for OCR, and Pillow for image measurements. The rest is standard-library Python. It's MIT licensed with 30 unit tests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The design principle I care most about: the model describes, the code decides.&lt;/strong&gt; I'm comfortable letting a language model tell me that a PDF is an invoice from a print shop. I'm not comfortable letting it rename files on my disk. So Gemma's only job is to return two fields through Ollama's structured outputs: a &lt;code&gt;kind&lt;/code&gt; from a fixed list and a 3â€“6 word &lt;code&gt;subject&lt;/code&gt;. Everything that touches the file system is plain, testable code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dated, slugified names (&lt;code&gt;2026-10-11_invoice-88231-for-500-a2-posters.pdf&lt;/code&gt;),&lt;/li&gt;
&lt;li&gt;collision-safe suffixes, so nothing is ever overwritten,&lt;/li&gt;
&lt;li&gt;SHA-256 duplicate detection, which keeps the original and moves the &lt;code&gt;(1)&lt;/code&gt; copy,&lt;/li&gt;
&lt;li&gt;a check that skips any file edited between planning and applying,&lt;/li&gt;
&lt;li&gt;and a journal written as it goes, which is what makes &lt;code&gt;undo&lt;/code&gt; trustworthy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Being honest about what the model can see.&lt;/strong&gt; The Gemma build on my machine is text-only. Rather than pretend otherwise, Slothsort checks the model's capabilities through Ollama's API. If vision is available, Gemma sees a 768px thumbnail. If it isn't, Gemma gets the text Tesseract reads out of the image plus facts measured with Pillow: pixel size, whether it matches a common screen resolution, colour count and dominant colours. That turned out to be enough to tell a checkout-error screenshot from a market poster from a logo.&lt;/p&gt;

&lt;p&gt;Then I hit a lesson. For an image with &lt;em&gt;no&lt;/em&gt; text, the model had nothing to go on, and it started borrowing the example phrase from my prompt as the "subject". So images without readable text skip the model entirely and get named from measured colours and shape (&lt;code&gt;navy-purple-wide-artwork&lt;/code&gt;). It's less poetic, but it's never wrong about what it saw.&lt;/p&gt;

&lt;p&gt;It isn't perfect. In the demo it filed a phone mockup under Logos &amp;amp; Brand, because without vision all it had to work with was the brand name on the screen. That's why there's a plan page and an undo button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Slow and steady, literally.&lt;/strong&gt; &lt;code&gt;--overnight&lt;/code&gt; lowers the process priority and rests between files. Every result is cached by file hash the moment it's computed, so if the laptop sleeps halfway through a 2,000-file folder, the next night picks up where it left off, and files it has already seen cost nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then the lazy question after tidying: "where did I put that invoice?"&lt;/strong&gt; Opening folders is still work, so Slothsort keeps a running index: one SQLite file next to your files. &lt;code&gt;slothsort find "northgate invoice"&lt;/code&gt; answers from the index alone and never rescans the disk.&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%2Fq0rvv88ocrapl5vmx3bg.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%2Fq0rvv88ocrapl5vmx3bg.png" alt="find answers from the index, with timing" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In plain terms it has three layers, loosely modelled on the way people describe memory. It's an analogy for organising data, not a brain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recall by words.&lt;/strong&gt; SQLite FTS5 covers file names, Gemma's description and whatever text Tesseract read inside the file. That's why &lt;code&gt;find "card declined"&lt;/code&gt; turns up a screenshot whose name never mentioned a card.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recall by similarity.&lt;/strong&gt; One vector per file, searched with a single matrix multiply and blended with the word results. I wanted the &lt;code&gt;nomic-embed-text&lt;/code&gt; model for this, but my machine's network blocked the download. So Slothsort falls back to built-in vectors made from words and word fragments. That fallback is fuzzy matching (it forgives "pine peek"), not true understanding, and it switches to the real embedding model automatically once that's installed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Episodes and topics.&lt;/strong&gt; Every index, apply and undo is logged as a run, and &lt;code&gt;slothsort topics&lt;/code&gt; groups related files under labels like "pine / peak / outfitters".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The index updates incrementally. A file with the same path, size and modified time isn't even re-hashed. Moved or renamed files are matched by their hash, so they keep their description and never go back to the model.&lt;/p&gt;

&lt;p&gt;I benchmarked it on 100,000 synthetic entries (generated metadata, no model calls) on the same 8-core CPU. With the index loaded, median search times were 11.7 ms for words, 4.2 ms for similarity and 20.1 ms for both combined. A cold open takes about 155 ms. Re-indexing 100,000 real, unchanged files took 0.8 seconds. The full method is in the repo's &lt;code&gt;docs/BENCHMARKS.md&lt;/code&gt;.&lt;/p&gt;

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

&lt;p&gt;Because of what's &lt;em&gt;in&lt;/em&gt; a Downloads folder. A designer's Downloads folder holds client invoices, unreleased brand work under NDA, contracts, and screenshots of banking and admin dashboards. I would never upload that folder to a cloud API just to get tidier file names, and no client would thank me if I did.&lt;/p&gt;

&lt;p&gt;With open weights running locally:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nothing leaves the machine.&lt;/strong&gt; The model, the OCR and the files are all on the same laptop. It works on a plane.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs nothing to run nightly.&lt;/strong&gt; A cloud API charges per call. Slothsort's marginal cost per file is zero, which is the only way an "every night, forever" automation makes sense.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I can swap the model.&lt;/strong&gt; &lt;code&gt;SLOTHSORT_MODEL=gemma3:1b&lt;/code&gt; for an older laptop, or a vision-capable Gemma build to read images directly. No vendor gets a vote.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search stays private too.&lt;/strong&gt; The index of everything Gemma and Tesseract read from your files sits in one SQLite file on your disk. A cloud search service would need a copy of all of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I can inspect every decision.&lt;/strong&gt; The plan page shows which files were decided by the model and which by deterministic rules. That transparency is what lets you trust an agent with your file system.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;On the demo folder, Slothsort planned and filed 13 files in 38 seconds, with 8 of them read by the model. Doing the same by hand means opening each file, deciding what it is, typing a name and dragging it somewhere: easily 20â€“30 seconds a file, before you even get to spotting the duplicate. For a folder that collects a few hundred files a month, the nightly job turns a dreaded afternoon into zero minutes, and finding something later is one command that answers in milliseconds. The sloth would approve.&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 4B, running locally through Ollama, classifies and describes every file (structured outputs, capability detection), and its descriptions feed the search index.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Transparency note: an AI coding agent wrote most of the code and drafted this post under my direction. I chose the problem, set the design rules (the model describes, the code decides; always plan before moving; always undoable) and reviewed the results.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>ollama</category>
    </item>
    <item>
      <title>ShelfReady: A Private KDP Listing Studio That Runs Gemma on Your Own Machine</title>
      <dc:creator>Cody Topp</dc:creator>
      <pubDate>Sun, 18 Oct 2026 17:05:49 +0000</pubDate>
      <link>https://dev.to/codytopp/shelfready-a-private-kdp-listing-studio-that-runs-gemma-on-your-own-machine-47md</link>
      <guid>https://dev.to/codytopp/shelfready-a-private-kdp-listing-studio-that-runs-gemma-on-your-own-machine-47md</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;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%2Fxhtd69nako35blduay9e.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%2Fxhtd69nako35blduay9e.png" alt="ShelfReady: a finished colouring-book listing scoring 100 on the KDP checks" width="800" height="948"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;I'm a designer and an independent publisher. Part of my business is colouring books on Amazon KDP, and the slowest part of every launch isn't the artwork. It's the listing: a title, a subtitle, a description and seven keyword boxes, each with its own limits and rules.&lt;/p&gt;

&lt;p&gt;General-purpose AI tools make that job faster, but they don't make it safer. Ask one for a colouring-book listing and you'll often get "Bestselling Coloring Book · Perfect Gift · Free Bonus Pages". Each of those phrases breaks KDP's metadata guidelines. Sales-rank claims, "free", program names and other people's brands can all get a listing flagged or suppressed. Speed isn't worth much if the output can't go live.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ShelfReady&lt;/strong&gt; is the tool I wanted for my own workflow. You give it the facts about your book: theme, audience, style, number of designs, trim size and marketplace. In about 40 seconds, on an ordinary 8-core CPU with no GPU, it returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;title and subtitle&lt;/strong&gt; with a live 199-character meter,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;seven keyword phrases&lt;/strong&gt;, each counted against KDP's 50-character box,&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;formatted HTML description&lt;/strong&gt; using only the tags KDP supports,&lt;/li&gt;
&lt;li&gt;and a &lt;strong&gt;KDP readiness score&lt;/strong&gt; with every issue explained in plain English.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every field stays editable, and the checks re-run as you type. Copy each field straight into KDP, or export the whole listing as a text file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who pays for this?&lt;/strong&gt; KDP has a large community of low-content and colouring-book publishers, most of them running lean side businesses. They already pay for keyword research tools and listing templates. I'd price ShelfReady for that market as a one-time licence, somewhere in the $19 to $29 range. Because the model runs locally, my cost per listing is zero, so that price can stay low without the product losing money every time someone clicks Generate.&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flzxbuzcx6n7nhjojr8ar.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flzxbuzcx6n7nhjojr8ar.gif" alt="ShelfReady demo: sample brief, local generation (sped up), live KDP checks" width="600" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The 29-second demo above is a real run with nothing staged. The generation segment is sped up 15× and labelled as such. The full-resolution MP4 is in the repo: &lt;a href="https://github.com/ctopp11/shelfready/blob/main/docs/shelfready-demo.mp4" rel="noopener noreferrer"&gt;docs/shelfready-demo.mp4&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The two moments that matter most:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The checks catch what a tired human misses.&lt;/strong&gt; Typing "Bestselling Edition" into the title drops the score from 100 to 80 and flags it instantly as prohibited sales-rank language.&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%2Fw2no9t7pxwvuejr8yjty.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%2Fw2no9t7pxwvuejr8yjty.png" alt="Live check flags a banned word" width="800" height="948"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. When something's wrong, it tells you what to do.&lt;/strong&gt; No stack traces. If Ollama isn't running or the model isn't installed, you get the exact command to fix it.&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%2Fyx3b57jii0k2k0el0q77.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%2Fyx3b57jii0k2k0el0q77.png" alt="Clear, actionable error state" width="800" height="533"&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/ctopp11" rel="noopener noreferrer"&gt;
        ctopp11
      &lt;/a&gt; / &lt;a href="https://github.com/ctopp11/shelfready" rel="noopener noreferrer"&gt;
        shelfready
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Private, local-first KDP listing studio for colouring-book publishers. Gemma 3 via Ollama + a deterministic KDP rules engine.
    &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;ShelfReady&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;A private, local-first KDP listing studio for colouring-book publishers.&lt;/strong&gt;
Give it the facts about your book. It writes the title, subtitle, a formatted description and all seven keyword boxes using &lt;strong&gt;Gemma 3&lt;/strong&gt; running on your own machine through &lt;strong&gt;Ollama&lt;/strong&gt;, then checks every line against Amazon KDP's published metadata rules before you paste anything into KDP.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/ctopp11/shelfready/docs/03-result.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fctopp11%2Fshelfready%2FHEAD%2Fdocs%2F03-result.png" alt="ShelfReady: a finished listing that scores 100/100 on the KDP checks"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Built for the DEV × Hacktoberfest 2026 Open-Source AI Challenge, Week 2: &lt;em&gt;Side Hustle&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why it exists&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Writing a KDP listing takes longer than most people expect, and mistakes cost real money. Generic AI tools will happily write "Bestselling Coloring Book, Perfect Gift, Free Bonus Pages". Every one of those phrases breaks KDP's metadata rules and can get a listing suppressed. ShelfReady splits the job in two:&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The model (Gemma 3, local)&lt;/th&gt;
&lt;th&gt;The rules engine (plain Python, deterministic)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Writes persuasive, specific copy from your facts&lt;/td&gt;
&lt;td&gt;Enforces KDP's character limits, banned terms, allowed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&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/ctopp11/shelfready" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;ShelfReady is pure Python standard library plus vanilla HTML, CSS and JS. There's no &lt;code&gt;pip install&lt;/code&gt; and no build step. It's MIT licensed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma3:4b
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; shelfready      &lt;span class="c"&gt;# → http://127.0.0.1:8787&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;strong&gt;The model: Gemma 3 4B, running locally through Ollama.&lt;/strong&gt; I chose Gemma 3 4B because it hits the balance this product needs: small enough (about 2.5 GB quantised) to run on the CPU of an ordinary publisher's computer, and capable enough to write specific, buyer-focused copy. ShelfReady calls Ollama's &lt;code&gt;/api/chat&lt;/code&gt; with &lt;strong&gt;structured outputs&lt;/strong&gt;: a JSON schema that forces exactly four fields and exactly seven keywords. That rules out the whole "the model returned prose instead of JSON" class of failures by design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The design decision that matters: the model writes, the code decides.&lt;/strong&gt; I don't trust any language model, open or closed, to enforce a 50-character limit or remember that "Kindle Unlimited" is banned in keywords. So the architecture separates the two:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brief → validate → Gemma drafts (streamed) → sanitise → mechanical fixes → KDP rules engine
                                                                         ↓ blocking errors?
                                                  Gemma repairs, with the exact errors fed back
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;kdp_rules.py&lt;/code&gt;&lt;/strong&gt; is a deterministic rules engine. Each rule maps to a line in KDP's public help pages on metadata, keywords and descriptions. It covers combined title length, the 60-character skim threshold, promotional and time-sensitive language, Amazon program names, a trademark tripwire, quotation marks and HTML in keywords, plural and word-order duplicates, keywords that only repeat title words, the 4,000-character description limit, KDP's short list of allowed HTML tags, and contact details, emoji and review requests in descriptions. It's covered by 27 unit tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mechanical fixes are automatic, and every one is disclosed.&lt;/strong&gt; If Gemma leaves bare paragraphs (Amazon collapses newlines), forgets to close a &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;, or writes "colouring" in a keyword for Amazon.com (US shoppers type "coloring"), ShelfReady fixes it and adds an "auto-fixed" line saying exactly what changed. Judgement calls are never auto-fixed. They're flagged for you to decide.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One targeted repair pass.&lt;/strong&gt; If blocking errors remain, the exact error messages go back to Gemma for a single revision. That's cheaper and more reliable than regenerating from scratch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming UX.&lt;/strong&gt; The server streams progress as NDJSON, so the interface shows a real progress bar and character count instead of a frozen spinner, and Cancel stops the model on the server instead of just hiding the spinner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe rendering.&lt;/strong&gt; The description preview is rebuilt node by node, keeping only KDP's allowed tags and no attributes, so model output can't inject anything into the page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a designer, I held the interface to the same standard as my books. It has a warm paper palette, one deep forest accent, a serif for the moments that should feel editorial, and nothing on screen that doesn't help you ship a listing.&lt;/p&gt;

&lt;p&gt;Full disclosure: this was built with heavy AI assistance. An AI coding agent wrote the code and drafted this write-up, working to a brief built around how my KDP business actually runs. The rules philosophy and the design standard are the ones I hold my own books to. That feels like the honest way to build in 2026, and it's exactly the leverage this challenge is about.&lt;/p&gt;

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

&lt;p&gt;For this product, open weights aren't a philosophy. They're what make the business viable.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The unit economics work.&lt;/strong&gt; A listing tool lives on volume. Publishers regenerate, tweak and regenerate again. With a hosted API, every click is a cost I'd have to pass on or absorb. With Gemma on the user's own machine, the marginal cost of a listing is zero, so a small one-time price works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unreleased books stay private.&lt;/strong&gt; A publisher's upcoming catalogue is competitive information. ShelfReady binds to localhost and sends the brief nowhere. There's no account, no API key and no third-party log of what you're launching next quarter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No platform risk.&lt;/strong&gt; Hosted APIs change prices, deprecate models and adjust behaviour without notice. ShelfReady runs on a model file I can keep, so the listing that worked in October still works in March.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I can tune the stack to the niche.&lt;/strong&gt; Swapping models is one environment variable (&lt;code&gt;SHELFREADY_MODEL=gemma3:12b&lt;/code&gt;). Open weights also leave room for the obvious next step: fine-tuning a small Gemma on KDP-compliant colouring-book listings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The trade-off is honest too: on a CPU-only machine a listing takes around 40 seconds instead of a few. For a task you do once per book, I'll take private, free and permanent over instant.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Best Use of Gemma.&lt;/strong&gt; Gemma 3 4B, running locally via Ollama, is the engine of the product. It writes every listing and performs the repair pass, and it's constrained by Ollama structured outputs and a deterministic KDP rules engine.&lt;/p&gt;

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