Automated, Developer-First Local Cloud Cost Tracing & Linting
Project description
FinOps-Guard ๐ฒ๐ก๏ธ
Automated, Developer-First Local Cloud Cost Tracing & Linting
FinOps-Guard acts as a "linter" for cloud costs and efficiency, running locally on developers' machines or within CI/CD pipelines. It bridges the gap between infrastructure configuration (Terraform) and application code efficiency (Python/JS/TS) to predict cost anomalies before they hit production.
๐ Key Features
- Static Cost Estimation: Parse Terraform configurations locally and map them against cached, offline pricing datasets (
pricing_db.json) to show the monthly dollar impact right in the terminal. No cloud API access or terraform credentials required! - Code-to-Cloud Tracing: Analyze application source code statically (using AST parsing for Python and token-based heuristics for JavaScript/TypeScript) to detect inefficient loops containing synchronous API calls or cloud SDK invocations.
- FinOps Commit Hooks: Interactively prompt developers during
git commitif changes exceed a cost threshold (e.g. $100/mo), preventing accidental expensive configurations from reaching staging or production.
๐บ๏ธ High-Level Launch Architecture
To bridge developer tools with commercial platforms, FinOps-Guard operates on a hybrid model:
- Free CLI / Hooks: Runs locally or in CI pipelines.
- SaaS / Self-Hosted Ingestion: Aggregates reports for dashboard visibility, billing reconciliation, and license-based policy enforcement.
๐ Project Structure
finopsguard/
โโโ finops_guard/
โ โโโ __init__.py
โ โโโ cli.py # CLI command orchestrator (lint, trace, hook)
โ โโโ iac_parser.py # Local HCL resource block and JSON plan parser
โ โโโ cost_estimator.py # Mapping resource metrics to pricing configurations
โ โโโ code_tracer.py # AST-based static analyzer for loop-bound API calls
โ โโโ pre_commit.py # Git hook integration logic
โ โโโ data/
โ โโโ pricing_db.json # Offline cache of AWS & GCP pricing rates
โโโ examples/
โ โโโ terraform/ # Sample IaC configs with expensive DB/compute resources
โ โโโ app/ # Sample application script with synchronous loops
โโโ tests/ # Comprehensive unit test suite
โ โโโ test_iac_parser.py
โ โโโ test_cost_estimator.py
โ โโโ test_code_tracer.py
โโโ pyproject.toml # Packaging file (setuptools metadata)
โโโ ROADMAP.md # Monetization strategies, extensions, and growth steps
๐ป Installation
Install the package in editable mode locally:
pip install -e .
๐ ๏ธ Usage
1. Estimating Infrastructure Costs (Linting)
Run the static cost estimator on a Terraform directory or a single .tf/plan.json file:
finops-guard lint examples/terraform
Output includes a detailed table of predicted monthly costs, service breakdowns, and annual projections.
2. Tracing Application Code (Code-to-Cloud Tracing)
Scan codebases for costly synchronous network calls or cloud API calls nested in loops:
finops-guard trace examples/app
Flags synchronous requests inside loop blocks with nesting details and code snippets.
3. Setting Up pre-commit Hooks
Add FinOps-Guard directly to your git pre-commit workflow. You can run the hook check manually:
finops-guard hook examples/terraform --threshold 100 --strict
To configure it as a Git pre-commit hook automatically:
- Create or edit
.git/hooks/pre-commitin your git repository. - Add the following line:
finops-guard hook . --threshold 100
- Make the hook executable:
chmod +x .git/hooks/pre-commit.
๐งช Testing
Run the automated test suite with Python's built-in unittest module:
python -m unittest discover -s tests
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 Distributions
Built Distributions
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 finops_guard-0.1.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 530.0 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb69f0e4718606627fcf9a66d34066371c41466b3a10a809f7ae977d37fff523
|
|
| MD5 |
53210aa2cf7f95f677df4ec47796aa9f
|
|
| BLAKE2b-256 |
dd99a282380e064ef020a4a5d6f366391ebc60ad16b8296d8aecaaa6e1c373df
|
File details
Details for the file finops_guard-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d70b88b3839daa5c368d0548522af9de1bc036013f8967cab85802d650d66360
|
|
| MD5 |
56a7b84d1f540e4b0b6890ae563656a0
|
|
| BLAKE2b-256 |
2c9ec518a2a4b42edb5a4b1d72bdb02a0d69721b02e0818d665ddbf22bd1c749
|
File details
Details for the file finops_guard-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32782e26858a709dc382427ee1fbc47bdee41203da7e56234b4c6ff328cb9060
|
|
| MD5 |
cb303ecc45c35eea27eb0b1bf2510b9f
|
|
| BLAKE2b-256 |
ee80a4d2dee60dac4d35ad0aec86cadc23f9e18e6b3b6146ea5f269abec8abfa
|
File details
Details for the file finops_guard-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 614.0 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62241274c47becdcb6e345dac56ccc0f54340705ffdc3efa004c75d46b940afe
|
|
| MD5 |
2f7b426517d4e86da8dad9a6a27d424f
|
|
| BLAKE2b-256 |
bacfdec3d222b059f724bb21001708d6dfec1ef0ddd539326dd0974215e46778
|
File details
Details for the file finops_guard-0.1.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 530.8 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e9d2ff3d786b8d3021a094091f851eb078ac30779e7c79170d50072ddb9827f
|
|
| MD5 |
893c467dcd7ac898b8fd8fddd7d82561
|
|
| BLAKE2b-256 |
b2628563bd4c49d29256541175f727006491b95c76152fdba3c527cd8350f0be
|
File details
Details for the file finops_guard-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f37f75d26272d0d26842d7d36fdc883a740d7312d474f1168ceac3aa08ca0e6
|
|
| MD5 |
890c47ffd7455d1e61edbe9afe244818
|
|
| BLAKE2b-256 |
e0a9355eefa15d9857548da455442b2a95d6762f68877775ca9370355f69a63b
|
File details
Details for the file finops_guard-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d8512b4587697176aa23788f100f98ebeb865e41a3f8ad52f976e65a41e6d59
|
|
| MD5 |
21e9221376df94f9b9482b2dc5860cfd
|
|
| BLAKE2b-256 |
b88516bbca2f86c2e405bc468309cf939ab183a0fd345cac29623346594e2f41
|
File details
Details for the file finops_guard-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 616.6 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e422027b2f1d40010e7328c64e93dab2e9fb23afb46151fd686699c380c4e486
|
|
| MD5 |
8e41002015e400752275db0f4fa6b70d
|
|
| BLAKE2b-256 |
f42eb310254e7f7d33a4b66457f51d0dc0434fdc31c8770895e04fbb330af5b7
|
File details
Details for the file finops_guard-0.1.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 538.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec914d35ca50c41e8e108ac1eecbdbadc27b44a00e0d07a9302e686d9a0a305f
|
|
| MD5 |
f6be99d1629852faa9baa355a69e64ce
|
|
| BLAKE2b-256 |
00a59429eb535f1341cccf88a1920d982e1f99376b62f376d75b9e58ead8b9ed
|
File details
Details for the file finops_guard-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cacb2fd98d548582831a0e3242b4146f3cf1bfcc2f69c50005fa46c0a4093795
|
|
| MD5 |
2cc603739c3a785d3639cc9318416f3b
|
|
| BLAKE2b-256 |
bda77882bbae5bb357656f154c00416552c029786441e3019acbb47b364cfafd
|
File details
Details for the file finops_guard-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
208f57f61c3ea7222469705f6dc5a085748cb791de8b5c6b686172654a12b6dd
|
|
| MD5 |
5a2ff1f76390ad076634f4dc3e0d8496
|
|
| BLAKE2b-256 |
a5d883740cd81fb8ea9e83281023a07d4f3308666b7f3781b0ff8155c056b067
|
File details
Details for the file finops_guard-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 608.6 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1edebd74d4eeeb59b24a21159d17038cdb62c1891fa60915472f48bcf8791524
|
|
| MD5 |
3ae9d8c13ac31b8d06ea5f2ff31fda4d
|
|
| BLAKE2b-256 |
a4173ac255d592fc382e42b03cdbde6c10daed2499223ee1298a11c014765d8f
|
File details
Details for the file finops_guard-0.1.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 531.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3788d68e86bc43b25b730c48a34c6772051ec081c08f60061b16125590e4a5a
|
|
| MD5 |
7863e3c0fd93633c9b6784b42b02dc5c
|
|
| BLAKE2b-256 |
70333c374f0c713a82da0a8a0a7352119abce5320182d59e19ffddd0bb3d69d1
|
File details
Details for the file finops_guard-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f1422f58f9fe4e7018f53c3898ed690021d87e91fc17c48d336e5cb0da7a179
|
|
| MD5 |
abd6d79c1d025d1e89a5102f14d42660
|
|
| BLAKE2b-256 |
a6fee02e6e1bee00b9bd3e03ebd73c62c4824e7cb080574b213479772b86e067
|
File details
Details for the file finops_guard-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
499e9790af4c593fd31015d6803b66d9042b26864b8a437f71be067565982089
|
|
| MD5 |
db82844e65a741081d8693b5ba82dbe6
|
|
| BLAKE2b-256 |
17b75c14abec094c1a1dc5b4b6be436eec6dbd657657b2c1de7017d2b0e747d2
|
File details
Details for the file finops_guard-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 612.8 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88d10a33f981271b3e0eef40fc29dafed7072eee5d0aa9ccc9405f5dc5b69ad7
|
|
| MD5 |
971f0297d73d659592c19f8d6ed80645
|
|
| BLAKE2b-256 |
47ed823e5cc50b762dcc4e2e409a77bbc226417d751b9a45eb8a80d90f5d73d3
|
File details
Details for the file finops_guard-0.1.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 532.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d24a07eb7a4ed42556e0529225fb1ef4e741c8ac62126906121e23c50bec0084
|
|
| MD5 |
224fd46d91ee39fd0e8212a1dd5b60ea
|
|
| BLAKE2b-256 |
7434eb41cede094a3f4a0788a50b46ea8c26f71d5e4935bdcc62248a34e9615d
|
File details
Details for the file finops_guard-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d5dab31fb1cdd0f6151c4c01e8c7ecde5ad96cbe39f264db70c3fe5eab8001e
|
|
| MD5 |
3cdf882d451928ebccf18c16acde529a
|
|
| BLAKE2b-256 |
204085d2ba0550a6159ee1bd485193cd4400434134a2bc4135e307d21230cc56
|
File details
Details for the file finops_guard-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dac15b3c0d6c2f862f8d6c065d5d91ed869d542830fc37ba9edb01d4282dea0
|
|
| MD5 |
4fafcfc4083616953450d460adbe25d3
|
|
| BLAKE2b-256 |
91df1fe5315942f1a51088c0806e57c265376ed7b52738e8c5c43a67508973f4
|
File details
Details for the file finops_guard-0.1.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: finops_guard-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 618.4 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d3de0cc652a857ababa3da47b476b5980067cc9d6bcad43b7e04638e0a0c772
|
|
| MD5 |
358d40e536ac5431f093af954342327c
|
|
| BLAKE2b-256 |
31d2dcd82ed98c7851a18468ebca4accc4efdff919af35764f37053943d174fe
|