{"slug": "slothops-finding-the-cloud-vms-i-was-too-lazy-to-turn-off", "title": "SlothOps: Finding the Cloud VMs I Was Too Lazy to Turn Off", "summary": "A developer built SlothOps, an open-source Rust CLI that audits Google Cloud compute instances across regions and uses a local Gemma 2 (2B) model via Ollama to flag idle VMs and print ready-to-run gcloud stop commands. The tool runs entirely on the user's machine with no inference API costs, falling back to a bundled instances.json snapshot when live gcloud access is unavailable, and ships under the MIT License with Terraform IAM policy and a TypeScript formatting script.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19)*\n\nEvery cloud engineer knows the dread of opening a monthly invoice and spotting an `n1-standard-4` instance that has been running silently for weeks. You spun it up on a Friday afternoon to test something, promised yourself you'd turn it off before leaving, and closed your laptop instead.\n\nStopping it should be easy, but the friction gets in the way:\n\n`us-central1` or `europe-west3`.\n**SlothOps** is built to reward pure developer laziness. It's a local cloud auditor that turns multi-region cleanup into a single terminal command. It lists your compute instances, passes the inventory to a local **Gemma 2 (2B)** open-weight model, and hands you the exact `gcloud` command to shut the waste down.\n\nNo console hopping, no forgotten test boxes, and no metered API charges.\n\nSlothOps running inside Google Cloud Shell, auditing a sample idle-instance snapshot:\n\n*Running in offline mode against the bundled `instances.json` snapshot.*\n\n**A lazy-friendly GCP cost auditor that finds the VMs you forgot to turn off.**\n\nIf you spin up test VMs, sandbox boxes or throwaway Redis nodes on Google Cloud and then forget about them, you know the pain: clicking through every region in the console just to check what's idle. SlothOps does that in one command. It lists your compute instances, hands the metadata to a **local Gemma 2 (2B)** model, and prints a verdict along with ready-to-run `gcloud` commands to shut the waste down.\n\nEverything runs on your machine. No inference API, no extra bill.\n\n*SlothOps running in Google Cloud Shell in offline mode, auditing the sample instances.json snapshot.*\n\n```\n              +---------------------+\n              |    SlothOps CLI     |\n              |       (Rust)        |\n              +----------+----------+\n                         |\n          +--------------+--------------+\n          |                             |\n     Live mode                    Fallback mode\n gcloud compute instances     read local instances.json\n   list --format=json                   |\n          |                             |\n          +--------------+--------------+\n                         |\n                         v\n              +---------------------+\n              |\n```\n\n…\nOpen source under the MIT License. The repo has the Rust CLI, the Terraform IAM policy, the TypeScript formatting script, and the fallback dataset.\n\nI wanted low friction, predictable behavior, and nothing that can wreck your cloud account.\n\n```\n       +------------------------------------+\n       |          SlothOps CLI              |\n       +-----------------+------------------+\n                         |\n           +-------------+-------------+\n           |                           |\n     [Live Mode]                [Fallback Mode]\ngcloud compute instances        Read instances.json\n   list --format=json                 snapshot\n           |                           |\n           +-------------+-------------+\n                         |\n                         v\n       +------------------------------------+\n       |   Ollama Local Inference Engine    |\n       |       Model: Gemma 2 (2B)          |\n       +-----------------+------------------+\n                         |\n                         v\n       +------------------------------------+\n       | Terminal Audit Verdict             |\n       | - Flags zero-utilization instances |\n       | - Computes estimated spend         |\n       | - Prints exact `gcloud stop` flags |\n       +------------------------------------+\n```\n\n| Component | Technology | What it does | \n|---|---|---|\n| **CLI core** | Rust ( `tokio` ,`reqwest` ,`serde` ,`colored` ) | Native binary in `src/main.rs` with sub-second startup and a small memory footprint. | \n| **Local AI** | Gemma 2 (2B) via Ollama | Reads the instance metadata, flags idle ones, and extracts the affected names. Nothing leaves your machine. | \n| **IaC** | Terraform / HCL ( `terraform/main.tf` ) | Creates a service account limited strictly to `roles/compute.viewer` . | \n| **Scripts** | TypeScript ( `scripts/summary.ts` ) | Structured audit output formatting and JSON summaries. | \n\nTools that delete cloud resources on their own are risky. SlothOps never executes anything. It isolates the waste, estimates the monthly burn, and prints the exact `gcloud` command for you to review and run yourself. You stay in control of your cloud state, and the read-only service account backs that up at the permission level.\n\n`gcloud` is authenticated, it runs `gcloud compute instances list --format=json` against your active project.`instances.json` with built-in evaluation logic, so testing never stalls.\nGemma 2 (2B) is a small model and can misjudge an instance, so always read the suggested commands before running them. SlothOps currently covers Compute Engine VMs only, not every GCP resource type.\n\nInstead of logging in through SSO, opening a pile of console tabs and cross-checking charts region by region, you run one command and get the line you need to stop the billing burn. It turns a chore you keep avoiding into something you can do before locking your screen.", "url": "https://wpnews.pro/news/slothops-finding-the-cloud-vms-i-was-too-lazy-to-turn-off", "canonical_source": "https://dev.to/razorbillworks/slothops-finding-the-cloud-vms-i-was-too-lazy-to-turn-off-ecj", "published_at": "2026-10-25 10:03:09+00:00", "updated_at": "2026-10-25 10:13:54.545886+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "ai-infrastructure", "large-language-models"], "entities": ["SlothOps", "Google Cloud", "Gemma 2", "Ollama", "Rust", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/slothops-finding-the-cloud-vms-i-was-too-lazy-to-turn-off", "markdown": "https://wpnews.pro/news/slothops-finding-the-cloud-vms-i-was-too-lazy-to-turn-off.md", "text": "https://wpnews.pro/news/slothops-finding-the-cloud-vms-i-was-too-lazy-to-turn-off.txt", "jsonld": "https://wpnews.pro/news/slothops-finding-the-cloud-vms-i-was-too-lazy-to-turn-off.jsonld"}}