Skip to main content

FinOps CLI Toolkit for Azure

Project description

FinOps CLI Toolkit

This project provides a simple cross‑platform FinOps command line toolkit for Azure. The scripts simulate detection of cloud waste, budget checks and cost‑saving recommendations using local mock data. Output is styled with ANSI colours and Unicode tables similar to the screenshot referenced in the project description. The scripts simulate detection of cloud waste, budget checks and cost‑saving recommendations using local mock data. Output is styled with ANSI colours and Unicode tables similar to the screenshot referenced in the project description.

Quick start

Clone the repository and install the Python dependencies:

git clone https://github.com/cloudcwfranck/finazops.git
cd finazops
./install.sh

After the packages are installed you can run the toolkit just like the AWS version but targeting Azure.

Install from PyPI

The CLI can be installed as a package from PyPI:

pip install finazops
finazops --help

Scripts

  • detect-waste.sh / detect-waste.ps1 – find stopped Azure VMs, unassociated public IPs, and unattached managed disks and show estimated monthly waste.
  • check-budgets.sh / check-budgets.ps1 – check mock budgets for multiple subscriptions and indicate if they are under or over budget.
  • generate-recommendations.sh / generate-recommendations.ps1 – display recommendations based on detected waste.

The scripts rely only on Bash (for Linux/macOS) or PowerShell (for Windows). No cloud APIs or additional tools are required.

Run on GitHub

Run FinOps Toolkit

Execute the toolkit in a GitHub Actions runner using the run-app workflow. Click the badge above, choose Run workflow, and once the job completes open the run and view the output in the Summary tab directly in your browser.

Build and publish on GitHub

The publish workflow builds the Python package and uploads it to PyPI. Push a tag like v1.2.3 or trigger the workflow manually after configuring a PYPI_API_TOKEN secret in your repository settings.

Running on Replit or Linux/macOS

After cloning run ./install.sh once to set up Python packages. Then execute:

bash detect-waste.sh
bash check-budgets.sh
bash generate-recommendations.sh

Ensure the scripts have execute permissions:

chmod +x *.sh

Running on Windows PowerShell

In a PowerShell terminal run the installer once and then execute the scripts:

powershell -ExecutionPolicy Bypass -File install.ps1

Then run:

powershell -ExecutionPolicy Bypass -File detect-waste.ps1
powershell -ExecutionPolicy Bypass -File check-budgets.ps1
powershell -ExecutionPolicy Bypass -File generate-recommendations.ps1

These commands will output colorized tables summarizing waste, budgets, and recommended actions using mock data.

Python FinOps CLI

The finops_cli.py script adds enhanced features such as cost analysis by time period, cost trends, subscription management and export options. It uses the Rich library for a pleasant terminal UI. When installed from PyPI it is available as the finazops command.

Run ./install.sh (or install.ps1 on Windows) beforehand so the required Python packages are present.

Run the CLI with Python or the installed command:

finazops --help
# or
python3 finops_cli.py --help

Exports can be written to CSV, JSON or PDF with --report-type and saved to a custom directory using --dir.

Azure Authentication

azure_login.py launches an interactive browser window to sign into Azure and prints your available subscriptions. It requires the azure-identity and azure-mgmt-resource packages which are installed automatically in the GitHub Actions workflow or by running ./install.sh (or install.ps1 on Windows).

Run locally with:

python3 azure_login.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finazops-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finazops-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file finazops-0.1.0.tar.gz.

File metadata

  • Download URL: finazops-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for finazops-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ff7178480e607c563b94d20d2ac85fdf7c7aaf876c8e90e4e07e697dbd8a842
MD5 c3a056c0b6fe2aeb922354ed385646d5
BLAKE2b-256 7700a4c5be764b5cc5138f88d7de828d99bf5d6300976644fdb2817d8209625b

See more details on using hashes here.

Provenance

The following attestation bundles were made for finazops-0.1.0.tar.gz:

Publisher: publish.yml on cloudcwfranck/finazops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file finazops-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: finazops-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for finazops-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cae08a1040d80606dfca4fadd281a910a82e422317f113271498fac5c035f28e
MD5 361156490ffe3ca8cac2bf1c49a91d29
BLAKE2b-256 669bb74d469c02f911b04a84fc330ba381e90c22d24332b6607151fddfa246f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for finazops-0.1.0-py3-none-any.whl:

Publisher: publish.yml on cloudcwfranck/finazops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page