A CLI tool for extracting AWS metrics and managing resources
Project description
AWS Vibe Guru ๐ง
A command-line interface (CLI) tool for extracting AWS metrics and managing cloud resources. Initially focused on Amazon SQS queue monitoring.
๐ Features
๐ SQS Monitoring & Analysis
- Queue Management: List and filter SQS queues
- Attribute Analysis: Get comprehensive queue attributes
- Message Volume Tracking: Monitor message volume with beautiful ASCII charts
- Age Monitoring: Track oldest message age over time
- Advanced Analytics: Statistical analysis with mean, median, and percentage comparisons
- Multi-Queue Support: Analyze multiple queues simultaneously
๐จ Visual Enhancements
- Rich Terminal Output: Beautiful colors, panels, and formatting
- ASCII Charts: Dynamic bar charts for data visualization
- Day-of-Week Indicators:
[Mon] 2024-01-01: 1,200 messages - Formatted Numbers: Thousands separators for readability
- Color-coded Output: Consistent color scheme throughout
๐ ๏ธ Development Features
- Pre-commit Hooks: Automated code quality checks
- Comprehensive Testing: Full test suite with AWS mocking
- Modern Tooling: UV package manager, Ruff linting/formatting
- Type Safety: Complete type annotations
- Documentation: Detailed help and usage examples
๐ Requirements
- Python 3.8.1 or higher
- UV package manager (recommended)
- AWS credentials configured (either in
~/.aws/credentialsor environment variables)
๐ ๏ธ Installation
Using UV (Recommended)
# Install UV if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone the repository
git clone https://github.com/daniellbastos/aws-vibe-guru.git
cd aws-vibe-guru
# Install dependencies
uv sync
๐ Usage
๐ Available Commands
# List SQS queues
aws-vibe-guru sqs-list-queues
aws-vibe-guru sqs-list-queues --name "prod-"
# Get queue attributes
aws-vibe-guru sqs-get-attributes "my-queue"
# Get message volume metrics (with ASCII chart)
aws-vibe-guru sqs-get-metrics "my-queue"
aws-vibe-guru sqs-get-metrics "my-queue" --days 30
# Get oldest message age
aws-vibe-guru sqs-get-oldest-message "my-queue"
aws-vibe-guru sqs-get-oldest-message "my-queue" --days 14
# Advanced volume analysis
aws-vibe-guru sqs-analyze-volume "my-queue"
aws-vibe-guru sqs-analyze-volume "queue1" "queue2" "queue3"
aws-vibe-guru sqs-analyze-volume "my-queue" --days 60
๐ Example Output
Queue: my-queue
โโโโโโโ
Total messages received: 15,420
Daily breakdown:
[Mon] 2024-01-01: 1,200 messages
[Tue] 2024-01-02: 1,350 messages
[Wed] 2024-01-03: 1,800 messages
Message Volume Chart:
1,800 โฌ โ
1,440 โค โ
1,080 โค โ โ
720 โค โ โ
360 โค โ โ
0 โด โ โ
01-01 01-02 01-03
Volume Analysis:
โข Peak Volume Day:
- Date: 2024-01-03
- Volume: 1,800 messages
โข Comparison with Mean:
- Mean Volume: 1,450 messages
- Percentage Above Mean: 24.1%
AWS Credentials
The tool supports two ways to provide AWS credentials:
-
AWS Credentials File (
~/.aws/credentials):[default] aws_access_key_id = your_access_key aws_secret_access_key = your_secret_key region = us-east-1
-
Environment Variables:
export AWS_ACCESS_KEY_ID="your_access_key" export AWS_SECRET_ACCESS_KEY="your_secret_key" export AWS_DEFAULT_REGION="us-east-1"
Project Structure
aws-vibe-guru/
โโโ src/aws_vibe_guru/
โ โโโ __init__.py # Version and author information
โ โโโ cli.py # Main CLI with all commands
โ โโโ cli_helpers.py # Helpers for Rich formatting
โ โโโ aws_sqs.py # AWS SQS functions and metrics
โโโ tests/
โ โโโ __init__.py
โโโ Makefile # Development commands
โโโ pyproject.toml # Project configuration
โโโ README.md # This file
๐ ๏ธ Development
๐ ๏ธ Development
Quick Start
# Clone and setup
git clone https://github.com/daniellbastos/aws-vibe-guru.git
cd aws-vibe-guru
uv sync --extra dev
make pre-commit-install
# Check code quality
make quality
Development Commands
# Install dependencies
uv sync --extra dev
# Check code quality
make quality # Run linting and formatting
make lint # Check code with Ruff
make format # Format code with Ruff
# Install pre-commit hooks
make pre-commit-install
# Run pre-commit manually
make pre-commit-run
Code Quality
This project uses Ruff for linting and formatting, which is fast and modern:
# Check code quality
make lint # Run linter
make format # Format code
make quality # Run both lint and format
# Development helpers
make install-dev # Install dev dependencies
make clean # Clean cache files
๐ Documentation
- RELEASE_NOTES.md - Detailed release notes and features
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Technologies Used
- boto3 - AWS SDK for Python
- Typer - Framework for building CLIs
- Rich - Rich text and beautiful formatting in the terminal
- UV - Fast Python package manager
- Ruff - Fast Python linter and formatter
๐ Links
Made with โค๏ธ as a vibe coding test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_vibe_guru-0.0.1.tar.gz.
File metadata
- Download URL: aws_vibe_guru-0.0.1.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
195dcfa9b3a3eba0706937b37ec6f073f5075cde13fd055059dfcf2fe0a503fc
|
|
| MD5 |
0a453c78aa49e56b64b4e0aca9d966e9
|
|
| BLAKE2b-256 |
9db7cda78230cff4e7e51f13e2ff1a1359f332ceef7ee570a67849575d665290
|
File details
Details for the file aws_vibe_guru-0.0.1-py3-none-any.whl.
File metadata
- Download URL: aws_vibe_guru-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11c16a50bb25e8105656ede3475dcf7a72615049cdfa6de2aaa3ffadebf63946
|
|
| MD5 |
d5c07c88ae4efc966d2796a9a9a78621
|
|
| BLAKE2b-256 |
91689ecc901e9a750812bdbcebd31f6013dbd58747ff2fdaf8909a16014ce4ea
|