Metadata-Version: 2.4
Name: gcp-radar
Version: 0.1.3
Summary: GCP resource inventory scanner and draw.io architecture diagram generator
Author-email: Mor Michaeli <you@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yourname/gcp-radar
Project-URL: Repository, https://github.com/yourname/gcp-radar
Project-URL: Issues, https://github.com/yourname/gcp-radar/issues
Keywords: gcp,google-cloud,inventory,architecture,drawio,diagrams
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: google-cloud-compute>=1.14.0
Requires-Dist: google-cloud-functions>=1.5.0
Requires-Dist: google-cloud-container>=2.35.0
Requires-Dist: google-cloud-storage>=2.14.0
Requires-Dist: google-cloud-run>=0.10.0
Requires-Dist: google-cloud-firestore>=2.14.0
Requires-Dist: google-cloud-pubsub>=2.20.0
Requires-Dist: google-cloud-monitoring>=2.17.0
Requires-Dist: google-api-python-client>=2.100.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# GCP Radar

**GCP Resource Inventory Scanner & Architecture Diagram Generator**

A Python CLI tool that inventories all your GCP resources and generates beautiful draw.io architecture diagrams.

## Features

- 🔍 **Inventory Scanning**: Scans Compute Engine, Cloud SQL, Cloud Functions, GKE, Cloud Storage, Cloud Run, Firestore, Pub/Sub, and more
 - 🔍 **Inventory Scanning**: Scans Compute Engine, Cloud SQL, Cloud Functions, GKE, Cloud Storage, Cloud Run, Firestore, Pub/Sub, Vertex AI (Models, Endpoints, Featurestores), and more
- 📊 **CSV Export**: Export complete inventory to CSV for further analysis
- 🏗️ **Architecture Diagrams**: Auto-generate draw.io `.drawio` files with logical service connections
- ☁️ **Multi-Project Support**: Scan multiple GCP projects in one go
- 🔐 **Service Account Auth**: Use gcloud default credentials or specify service account key

## Installation

```bash
pip install gcp-radar
```

Or from source:

```bash
git clone https://github.com/yourname/gcp-radar.git
cd gcp-radar
pip install -e .
```

## Quick Start

### 1. Inventory Your GCP Resources

```bash
# Scan default project
gcp-radar inventory --export inventory.csv

# Scan specific project
gcp-radar inventory --project my-project --export inventory.csv

# Export to specific region
gcp-radar inventory --region us-central1 --export inventory.csv
```

### 2. Generate Architecture Diagram

```bash
gcp-radar diagram --input inventory.csv --output architecture.drawio

# Then open architecture.drawio in app.diagrams.net or the desktop app
```

### 3. One-Shot: Scan + Diagram

```bash
gcp-radar run --project my-project \
  --output-csv inventory.csv \
  --output-diagram architecture.drawio
```

## Supported GCP Services

| Service | Collected | Diagram |
|---------|-----------|---------|
| Compute Engine | ✓ | ✓ |
| Cloud SQL | ✓ | ✓ |
| Cloud Functions | ✓ | ✓ |
| GKE (Kubernetes Engine) | ✓ | ✓ |
| Cloud Storage | ✓ | ✓ |
| Cloud Run | ✓ | ✓ |
| Firestore | ✓ | ✓ |
| Pub/Sub | ✓ | ✓ |
| Vertex AI (Models) | ✓ | ✓ |
| Vertex AI (Endpoints) | ✓ | ✓ |
| Vertex AI (Featurestore) | ✓ | ✓ |

## Requirements

- Python 3.9+
- GCP credentials (via `gcloud auth` or service account key)
- Permissions: `compute:Read`, `sql:Read`, `container:Read`, `storage:Read`, `pubsub:Read`, `firestore:Read`, etc.

## Output Format

### CSV Inventory

| ProjectID | Service | Name | ID | Type/Size | Status | Region | Extra |
|-----------|---------|------|----|-----------|---------|---------|----|
| my-project | Compute Engine | web-01 | abc123 | n1-standard-2 | RUNNING | us-central1 | ... |

### Architecture Diagram

Auto-generated `.drawio` file with:
- **Swim lanes** by service category (Compute, Database, Storage, Messaging)
- **Icons** for each resource
- **Logical connections** between services

## Configuration

Create a `.env` file to override defaults:

```bash
export GCP_PROJECT=my-project
export GCP_REGION=us-central1
```

Or pass flags:

```bash
gcp-radar inventory --project my-project --region us-central1
```

## License

MIT

## Contributing

Pull requests welcome! Please open an issue first to discuss changes.

## Support

GitHub Issues: https://github.com/yourname/gcp-radar/issues
