<?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: Anish Agarwal</title>
    <description>The latest articles on DEV Community by Anish Agarwal (@anishaga).</description>
    <link>https://dev.to/anishaga</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%2F958867%2Fc009fbc8-8d72-4a7a-8a6c-0d50f41f54cf.png</url>
      <title>DEV Community: Anish Agarwal</title>
      <link>https://dev.to/anishaga</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anishaga"/>
    <language>en</language>
    <item>
      <title>The AI That Prints You a Walk, Then Tells You to Close the Laptop</title>
      <dc:creator>Anish Agarwal</dc:creator>
      <pubDate>Fri, 09 Oct 2026 18:50:27 +0000</pubDate>
      <link>https://dev.to/anishaga/the-ai-that-prints-you-a-walk-then-tells-you-to-close-the-laptop-4d6l</link>
      <guid>https://dev.to/anishaga/the-ai-that-prints-you-a-walk-then-tells-you-to-close-the-laptop-4d6l</guid>
      <description>&lt;p&gt;&lt;em&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;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Most "AI for the outdoors" apps want you to keep looking at your phone while you're outdoors. I wanted the opposite: an AI whose output is a piece of paper.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Touch Grass Field Cards&lt;/strong&gt; is a small command-line tool. You tell it where you're walking, for how long, who's coming and what mood you're in. A model running on your own machine writes a one-page A5 card: a mission, six things to look for, a listening exercise, a no-phone challenge and a "home by" time. You print it, put the phone in your pocket, and tick boxes with a pen.&lt;/p&gt;

&lt;p&gt;It's for anyone who sets out for a walk and ends up scrolling, and especially for families who need a reason to go past the end of the street.&lt;/p&gt;

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

&lt;p&gt;A sample card is in the repo at &lt;a href="https://github.com/anishaga/touchgrass/blob/main/examples/sample-card.html" rel="noopener noreferrer"&gt;&lt;code&gt;examples/sample-card.html&lt;/code&gt;&lt;/a&gt;. Run the tool with &lt;code&gt;--demo&lt;/code&gt; to generate one without a model.&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/anishaga" rel="noopener noreferrer"&gt;
        anishaga
      &lt;/a&gt; / &lt;a href="https://github.com/anishaga/touchgrass" rel="noopener noreferrer"&gt;
        touchgrass
      &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;Touch Grass Field Cards&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A local open-weight model writes you a one-page &lt;strong&gt;paper&lt;/strong&gt; walk card. You print it, pocket the phone, and go. The screen's whole job is the 30 seconds before you leave.&lt;/p&gt;
&lt;p&gt;Built for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05" rel="nofollow"&gt;Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Open &lt;a href="https://github.com/anishaga/touchgrass/examples/sample-card.html" rel="noopener noreferrer"&gt;&lt;code&gt;examples/sample-card.html&lt;/code&gt;&lt;/a&gt; to see a card (generated with &lt;code&gt;--demo&lt;/code&gt;, so no model wrote it).&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Quickstart&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Needs Python 3.8+ (standard library only) and &lt;a href="https://ollama.com" rel="nofollow noopener noreferrer"&gt;Ollama&lt;/a&gt; 0.5 or newer (for structured outputs).&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;ollama pull gemma3:1b
python touchgrass.py --lat 40.66 --lon -73.97 --minutes 60 --mood calm --with &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;two kids&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; --place &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;Prospect Park&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; open field-card.html, print it (A5 or half-letter), go outside&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--lat --lon&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;where you're walking (never sent anywhere but your own machine)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;--minutes&lt;/code&gt;, &lt;code&gt;--start&lt;/code&gt;, &lt;code&gt;--date&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;how long, when you leave, which day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;--mood&lt;/code&gt;, &lt;code&gt;--with&lt;/code&gt;, &lt;code&gt;--place&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;flavour for the prompts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--model&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;any model your local server&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/anishaga/touchgrass" 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;The design rule is &lt;strong&gt;facts from math, words from the model.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Facts are computed, not generated.&lt;/strong&gt; Sunrise, sunset, moon phase and season come from the NOAA solar equations, about 15 lines of standard-library Python that run offline. The "be home by" time is calculated in code too. A hallucinated sunset on a trail is a safety bug, so the model never gets to decide it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model supplies the voice.&lt;/strong&gt; I run Gemma 3 1B through Ollama and pass the facts in as ground truth. A 1B model can't be trusted to follow a format on its own, so Ollama's structured outputs enforce a JSON schema, and the result is still validated, clipped to sane lengths and retried up to three times if it's unusable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It prompts, it never identifies.&lt;/strong&gt; I deliberately don't ask a small local model "what is this plant?" or "is this safe?", because small models are confidently wrong. The prompt only lets it say notice, count, compare, listen and sketch. A word check in code also throws away any card that mentions eating, tasting or touching and asks again, so safety doesn't depend on a 1B model obeying a prompt. The printed card tells you not to touch or eat anything you can't identify yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paper is the interface.&lt;/strong&gt; Output is one self-contained HTML file with print CSS for A5, styled after trail blazes and park signage, so there's nothing to load at the trailhead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are no dependencies beyond Python and Ollama. I built it with Claude as my coding assistant.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A tiny model is enough.&lt;/strong&gt; Gemma 3 1B is small enough to run on an ordinary laptop with no GPU, which is the difference between a tool you can use anywhere and one that needs a data centre.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where you walk is a pattern of life.&lt;/strong&gt; Your coordinates plus the time you leave the house say a lot about you. With local inference, that never leaves your machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The card works with no signal.&lt;/strong&gt; Generate it at home, even in airplane mode. The product is paper, so the backcountry doesn't break it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swap the model, change the voice.&lt;/strong&gt; &lt;code&gt;--model&lt;/code&gt; takes anything Ollama serves, and the whole personality is one string in the repo. A birder edition or a kid edition is a fork away, which a closed API wouldn't let me fine-tune or inspect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs nothing per walk.&lt;/strong&gt; A family can print a card for every outing without thinking about metered tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The honest trade-off: a frontier model would probably write wittier prompts, and a 1B model will be plainer than a bigger one (&lt;code&gt;--model gemma3:4b&lt;/code&gt; is one flag away). I'll take a plainer card that works in a forest.&lt;/p&gt;

&lt;h2&gt;
  
  
  Field Test
&lt;/h2&gt;

&lt;p&gt;I generated the card for a walk around the neighborhood. I set the location coordinates for my local park and used &lt;code&gt;--minutes 45&lt;/code&gt;. The card printed smoothly on half-letter paper.&lt;br&gt;
During the walk, it was incredibly refreshing to keep the phone in my pocket. I actually managed to check off four out of the six prompts: "Something that changed since last week" (the leaves were noticeably more orange) and "A pattern that repeats" (brickwork on a path). I also did the listening exercise for a minute straight.&lt;/p&gt;

&lt;p&gt;The card took about 8-10 seconds to generate locally using Gemma 3 1B on my Windows machine. It was fast, coherent, and perfectly fulfilled the mission without ever feeling like an "AI feature".&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;: the cards are written by Gemma 3 1B running locally through Ollama.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>A dinner planner for my vegetarian friend that doesn't trust its own AI</title>
      <dc:creator>Anish Agarwal</dc:creator>
      <pubDate>Sun, 04 Oct 2026 13:24:11 +0000</pubDate>
      <link>https://dev.to/anishaga/a-dinner-planner-for-my-vegetarian-friend-that-doesnt-trust-its-own-ai-171p</link>
      <guid>https://dev.to/anishaga/a-dinner-planner-for-my-vegetarian-friend-that-doesnt-trust-its-own-ai-171p</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;My friend is vegetarian, so "what's for dinner?" always comes with a rule: no meat, no fish, and none of the hidden stuff either, like gelatin or Worcestershire sauce. I wanted a tool that looks at what is actually in their kitchen and suggests dinners that follow that rule every time.&lt;/p&gt;

&lt;p&gt;Safe Plate is a single-page meal planner. You enter who it's for, what they avoid, what they don't like, and what's in the kitchen. A small language model running on my own laptop suggests dinners.&lt;/p&gt;

&lt;p&gt;The part I care about is what happens next. A language model can slip a forbidden ingredient into a recipe while sounding completely sure of itself, so every suggestion goes through a second check written as plain code. Anything that matches the restriction list turns red and drops to the bottom of the page. Anything that doesn't gets a green "Passed the allergen check" label. The same tool works for allergies: type "peanut, dairy" instead of "vegetarian".&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1eOWewoFzLOop7ALnldLfwKRxO7wtp2QW/view?usp=sharing" rel="noopener noreferrer"&gt;Watch the demo video&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The video shows the form filled in for a vegetarian dinner and the results with their check labels. Everything runs locally, so there is no hosted link to click. The AI lives on my laptop.&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/anishaga" rel="noopener noreferrer"&gt;
        anishaga
      &lt;/a&gt; / &lt;a href="https://github.com/anishaga/safe-plate" rel="noopener noreferrer"&gt;
        safe-plate
      &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;Safe Plate&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;A dinner planner for one specific person. A local open-weight model suggests meals; plain code then checks every ingredient against that person's allergy list and flags anything that matches.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Run it&lt;/h2&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;a href="https://ollama.com" rel="nofollow noopener noreferrer"&gt;Ollama&lt;/a&gt;, then pull a model: &lt;code&gt;ollama pull gemma3:4b&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;In this folder, start a local server: &lt;code&gt;python3 -m http.server 8000&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;a href="http://localhost:8000" rel="nofollow noopener noreferrer"&gt;http://localhost:8000&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Opening &lt;code&gt;index.html&lt;/code&gt; straight from disk won't work, because Ollama blocks requests from file pages. If you prefer that, start Ollama with &lt;code&gt;OLLAMA_ORIGINS="*" ollama serve&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To use a different model, change the name under "Model settings". Everything runs on your machine, and settings are stored only in your browser.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Limits&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;The allergen check is a word list, not a medical tool. It errs toward flagging, so "almond flour" will be flagged for wheat. Always read labels.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/anishaga/safe-plate" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;The README has the run instructions.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; Gemma 3 1B, an open-weight model from Google, running through Ollama on a low-spec Windows laptop. It's an 815 MB download. The model name is a text field in the app, so any Ollama model works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App:&lt;/strong&gt; One HTML file with no framework and no build step. It calls Ollama's local chat endpoint and asks for the meals as JSON, with a schema to enforce the shape. If Ollama rejects the schema, it retries in plain JSON mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The check:&lt;/strong&gt; A word list that expands entries like "vegetarian", "dairy" or "nuts" into the ingredients they cover, then scans everything in a suggestion except the one-line blurb: title, ingredients and steps. It errs toward flagging, so "almond flour" trips a wheat restriction and "meatless" trips a meat one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy:&lt;/strong&gt; Settings are saved in the browser, and the only network request the page makes goes to the Ollama server on my own machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Help:&lt;/strong&gt; I wrote it with help from Claude, Anthropic's AI assistant, which also helped me debug it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Testing Showed
&lt;/h2&gt;

&lt;p&gt;A 1B model on a weak laptop shows you exactly where the weak spots are.&lt;/p&gt;

&lt;p&gt;It ignores formatting instructions. I asked for each step as a line of text. The model returned each step as a small object, and the page printed &lt;code&gt;[object Object]&lt;/code&gt; four times. In one run it crammed every ingredient onto one line. In another the ingredients came back without amounts.&lt;/p&gt;

&lt;p&gt;The bug that mattered was in my code, not the model. My first version only scanned the title and the ingredient list, and it read any value that wasn't plain text as the literal string "[object Object]". A banned ingredient hiding in the steps, or arriving in an unexpected shape, would have passed. I fixed that so the check flattens and scans the full text of every suggestion, whatever shape it takes. I also had the app ask Ollama to enforce a strict format, and made the page tolerant of messy output by splitting a block of steps into one per sentence and trimming stray commas.&lt;/p&gt;

&lt;p&gt;The recipes themselves were plain but sensible. From a pantry of rice, lentils, spinach, tomatoes, potatoes, onions and garlic, it suggested a lentil rice and a potato and lentil curry, and both correctly passed the vegetarian check.&lt;/p&gt;

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

&lt;p&gt;Dietary restrictions and allergies are health information, and I didn't want my friend's sent to a server neither of us controls. Because the model runs locally, the tool works with no internet connection and no account, and costs nothing per request. The model doing the work is an 815 MB download that runs on a laptop with weak specs.&lt;/p&gt;

&lt;p&gt;Open weights also make the model a swappable part. If a bigger model writes better recipes, I change one text field and nothing else moves. And because the safety check lives in my own code instead of a vendor's content filter, it behaves the same whichever model sits behind it, and it can't change under me when a hosted API updates.&lt;/p&gt;

&lt;p&gt;The honest trade-off is quality. A large hosted model would write better recipes than a 1B model on my laptop. For this job I accepted rougher recipes in exchange for privacy, zero cost and control, and I let plain code, not the model, have the final say on safety.&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; Safe Plate runs Gemma 3 1B locally through Ollama.&lt;/li&gt;
&lt;/ul&gt;

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