{"id":16553005,"url":"https://github.com/stangirard/pricy","last_synced_at":"2025-03-16T20:30:20.320Z","repository":{"id":50225602,"uuid":"518601026","full_name":"StanGirard/pricy","owner":"StanGirard","description":"Export Costs to CSV, HTML, GSheets, Prometheus for AWS \u0026 Azure","archived":false,"fork":false,"pushed_at":"2025-03-14T02:39:12.000Z","size":2865,"stargazers_count":28,"open_issues_count":11,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T03:28:41.792Z","etag":null,"topics":["aws","azure","cost","cost-explorer","cost-management","finops","gsheets","html","prometheus","prometheus-exporter","reports"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/stangirard/pricy","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StanGirard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-27T20:21:31.000Z","updated_at":"2024-12-06T07:38:23.000Z","dependencies_parsed_at":"2023-07-14T06:17:30.207Z","dependency_job_id":"5d973950-8b40-4d46-b865-e98001a0ec34","html_url":"https://github.com/StanGirard/pricy","commit_stats":{"total_commits":99,"total_committers":3,"mean_commits":33.0,"dds":0.09090909090909094,"last_synced_commit":"c3f1aaeaa544394a15399bc853c9ee04db1411db"},"previous_names":["stangirard/pricy-aws-azure-cost-report"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fpricy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fpricy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fpricy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanGirard%2Fpricy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StanGirard","download_url":"https://codeload.github.com/StanGirard/pricy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826798,"owners_count":20354221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","azure","cost","cost-explorer","cost-management","finops","gsheets","html","prometheus","prometheus-exporter","reports"],"created_at":"2024-10-11T19:46:45.809Z","updated_at":"2025-03-16T20:30:19.826Z","avatar_url":"https://github.com/StanGirard.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pricy\n[![Go Report Card](https://goreportcard.com/badge/github.com/stangirard/pricy)](https://goreportcard.com/report/github.com/stangirard/pricy) [![codecov](https://codecov.io/gh/StanGirard/pricy/branch/main/graph/badge.svg?token=YYBBL7JVCR)](https://codecov.io/gh/StanGirard/pricy)\n\n## Install\n\n```bash\nbrew tap stangirard/tap\nbrew install pricy\n```\n\n## Run\n\n```bash\npricy\n```\n\nIf you are using sso for credentials on aws\n\n```bash\npricy --sso\n```\n\n## Usage\n\n### Cloud Providers\n\nThese are the flags required for enabling a cloud provider\n- `--aws` - Enable AWS\n  - `--sso`: Use sso for credentials for `aws`\n- `--azure` - Enable Azure\n  - `subscription`: Azure subscription id you want the report to be generated for\n\n### Flags for configuration\n\nThere are a couple of parameters that you can use\n- `--details`: Show the details of the report with the pricing by service\n- `--csv`: Output the report as csv to `reports.csv`\n- `--evolution`: Show the evolution of the report as `evolution.csv`\n- `--days`: Number of days to look back for\n- `--interval`: Date Interval on which the report is generated (Default last 14 days) (Format: YYYY-MM-DD:YYYY-MM-DD)\n- `--granularity`: Granularity of the report, can be `daily`,  `monthly`\n- `--html`: Output the report as html to `pricy.html`\n- `--prometheus`: Outputs as prometheus metrics on `http://localhost:2112/metrics` that can be scraped by prometheus\n- `--gsheets`: Outputs the report to a google sheets spreadsheet\n\n## Example\n\n### Generate a Google Spreadsheet\n\n\nYou need to export the variable `GOOGLE_APPLICATION_CREDENTIALS` to the path of your json file which contains your OAuth2 credentials.\nIn oder to get the credentials, you follow this guide:\n- [Google Cloud Platform](https://developers.google.com/sheets/api/quickstart/go)\n- Activate Sheets API\n- Create a credentials for Oauth2 for Desktop Application\n\n\n```bash\nexport GOOGLE_APPLICATION_CREDENTIALS=\"/path/to/credentials.json\"\n```\n\n```bash\npricy --aws --sso --csv --gsheet --days 30\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/gsheets.gif\" alt=\"gsheets\" width=\"80%\"\u003e\n\u003cp align=\"center\"\u003e\n\n### HTML Report Generation \n\n```bash\npricy --aws --sso --days 150 --granularity monthly --html\n```\n\nGenerates a report for the price starting a 150 days ago\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/html-report.png\" alt=\"html-report\" width=\"40%\"\u003e\n\u003cp align=\"center\"\u003e\n\n\n### Prometheus Metrics\n\n```bash\npricy --aws --sso --prometheus  \n```\n\nGenerates the prometheus metrics for the price updating every 8 hours\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/prometheus.png\" alt=\"prometheus\" width=\"40%\"\u003e\n\u003cp align=\"center\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstangirard%2Fpricy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstangirard%2Fpricy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstangirard%2Fpricy/lists"}