Metadata-Version: 2.4
Name: asg-scaling-manager
Version: 0.1.0
Summary: CLI library to manage AWS ASG desired/min/max capacity by tag filters
Author: Grzegorz K
License-Expression: MIT
Project-URL: Homepage, https://github.com/grzes-94/asg-scaling-manage
Project-URL: Repository, https://github.com/grzes-94/asg-scaling-manage
Project-URL: Issues, https://github.com/grzes-94/asg-scaling-manage/issues
Keywords: aws,autoscaling,asg,cli,eks
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
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: boto3>=1.34
Requires-Dist: typer>=0.12
Requires-Dist: pydantic>=2.7
Requires-Dist: structlog>=24.1
Dynamic: license-file

# ASG Scaling Manager

Manage AWS Auto Scaling Group capacities by tag filters with a simple, reliable CLI.

## Quick Install

```bash
pip install asg-scaling-manager
```

## Usage

```bash
# Get help
asg-sm --help

# Scale ASGs tagged with eks:cluster-name=my-cluster to 6 instances total
asg-sm --tag-value my-cluster --desired 6 --dry-run

# Apply changes with optional per-ASG max cap
asg-sm --tag-value my-cluster --desired 8 --max-size 5 --region eu-west-1

# Scale down to zero (sets min/max/desired to 0)
asg-sm --tag-value my-cluster --desired 0
```

## Features

- **Tag-based filtering**: Target ASGs by `eks:cluster-name` (default) or custom tags
- **Smart distribution**: Evenly distributes desired capacity across matched ASGs
- **Safety first**: Dry-run mode to preview changes
- **EKS optimized**: Defaults to `eks:cluster-name` tag for easy EKS cluster management
- **Flexible caps**: Optional per-ASG max size limits

## Examples

```bash
# Preview scaling for production cluster
asg-sm --tag-value prod-cluster --desired 12 --dry-run

# Scale with name filter and custom tag
asg-sm --tag-key team --tag-value payments --name-contains web --desired 4

# Emergency scale down
asg-sm --tag-value staging --desired 0
```

## Notes

- **Default tag**: Uses `eks:cluster-name` by default (perfect for EKS clusters)
- **Desired vs max-size**: `--desired` is total across all ASGs, `--max-size` is per-ASG cap
- **AWS auth**: Uses `--profile` and/or `--region` for AWS credentials
- **Dry-run**: Always test with `--dry-run` first

## Alternative Installation

```bash
# Isolated install (recommended for CLIs)
pipx install asg-scaling-manager

# Development install
git clone https://github.com/grzes-94/asg-scaling-manage
cd asg-scaling-manage
pip install -e .
```
