feat: initial commit - GCP project cleaner CLI

This commit is contained in:
2025-12-23 17:48:13 -05:00
commit 34941f3cf9
6 changed files with 1169 additions and 0 deletions

33
README.md Normal file
View File

@@ -0,0 +1,33 @@
# GCP Project Cleaner
A simple CLI tool to bulk delete GCP projects.
## Prerequisites
- [Node.js](https://nodejs.org/) (v18 or higher)
- [pnpm](https://pnpm.io/)
- [Google Cloud SDK (gcloud)](https://cloud.google.com/sdk/docs/install) authenticated with `gcloud auth login`.
## Usage
1. Install dependencies:
```bash
pnpm install
```
2. Run the script:
```bash
pnpm start
```
## Features
- **Authentication Check**: Verifies if you are authenticated with `gcloud`.
- **Interactive Selection**: Choose multiple projects to delete using an interactive checkbox list.
- **Project Age Highlighting**: Projects are color-coded based on their age (Green: <30 days, Yellow: >30 days, Red: >1 year).
- **Safe Confirmation**: Requires explicit confirmation before any deletion occurs.
- **Bulk Execution**: Deletes selected projects sequentially and logs the status.
## Note on Deletion
GCP projects are usually "scheduled for deletion" and remain in a "Pending Deletion" state for 30 days before being permanently removed. You can restore them within this period if needed.