cd /news/computer-vision/git-grass-open-source-ai-terminal-de… · home › topics › computer-vision › article
[ARTICLE · art-146715] src=dev.to ↗ pub= topic=computer-vision verified=true sentiment=↑ positive

git-grass — Open-Source AI Terminal Detox & Proof-of-Nature Git Daemon

A developer built git-grass, an open-source Python CLI and Git pre-commit hook that locks commits after two hours of continuous coding until the user submits a photo proving they touched real grass. The tool runs a fully offline computer-vision pipeline on CPU in about 80 milliseconds, using Excess Green Index and VARI chlorophyll detection plus organic-texture entropy filters to reject IDE screenshots and dark-theme monitor images. It is built with Python 3, Click, Rich, Pillow, NumPy, and ONNX Runtime, and stores lockout state locally in ~/.git-grass/state.json.

by read2 min views1 publishedOct 7, 2026

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

git-grass is a developer wellness CLI and Git pre-commit daemon powered by on-device open-weight computer vision. It actively fights developer burnout by monitoring active screen time and locking Git commits until you physically step away from your desk, go outside, and provide photo proof that you touched real grass, lawn turf, or autumn foliage.

git commit / git push if you code continuously for over 2 hours without an outdoor break. Here is git-grass blocking a commit during a long coding session, and then unlocking immediately after verifying real grass:

bash
$ git commit -m "fix: typo in function"

 ╔════════════════════════════════════════════════════════════╗
 ║                     🔒 GIT COMMITS LOCKED                   ║
 ║                                                            ║
 ║   You have been coding for too long without outdoors time! ║
 ║   Git commits are d until you touch real grass.       ║
 ║                                                            ║
 ║   Run: git-grass verify <photo_of_grass.jpg>            ║
 ╚════════════════════════════════════════════════════════════╝

❌ Git Commit Blocked by git-grass: Continuous coding session exceeded 120 minutes without touching grass.

Code :
GitHub Repository: https://github.com/NICKSTER0506/git_grass

Repository Architecture:
git_grass/detector.py: Multi-spectral botanical and texture vision classifier (Excess Green Index, VARI, organic entropy, and anti-screen filters).
git_grass/hook.py: Git pre-commit hook injector and validator.
git_grass/cli.py: Rich terminal interface and commands (status, verify, lock, hook, demo).
git_grass/state.py: Local streak and lockout state manager (~/.git-grass/state.json).

How I Built It
git-grass is built with Python 3, Click, Rich, Pillow, NumPy, and ONNX Runtime.

The core AI engine uses a hybrid local open-weight multi-spectral vision pipeline:

Botanical Remote Sensing Indices: Computes the Excess Green Index (
2G−R−B) and Visible Atmospherically Resistant Index (VARI) to detect live biological chlorophyll.
Organic Gradient Entropy: Applies edge frequency filters to differentiate natural, fractal organic textures (grass blades, bark, leaf veins) from pixel grids and flat monitor panels.
Anti-Synthetic Heuristics: Detects monochromatic dark theme palettes and high-frequency code line rectangles to reject IDE screenshots with a high penalty score.
Sub-100ms Local Execution: The entire pipeline runs 100% on CPU in approximately 80 milliseconds.

Why Does Open Innovation Matter?
Open innovation is the core reason git-grass works:

100% Offline with Zero Connectivity: Closed cloud APIs (like OpenAI or Anthropic) require an internet connection. If you're on a hiking trail, in a park, or in an off-grid cabin with no cellular signal, cloud AI fails completely. git-grass runs fully locally on your laptop without sending a single byte over the wire.
Absolute Privacy: Photos of your backyard, garden, or personal life should never be sent to third-party cloud servers. Local open AI keeps all personal data strictly on your device.
Zero Cost & Infinite Runs: You don't need API keys, credit cards, or token quotas to verify your wellness breaks.
Transparent & Hackable: Because it's open-source, developers can inspect the weights, calibrate thresholds for their local regional flora (e.g. desert succulent vs. autumn deciduous trees), and contribute custom hooks.

Prize Categories
Hacktoberfest Open-Source AI Challenge: Touch Grass
── more in #computer-vision 4 stories · sorted by recency
── more on @git-grass 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/git-grass-open-sourc…] indexed:0 read:2min 2026-10-07 · —