infra-cost 0.2.3 โ 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +325 -201
- package/bin/index.js +1 -1
- package/dist/demo/test-enhanced-ui.js +5 -9
- package/dist/demo/test-multi-cloud-dashboard.js +42 -53
- package/dist/index.js +24225 -7855
- package/package.json +93 -101
package/README.md
CHANGED
|
@@ -1,15 +1,66 @@
|
|
|
1
|
-
# infra-cost
|
|
1
|
+
# ๐ฐ infra-cost
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
**Multi-cloud FinOps CLI tool for comprehensive cost analysis and infrastructure optimization**
|
|
6
|
+
|
|
7
|
+
[](https://badge.fury.io/js/infra-cost)
|
|
8
|
+
[](https://npmjs.org/package/infra-cost)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
[](https://github.com/codecollab-co/infra-cost/issues)
|
|
11
|
+
[](https://github.com/codecollab-co/infra-cost/stargazers)
|
|
12
|
+
|
|
13
|
+
*Take control of your cloud costs across AWS, Google Cloud, Azure, Alibaba Cloud, and Oracle Cloud* ๐
|
|
14
|
+
|
|
15
|
+
[Installation](#-installation) โข [Quick Start](#-quick-start) โข [Features](#-features) โข [Documentation](#-documentation) โข [Contributing](#-contributing)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## ๐ฏ Why infra-cost?
|
|
22
|
+
|
|
23
|
+
**Save money. Optimize resources. Make informed decisions.**
|
|
24
|
+
|
|
25
|
+
- ๐ธ **Reduce cloud spend** by up to 30% with actionable insights
|
|
26
|
+
- ๐ **Multi-cloud visibility** - see costs across all your providers in one place
|
|
27
|
+
- โก **Real-time analysis** - get instant cost breakdowns and trends
|
|
28
|
+
- ๐ค **AI-powered recommendations** for optimization opportunities
|
|
29
|
+
- ๐ **Executive reports** - beautiful PDF reports for stakeholders
|
|
30
|
+
- ๐ **Smart alerting** - proactive cost anomaly detection
|
|
31
|
+
- ๐ฌ **Team collaboration** - Slack integration for cost awareness
|
|
4
32
|
|
|
5
33
|
## ๐ Features
|
|
6
34
|
|
|
7
|
-
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
35
|
+
### ๐ **Multi-Cloud Support**
|
|
36
|
+
- **AWS** โ
(Full support with Cost Explorer integration)
|
|
37
|
+
- **Google Cloud** ๐ง (Architecture ready, coming soon)
|
|
38
|
+
- **Microsoft Azure** ๐ง (Architecture ready, coming soon)
|
|
39
|
+
- **Alibaba Cloud** ๐ง (Architecture ready, coming soon)
|
|
40
|
+
- **Oracle Cloud** ๐ง (Architecture ready, coming soon)
|
|
41
|
+
|
|
42
|
+
### ๐ **Comprehensive Analytics**
|
|
43
|
+
- **Cost Forecasting** - AI-powered predictions for future spending
|
|
44
|
+
- **Budget Monitoring** - Track against budgets with smart alerts
|
|
45
|
+
- **Resource Rightsizing** - ML recommendations for optimal instance sizes
|
|
46
|
+
- **Sustainability Analysis** - Carbon footprint tracking and green recommendations
|
|
47
|
+
- **Security Cost Analysis** - Security posture vs. cost optimization
|
|
48
|
+
- **Anomaly Detection** - AI-powered cost spike identification
|
|
49
|
+
|
|
50
|
+
### ๐๏ธ **Advanced Features**
|
|
51
|
+
- **Interactive Dashboards** - Rich terminal UI with real-time data
|
|
52
|
+
- **PDF Report Generation** - Executive summaries and technical deep-dives
|
|
53
|
+
- **Cross-Cloud Optimization** - Find the best provider for each workload
|
|
54
|
+
- **Automated Optimization** - Execute cost-saving actions automatically
|
|
55
|
+
- **Audit Logging** - Comprehensive compliance tracking
|
|
56
|
+
- **Enterprise Multi-tenancy** - Team and organization management
|
|
57
|
+
|
|
58
|
+
### ๐ง **Developer Experience**
|
|
59
|
+
- **Multiple output formats**: Fancy tables, plain text, JSON, CSV, Excel
|
|
60
|
+
- **Flexible authentication**: Environment variables, IAM roles, profiles
|
|
61
|
+
- **CI/CD Integration**: GitHub Actions, Jenkins, GitLab CI
|
|
62
|
+
- **API Server**: REST endpoints for custom integrations
|
|
63
|
+
- **Webhook Support**: Real-time notifications and integrations
|
|
13
64
|
|
|
14
65
|
## ๐ฆ Installation
|
|
15
66
|
|
|
@@ -18,9 +69,10 @@
|
|
|
18
69
|
npm install -g infra-cost
|
|
19
70
|
```
|
|
20
71
|
|
|
21
|
-
### Homebrew
|
|
72
|
+
### Homebrew (macOS/Linux)
|
|
22
73
|
```bash
|
|
23
|
-
brew
|
|
74
|
+
brew tap codecollab-co/tap
|
|
75
|
+
brew install infra-cost
|
|
24
76
|
```
|
|
25
77
|
|
|
26
78
|
### npx (No installation required)
|
|
@@ -28,87 +80,51 @@ brew install codecollab-co/tap/infra-cost
|
|
|
28
80
|
npx infra-cost
|
|
29
81
|
```
|
|
30
82
|
|
|
83
|
+
### Docker
|
|
84
|
+
```bash
|
|
85
|
+
docker run --rm codecollab-co/infra-cost --help
|
|
86
|
+
```
|
|
87
|
+
|
|
31
88
|
## ๐ฏ Quick Start
|
|
32
89
|
|
|
33
|
-
### AWS
|
|
90
|
+
### 1. Basic AWS Cost Analysis
|
|
34
91
|
```bash
|
|
35
92
|
# Using default AWS credentials
|
|
36
93
|
infra-cost
|
|
37
94
|
|
|
38
|
-
#
|
|
39
|
-
infra-cost --
|
|
95
|
+
# Get a 6-month cost trend with forecasting
|
|
96
|
+
infra-cost --trend --forecast 30
|
|
97
|
+
|
|
98
|
+
# Interactive multi-cloud dashboard
|
|
99
|
+
infra-cost --multi-cloud-dashboard
|
|
40
100
|
```
|
|
41
101
|
|
|
42
|
-
###
|
|
102
|
+
### 2. Advanced Analysis
|
|
43
103
|
```bash
|
|
44
|
-
#
|
|
45
|
-
infra-cost --
|
|
104
|
+
# Generate executive PDF report
|
|
105
|
+
infra-cost --executive-summary --pdf-report quarterly-report.pdf
|
|
46
106
|
|
|
47
|
-
#
|
|
48
|
-
infra-cost --
|
|
49
|
-
|
|
50
|
-
# Alibaba Cloud
|
|
51
|
-
infra-cost --provider alicloud --access-key key --secret-key secret --region cn-hangzhou
|
|
107
|
+
# AI-powered anomaly detection
|
|
108
|
+
infra-cost --anomaly-detect --anomaly-realtime
|
|
52
109
|
|
|
53
|
-
#
|
|
54
|
-
infra-cost --
|
|
110
|
+
# Comprehensive sustainability analysis
|
|
111
|
+
infra-cost --sustainability --carbon-footprint --green-recommendations
|
|
55
112
|
```
|
|
56
113
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### Command Line Options
|
|
60
|
-
|
|
114
|
+
### 3. Team Collaboration
|
|
61
115
|
```bash
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-r, --region [region] Cloud provider region (default: "us-east-1")
|
|
68
|
-
|
|
69
|
-
AWS/Generic Credentials:
|
|
70
|
-
-k, --access-key [key] Access key (AWS Access Key, etc.)
|
|
71
|
-
-s, --secret-key [key] Secret key (AWS Secret Key, etc.)
|
|
72
|
-
-T, --session-token [key] Session token (AWS Session Token, etc.)
|
|
73
|
-
|
|
74
|
-
Google Cloud Options:
|
|
75
|
-
--project-id [id] GCP Project ID
|
|
76
|
-
--key-file [path] Path to service account JSON file
|
|
77
|
-
|
|
78
|
-
Azure Options:
|
|
79
|
-
--subscription-id [id] Azure Subscription ID
|
|
80
|
-
--tenant-id [id] Azure Tenant ID
|
|
81
|
-
--client-id [id] Azure Client ID
|
|
82
|
-
--client-secret [secret] Azure Client Secret
|
|
83
|
-
|
|
84
|
-
Alibaba Cloud Options:
|
|
85
|
-
(Uses --access-key and --secret-key)
|
|
86
|
-
|
|
87
|
-
Oracle Cloud Options:
|
|
88
|
-
--user-id [id] Oracle User OCID
|
|
89
|
-
--tenancy-id [id] Oracle Tenancy OCID
|
|
90
|
-
--fingerprint [fingerprint] Oracle Public Key Fingerprint
|
|
91
|
-
--key-file [path] Path to private key file
|
|
92
|
-
|
|
93
|
-
Output Options:
|
|
94
|
-
-j, --json Get the output as JSON
|
|
95
|
-
-u, --summary Get only the summary without service breakdown
|
|
96
|
-
-t, --text Get the output as plain text (no colors/tables)
|
|
97
|
-
|
|
98
|
-
Slack Integration:
|
|
99
|
-
-S, --slack-token [token] Token for the slack integration
|
|
100
|
-
-C, --slack-channel [channel] Channel to which the slack integration should post
|
|
101
|
-
|
|
102
|
-
Other Options:
|
|
103
|
-
-V, --version output the version number
|
|
104
|
-
-h, --help display help for command
|
|
116
|
+
# Send daily cost report to Slack
|
|
117
|
+
infra-cost --slack-token YOUR_TOKEN --slack-channel "#finops" --smart-alerts
|
|
118
|
+
|
|
119
|
+
# Start real-time cost monitoring
|
|
120
|
+
infra-cost --monitor --alert-threshold 1000 --alert-channel slack
|
|
105
121
|
```
|
|
106
122
|
|
|
107
123
|
## ๐ Authentication
|
|
108
124
|
|
|
109
|
-
### AWS Authentication (Multiple Methods
|
|
125
|
+
### AWS Authentication (Multiple Methods)
|
|
110
126
|
|
|
111
|
-
#### 1. Environment Variables
|
|
127
|
+
#### 1. Environment Variables (Recommended)
|
|
112
128
|
```bash
|
|
113
129
|
export AWS_ACCESS_KEY_ID=your_access_key
|
|
114
130
|
export AWS_SECRET_ACCESS_KEY=your_secret_key
|
|
@@ -123,12 +139,15 @@ infra-cost
|
|
|
123
139
|
|
|
124
140
|
# Use specific profile
|
|
125
141
|
infra-cost --profile production
|
|
142
|
+
|
|
143
|
+
# Auto-discover profiles
|
|
144
|
+
infra-cost --discover-profiles --auto-profile
|
|
126
145
|
```
|
|
127
146
|
|
|
128
147
|
#### 3. IAM Roles (EC2/Lambda/ECS)
|
|
129
|
-
When running on AWS infrastructure, the CLI automatically uses IAM roles:
|
|
130
148
|
```bash
|
|
131
|
-
|
|
149
|
+
# Automatically uses attached IAM role
|
|
150
|
+
infra-cost
|
|
132
151
|
```
|
|
133
152
|
|
|
134
153
|
#### 4. AWS SSO
|
|
@@ -137,131 +156,164 @@ aws sso login --profile my-sso-profile
|
|
|
137
156
|
infra-cost --profile my-sso-profile
|
|
138
157
|
```
|
|
139
158
|
|
|
140
|
-
|
|
159
|
+
### Multi-Cloud Setup (Coming Soon)
|
|
141
160
|
```bash
|
|
142
|
-
|
|
143
|
-
|
|
161
|
+
# Google Cloud Platform
|
|
162
|
+
infra-cost --provider gcp --project-id my-project --key-file service-account.json
|
|
144
163
|
|
|
145
|
-
|
|
164
|
+
# Microsoft Azure
|
|
165
|
+
infra-cost --provider azure --subscription-id sub-id --tenant-id tenant-id
|
|
146
166
|
|
|
147
|
-
|
|
167
|
+
# Cross-cloud comparison
|
|
168
|
+
infra-cost --compare-clouds aws,gcp,azure --optimization-report
|
|
169
|
+
```
|
|
148
170
|
|
|
149
|
-
## ๐ Output
|
|
171
|
+
## ๐ Output Examples
|
|
150
172
|
|
|
151
|
-
###
|
|
173
|
+
### Default Rich Terminal UI
|
|
152
174
|
```bash
|
|
153
|
-
infra-cost
|
|
175
|
+
infra-cost --smart-alerts --compact
|
|
154
176
|
```
|
|
155
|
-

|
|
177
|
+

|
|
156
178
|
|
|
157
|
-
###
|
|
179
|
+
### Executive Dashboard
|
|
158
180
|
```bash
|
|
159
|
-
infra-cost --summary
|
|
181
|
+
infra-cost --executive-summary
|
|
160
182
|
```
|
|
161
|
-

|
|
162
184
|
|
|
163
|
-
###
|
|
185
|
+
### JSON for Automation
|
|
164
186
|
```bash
|
|
165
|
-
infra-cost --
|
|
187
|
+
infra-cost --json --forecast 30 --analytics-insights
|
|
166
188
|
```
|
|
167
189
|
|
|
168
|
-
###
|
|
190
|
+
### PDF Reports
|
|
169
191
|
```bash
|
|
170
|
-
infra-cost --
|
|
192
|
+
infra-cost --pdf-report monthly-report.pdf --trend --optimization-tips
|
|
171
193
|
```
|
|
172
194
|
|
|
173
195
|
## ๐ฌ Slack Integration
|
|
174
196
|
|
|
175
|
-
### Enhanced
|
|
176
|
-
- **
|
|
177
|
-
- **
|
|
178
|
-
- **
|
|
179
|
-
- **
|
|
197
|
+
### Enhanced Team Collaboration
|
|
198
|
+
- **Rich cost breakdowns** with visual charts
|
|
199
|
+
- **Proactive alerts** for budget overruns and anomalies
|
|
200
|
+
- **Automated workflows** for approval processes
|
|
201
|
+
- **Team cost awareness** with regular updates
|
|
180
202
|
|
|
181
|
-
### Setup
|
|
182
|
-
1. Create a [Slack app](https://api.slack.com/apps?new_app=1)
|
|
183
|
-
2. Add `chat:write` and `chat:write.public` scopes
|
|
184
|
-
3. Get your OAuth token and channel ID
|
|
185
|
-
|
|
186
|
-
### Usage
|
|
203
|
+
### Setup & Usage
|
|
187
204
|
```bash
|
|
188
|
-
|
|
205
|
+
# Create Slack app with chat:write permissions
|
|
206
|
+
# Get OAuth token and channel ID
|
|
207
|
+
|
|
208
|
+
# Send cost report
|
|
209
|
+
infra-cost --slack-token xoxb-your-token --slack-channel "#finops"
|
|
210
|
+
|
|
211
|
+
# Enable smart alerts
|
|
212
|
+
infra-cost --slack-token xoxb-your-token --slack-channel "#alerts" --smart-alerts
|
|
189
213
|
```
|
|
190
214
|
|
|
191
215
|
### Automated Daily Reports
|
|
192
|
-
Set up a GitHub workflow to send daily cost reports:
|
|
193
|
-
|
|
194
216
|
```yaml
|
|
195
|
-
name: Daily
|
|
217
|
+
name: Daily FinOps Report
|
|
196
218
|
on:
|
|
197
219
|
schedule:
|
|
198
|
-
- cron: '0 9 * *
|
|
220
|
+
- cron: '0 9 * * 1-5' # Weekdays 9 AM UTC
|
|
199
221
|
jobs:
|
|
200
|
-
|
|
222
|
+
cost-report:
|
|
201
223
|
runs-on: ubuntu-latest
|
|
202
224
|
steps:
|
|
203
|
-
- uses: actions/checkout@v4
|
|
204
225
|
- run: |
|
|
205
226
|
npx infra-cost \
|
|
227
|
+
--executive-summary \
|
|
206
228
|
--slack-token ${{ secrets.SLACK_TOKEN }} \
|
|
207
|
-
--slack-channel ${{ secrets.SLACK_CHANNEL }}
|
|
229
|
+
--slack-channel ${{ secrets.SLACK_CHANNEL }} \
|
|
230
|
+
--smart-alerts --trends 7
|
|
208
231
|
```
|
|
209
232
|
|
|
210
|
-
##
|
|
211
|
-
|
|
212
|
-
### npm Publishing
|
|
213
|
-
This project includes automated npm publishing with semantic versioning:
|
|
233
|
+
## ๐ง Advanced Usage
|
|
214
234
|
|
|
235
|
+
### Cost Forecasting & Analytics
|
|
215
236
|
```bash
|
|
216
|
-
#
|
|
217
|
-
|
|
237
|
+
# AI-powered forecasting with multiple models
|
|
238
|
+
infra-cost --forecast 90 --forecast-model AUTO --forecast-confidence 95
|
|
218
239
|
|
|
219
|
-
#
|
|
220
|
-
|
|
221
|
-
npm run version:bump:minor
|
|
222
|
-
npm run version:bump:major
|
|
240
|
+
# Business intelligence insights
|
|
241
|
+
infra-cost --analytics --analytics-insights --analytics-drivers
|
|
223
242
|
|
|
224
|
-
#
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
# Manual publish
|
|
228
|
-
npm run publish:latest
|
|
229
|
-
npm run publish:beta
|
|
243
|
+
# Custom dashboards
|
|
244
|
+
infra-cost --dashboard-create "Monthly Review" --chart-create "line:Cost Trends"
|
|
230
245
|
```
|
|
231
246
|
|
|
232
|
-
###
|
|
233
|
-
Automated Homebrew formula updates via GitHub Actions:
|
|
234
|
-
|
|
247
|
+
### Optimization & Automation
|
|
235
248
|
```bash
|
|
236
|
-
#
|
|
237
|
-
|
|
249
|
+
# Generate optimization recommendations
|
|
250
|
+
infra-cost --finops --optimization-tips --rightsize --sustainability
|
|
238
251
|
|
|
239
|
-
#
|
|
240
|
-
|
|
241
|
-
# 2. Update Homebrew formula
|
|
242
|
-
# 3. Run tests and build
|
|
243
|
-
# 4. Create git tag
|
|
244
|
-
# 5. Trigger release workflow
|
|
245
|
-
```
|
|
252
|
+
# Automated optimization (dry-run first!)
|
|
253
|
+
infra-cost --optimize-dry-run --optimize-rules resize,schedule,unused
|
|
246
254
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
### Build
|
|
250
|
-
```bash
|
|
251
|
-
npm run build
|
|
255
|
+
# Cross-cloud cost comparison
|
|
256
|
+
infra-cost --compare-clouds aws,gcp --optimization-report
|
|
252
257
|
```
|
|
253
258
|
|
|
254
|
-
###
|
|
259
|
+
### Enterprise Features
|
|
255
260
|
```bash
|
|
256
|
-
|
|
261
|
+
# Multi-tenant management
|
|
262
|
+
infra-cost --enterprise --tenants --platform-metrics
|
|
263
|
+
|
|
264
|
+
# API server for integrations
|
|
265
|
+
infra-cost --api-server --api-port 3000 --webhook-create
|
|
266
|
+
|
|
267
|
+
# Comprehensive audit logging
|
|
268
|
+
infra-cost --audit --compliance-check soc2 --audit-export json
|
|
257
269
|
```
|
|
258
270
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
npm run version:next # Get next version
|
|
263
|
-
npm run version:set # Set specific version
|
|
271
|
+
## ๐๏ธ Architecture & Extensibility
|
|
272
|
+
|
|
273
|
+
### Multi-Cloud Provider Pattern
|
|
264
274
|
```
|
|
275
|
+
src/
|
|
276
|
+
โโโ providers/
|
|
277
|
+
โ โโโ factory.ts # Provider factory
|
|
278
|
+
โ โโโ aws.ts # AWS implementation โ
|
|
279
|
+
โ โโโ gcp.ts # Google Cloud ๐ง
|
|
280
|
+
โ โโโ azure.ts # Azure ๐ง
|
|
281
|
+
โ โโโ alicloud.ts # Alibaba Cloud ๐ง
|
|
282
|
+
โ โโโ oracle.ts # Oracle Cloud ๐ง
|
|
283
|
+
โโโ analytics/ # AI/ML cost analysis
|
|
284
|
+
โโโ optimization/ # Cost optimization engines
|
|
285
|
+
โโโ visualization/ # Dashboards & charts
|
|
286
|
+
โโโ integrations/ # Third-party integrations
|
|
287
|
+
โโโ enterprise/ # Multi-tenant features
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Key Design Principles
|
|
291
|
+
- **Abstract provider interface** for consistent multi-cloud API
|
|
292
|
+
- **Plugin architecture** for easy extensibility
|
|
293
|
+
- **Type-safe implementation** with comprehensive TypeScript coverage
|
|
294
|
+
- **Modular design** allowing feature composition
|
|
295
|
+
- **Performance optimized** with efficient data processing
|
|
296
|
+
|
|
297
|
+
## ๐ Roadmap
|
|
298
|
+
|
|
299
|
+
### Q4 2024
|
|
300
|
+
- โ
Enhanced terminal UI and visualization
|
|
301
|
+
- โ
AI-powered anomaly detection
|
|
302
|
+
- โ
Comprehensive PDF reporting
|
|
303
|
+
- โ
Advanced Slack integration
|
|
304
|
+
- ๐ง Google Cloud Platform support
|
|
305
|
+
|
|
306
|
+
### Q1 2025
|
|
307
|
+
- ๐ฎ Microsoft Azure integration
|
|
308
|
+
- ๐ฎ Advanced forecasting models
|
|
309
|
+
- ๐ฎ Mobile app companion
|
|
310
|
+
- ๐ฎ Sustainability tracking expansion
|
|
311
|
+
|
|
312
|
+
### Q2 2025
|
|
313
|
+
- ๐ฎ Alibaba Cloud & Oracle Cloud support
|
|
314
|
+
- ๐ฎ Advanced automation engine
|
|
315
|
+
- ๐ฎ Enterprise SSO integration
|
|
316
|
+
- ๐ฎ Custom plugin system
|
|
265
317
|
|
|
266
318
|
## ๐ Requirements & Permissions
|
|
267
319
|
|
|
@@ -271,11 +323,14 @@ npm run version:set # Set specific version
|
|
|
271
323
|
"Version": "2012-10-17",
|
|
272
324
|
"Statement": [
|
|
273
325
|
{
|
|
274
|
-
"Sid": "
|
|
326
|
+
"Sid": "InfraCostMinimalPermissions",
|
|
275
327
|
"Effect": "Allow",
|
|
276
328
|
"Action": [
|
|
277
329
|
"iam:ListAccountAliases",
|
|
278
330
|
"ce:GetCostAndUsage",
|
|
331
|
+
"ce:GetRightsizingRecommendation",
|
|
332
|
+
"ce:GetSavingsUtilization",
|
|
333
|
+
"budgets:ViewBudget",
|
|
279
334
|
"sts:GetCallerIdentity"
|
|
280
335
|
],
|
|
281
336
|
"Resource": "*"
|
|
@@ -284,59 +339,115 @@ npm run version:set # Set specific version
|
|
|
284
339
|
}
|
|
285
340
|
```
|
|
286
341
|
|
|
287
|
-
###
|
|
288
|
-
-
|
|
289
|
-
-
|
|
342
|
+
### System Requirements
|
|
343
|
+
- Node.js 16+ (recommended: 18+)
|
|
344
|
+
- Memory: 512MB+ available
|
|
345
|
+
- Network: Internet access for cloud provider APIs
|
|
346
|
+
- Optional: Docker for containerized deployments
|
|
290
347
|
|
|
291
|
-
##
|
|
348
|
+
## ๐งช Development
|
|
292
349
|
|
|
293
|
-
###
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
350
|
+
### Local Development Setup
|
|
351
|
+
```bash
|
|
352
|
+
# Clone repository
|
|
353
|
+
git clone https://github.com/codecollab-co/infra-cost.git
|
|
354
|
+
cd infra-cost
|
|
355
|
+
|
|
356
|
+
# Install dependencies
|
|
357
|
+
npm install
|
|
358
|
+
|
|
359
|
+
# Build project
|
|
360
|
+
npm run build
|
|
361
|
+
|
|
362
|
+
# Run tests
|
|
363
|
+
npm test
|
|
364
|
+
|
|
365
|
+
# Start development server
|
|
366
|
+
npm run dev
|
|
306
367
|
```
|
|
307
368
|
|
|
308
|
-
###
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
369
|
+
### Testing & Quality Assurance
|
|
370
|
+
```bash
|
|
371
|
+
# Type checking
|
|
372
|
+
npm run typecheck
|
|
373
|
+
|
|
374
|
+
# Linting
|
|
375
|
+
npm run lint
|
|
313
376
|
|
|
314
|
-
|
|
377
|
+
# Security audit
|
|
378
|
+
npm audit
|
|
315
379
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
- **Release automation** with GitHub Actions
|
|
320
|
-
- **Multi-platform testing** (Node.js 16, 18, 20)
|
|
380
|
+
# Test coverage
|
|
381
|
+
npm run test:coverage
|
|
382
|
+
```
|
|
321
383
|
|
|
322
|
-
###
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
- **Build verification**
|
|
384
|
+
### Release Management
|
|
385
|
+
```bash
|
|
386
|
+
# Check current version status
|
|
387
|
+
npm run version:check
|
|
327
388
|
|
|
328
|
-
|
|
389
|
+
# Bump version
|
|
390
|
+
npm run version:bump:patch # Bug fixes
|
|
391
|
+
npm run version:bump:minor # New features
|
|
392
|
+
npm run version:bump:major # Breaking changes
|
|
329
393
|
|
|
330
|
-
|
|
331
|
-
|
|
394
|
+
# Prepare release
|
|
395
|
+
npm run prepare-release
|
|
396
|
+
```
|
|
332
397
|
|
|
333
398
|
## ๐ค Contributing
|
|
334
399
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
400
|
+
We welcome contributions from the community! Here's how you can help:
|
|
401
|
+
|
|
402
|
+
### ๐ Ways to Contribute
|
|
403
|
+
- **โญ Star this repository** to show your support
|
|
404
|
+
- **๐ Report bugs** and suggest improvements via [issues](https://github.com/codecollab-co/infra-cost/issues)
|
|
405
|
+
- **๐ Improve documentation** - help others understand and use the tool
|
|
406
|
+
- **๐ง Add cloud provider support** - help us expand to more providers
|
|
407
|
+
- **๐งช Write tests** - improve code quality and reliability
|
|
408
|
+
- **๐ก Suggest features** - share your ideas for new capabilities
|
|
409
|
+
|
|
410
|
+
### ๐ Getting Started with Contributing
|
|
411
|
+
1. **Fork** the repository
|
|
412
|
+
2. **Clone** your fork: `git clone https://github.com/YOUR_USERNAME/infra-cost.git`
|
|
413
|
+
3. **Create a branch**: `git checkout -b feature/amazing-feature`
|
|
414
|
+
4. **Make changes** and write tests
|
|
415
|
+
5. **Run quality checks**: `npm run typecheck && npm run lint && npm test`
|
|
416
|
+
6. **Commit**: `git commit -m "Add amazing feature"`
|
|
417
|
+
7. **Push**: `git push origin feature/amazing-feature`
|
|
418
|
+
8. **Create a Pull Request**
|
|
419
|
+
|
|
420
|
+
### ๐ Contribution Guidelines
|
|
421
|
+
- Follow the existing code style and conventions
|
|
422
|
+
- Add tests for new features
|
|
423
|
+
- Update documentation as needed
|
|
424
|
+
- Keep PRs focused on a single feature/fix
|
|
425
|
+
- Be respectful and constructive in discussions
|
|
426
|
+
|
|
427
|
+
### ๐ท๏ธ Good First Issues
|
|
428
|
+
Look for issues labeled `good first issue` or `help wanted` to get started!
|
|
429
|
+
|
|
430
|
+
## ๐ Support & Community
|
|
431
|
+
|
|
432
|
+
### ๐ฌ Get Help
|
|
433
|
+
- **๐ Documentation**: [docs.codecollab.co/infra-cost](https://docs.codecollab.co/infra-cost) *(coming soon)*
|
|
434
|
+
- **๐ Bug Reports**: [GitHub Issues](https://github.com/codecollab-co/infra-cost/issues)
|
|
435
|
+
- **๐ก Feature Requests**: [GitHub Discussions](https://github.com/codecollab-co/infra-cost/discussions)
|
|
436
|
+
- **๐ง Email Support**: support@codecollab.co
|
|
437
|
+
|
|
438
|
+
### ๐ Show Your Support
|
|
439
|
+
If infra-cost helps you save money and optimize costs, please:
|
|
440
|
+
- โญ **Star this repository**
|
|
441
|
+
- ๐ฆ **Share on Twitter** with #InfraCost #FinOps
|
|
442
|
+
- ๐ **Write a review** or blog post about your experience
|
|
443
|
+
- ๐ค **Contribute** code, documentation, or feedback
|
|
444
|
+
|
|
445
|
+
### ๐ข Enterprise Support
|
|
446
|
+
For enterprise deployments, custom integrations, and professional support:
|
|
447
|
+
- ๐ง Contact: enterprise@codecollab.co
|
|
448
|
+
- ๐ SLA-backed support available
|
|
449
|
+
- ๐จ Custom branding and whitelabeling
|
|
450
|
+
- ๐๏ธ Professional services and consulting
|
|
340
451
|
|
|
341
452
|
## ๐ License
|
|
342
453
|
|
|
@@ -344,19 +455,32 @@ MIT ยฉ [Code Collab](https://github.com/codecollab-co)
|
|
|
344
455
|
|
|
345
456
|
---
|
|
346
457
|
|
|
347
|
-
## ๐
|
|
458
|
+
## ๐ Changelog
|
|
459
|
+
|
|
460
|
+
### v0.2.4 - Latest Release
|
|
461
|
+
- โ
**Fixed CommonJS compatibility** - Homebrew installation now works perfectly
|
|
462
|
+
- โ
**Enhanced error handling** and user experience improvements
|
|
463
|
+
- โ
**Optimized build process** for better performance
|
|
348
464
|
|
|
349
|
-
### v0.
|
|
350
|
-
- โ
**
|
|
351
|
-
- โ
**
|
|
352
|
-
- โ
**
|
|
353
|
-
- โ
**
|
|
354
|
-
- โ
**
|
|
355
|
-
- โ
**
|
|
465
|
+
### v0.2.0 - Enhanced Features
|
|
466
|
+
- โ
**AI-powered anomaly detection** with real-time monitoring
|
|
467
|
+
- โ
**Advanced visualization engine** with interactive dashboards
|
|
468
|
+
- โ
**PDF report generation** for executives and technical teams
|
|
469
|
+
- โ
**Comprehensive Slack integration** with rich formatting
|
|
470
|
+
- โ
**Multi-cloud architecture** ready for expansion
|
|
471
|
+
- โ
**Enterprise features** including multi-tenancy and API server
|
|
356
472
|
|
|
357
473
|
### Migration from aws-cost-cli
|
|
358
|
-
This tool
|
|
474
|
+
This tool evolved from `aws-cost-cli` with full backward compatibility. Both `infra-cost` and `aws-cost` commands work seamlessly.
|
|
359
475
|
|
|
360
476
|
---
|
|
361
477
|
|
|
362
|
-
|
|
478
|
+
<div align="center">
|
|
479
|
+
|
|
480
|
+
**Made with โค๏ธ by [Code Collab](https://github.com/codecollab-co)**
|
|
481
|
+
|
|
482
|
+
*Empowering teams to optimize cloud costs and build sustainable infrastructure*
|
|
483
|
+
|
|
484
|
+
[โญ Star us on GitHub](https://github.com/codecollab-co/infra-cost) โข [๐ฆ Follow on Twitter](https://twitter.com/codecollabco) โข [๐ผ LinkedIn](https://linkedin.com/company/codecollab-co)
|
|
485
|
+
|
|
486
|
+
</div>
|
package/bin/index.js
CHANGED