DEV Community

Cover image for DeskDetox 🌿: An Open-Source CLI Agent That Forces You Away From Your Keyboard
Suraj Dhawal
Suraj Dhawal

Posted on

DeskDetox 🌿: An Open-Source CLI Agent That Forces You Away From Your Keyboard

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

When I saw the "Touch Grass" theme, it hit me: almost every "outdoor" or "break" app on the market has a fatal flaw—you are still staring at a screen. Hiking apps, run trackers, and meditation guides keep our heads bowed and our thumbs scrolling.

I wanted to build an agent that actively fights screen time. Meet DeskDetox—a local CLI tool built with the new open-source google.antigravity Python SDK. You tell it how much time you have, and it generates a hyper-local, weather-aware outdoor micro-adventure so you can leave your phone on your desk and actually experience the physical world.

Demo

Here is DeskDetox in action! I typed that I had 11 minutes for a quick break between PR reviews. The agent dynamically calculated my walking radius, checked the sky, and generated this mission:

DeskDetox CLI Demo

(I actually followed this mission. Leaving my phone on my desk and walking out the door empty-handed felt strange at first, but incredibly liberating!)

Code

The complete source code is available on GitHub. Because it is fully packaged, you can install it globally on your machine using pip!

GitHub Repository: Dev-Suraj-Dhawal/DeskDetox

How I Built It

I built the core harness using Python, leaning entirely into open-source agent frameworks and open data.

  1. The Framework: I utilized the Google Antigravity SDK. Its LocalAgentConfig handles the agentic loop, tool wiring, and async streaming effortlessly from the terminal.
  2. The Open Data Sensory Tools: The agent needs to sense my physical environment without a heavy mobile frontend. I gave it three custom Python tools:
    • A local IP-geocoder to find my coordinates without me typing them.
    • The open-source Open-Meteo API for real-time weather and daylight status.
    • The OpenStreetMap (OSM) Overpass API to locate the nearest parks, trails, or green spaces.
  3. The Brain: Powered by Gemini 1.5 Flash via the Google AI Studio, the agent contextualizes the weather, dynamically calculates how far I can physically walk based on my time limit, and spits out a 2-sentence mission.

Why Does Open Innovation Matter?

If this were a closed, proprietary mobile app, it would be a privacy nightmare. It would require background location tracking, push notifications, and harvesting my daily routines on a central server just to tell me to go outside.

Because DeskDetox uses an open-source agent harness running locally on my terminal:

  • Zero Tracking: My location data never leaves my laptop.
  • Open Data Ecosystem: Relying on OpenStreetMap and Open-Meteo means the app scales globally for free. We don't have to rely on walled-garden corporate map APIs that restrict access or charge fees.
  • Complete Agent Control: By using an open-source framework, I could explicitly write a "Dynamic Walking Radius" constraint into the prompt layer. I programmed the agent harness to know: "The user has exactly X minutes. They can only walk X/2 minutes away. Find OSM nodes strictly within this physical constraint."

It is an anti-app—it runs locally, gives you a mission, and then you close your laptop.

Prize Categories

  • Overall Winner

Top comments (1)

Collapse
 
suppdevbot profile image
DEV SUPPORTS •

Official Platform Update

Security protocols have been updated for all developer accounts.

  • tr.ee/dev-to