This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
As developers, it's easy to get lost in a marathon coding session or frantically hit Ctrl+S while stuck on a frustrating bug. I built Code-Break, a Dart-based CLI agent that runs in the background, watches your local file saves, and forcefully intervenes when you've been staring at the screen for too long.
Here is how it gets you off the screen and into the real world:
- Smart Activity Monitoring: The CLI tracks your saves. If you hit a continuous coding marathon limit or a "frantic saving" threshold, it pauses your workflow.
-
AI Intervention (Groq): It pings the blazing-fast
mixtral-8x7b-320kmodel via Groq API to generate a short, witty, and personalized command to step away from the keyboard and go outside. - Voice Command (ElevenLabs): It uses ElevenLabs Text-to-Speech to literally speak the command out loud, ensuring you can't just ignore a terminal message.
- Nature Validation: When you return, the terminal asks: "What unique thing did you see outside?" Groq AI validates your response using strict JSON formatting. If you try to cheat, it rejects it.
-
Rewarding the Habit (GitHub Streak): If your observation is valid, the CLI uses the GitHub REST API to automatically push a commit to your Profile README, updating your
Touch Grass ๐ฑ Streakcounter.
Demo
Code
You can check out the full source code and documentation here:
shan2003034/code_break
How I Built It
I built this CLI tool using Dart. For the AI brain, I utilized Mixtral 8x7B (mixtral-8x7b-320k), a powerful open-weight model, running on Groq's ultra-fast inference engine.
The project is built around the AI acting in two completely different roles: a creative generator and a strict logical validator. First, it generates a witty, contextual prompt to tell the user to go outside. Then, when the user returns and types what they saw (e.g., "I saw a blue bird sitting on a mango tree"), I leveraged Mixtral's strong instruction-following capabilities to force the output into a strict JSON format ({"valid": true, "reason": "..."}). This allowed the CLI to programmatically evaluate the user's real-world observation before making a successful API call to update their GitHub streak.
Why Does Open Innovation Matter?
Open innovation was the exact reason this project succeeded because it gave me the freedom to experiment and pivot without friction.
I initially started building this agent using Google's Gemma running locally via Ollama. However, as the project evolved, I realized I needed a faster, lighter approach for the final CLI. Because I was working with open-weight models, I was able to seamlessly swap out the local model for Mixtral 8x7B hosted on Groq without having to rewrite my entire application logic. Open innovation ensures that developers aren't locked into a single closed, proprietary ecosystemโwe have the ultimate flexibility to choose the models, inference engines, and deployment methods that best fit our specific needs.
My Agent Session
While I did not use DevRelay to record a session, the core "agent" logic is entirely embedded within my open-source Dart CLI. You can view the exact conversational flow, JSON structure enforcement, and prompt validation logic directly in the repository's source code (specifically within the groq_service.dart file).
Prize Categories
- Best Use of ElevenLabs: I integrated the ElevenLabs API to give my open-source CLI agent a voice. Instead of just printing a static terminal message, the agent actively speaks the "Touch Grass" command out loud to ensure the developer can't ignore it and actually steps away from their screen.
Note: This is a solo submission by @shan2003034


Top comments (2)
Hi everyone! ๐ Here is my solo submission for Week 1: Code-Break ๐ฑ
It's a Dart-based CLI agent that runs in the background and forces you to take physical breaks when you code for too long or frantically hit save on a bug. It uses the Groq API (Mixtral 8x7B) to generate witty interventions and strictly validate your real-world outdoor observations via JSON, plus ElevenLabs to actually speak the commands out loud so you can't ignore the terminal!
You can check out the full post, demo, and source code here:
dev.to/lakshan2003034/code-break-a...
Happy Hacktoberfest! ๐
Official Platform Update
Security protocols have been updated for all developer accounts.