infra-cost 0.3.3 โ 1.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 +848 -105
- package/dist/cli/index.js +11857 -0
- package/dist/index.js +11172 -35661
- package/package.json +47 -28
- package/dist/demo/test-enhanced-ui.js +0 -1693
- package/dist/demo/test-multi-cloud-dashboard.js +0 -3375
package/README.md
CHANGED
|
@@ -12,12 +12,23 @@
|
|
|
12
12
|
|
|
13
13
|
*Take control of your cloud costs across AWS, Google Cloud, Azure, Alibaba Cloud, and Oracle Cloud* ๐
|
|
14
14
|
|
|
15
|
-
[Installation](#-installation) โข [Quick Start](#-quick-start) โข [Features](#-features) โข [Documentation](#-documentation) โข [Contributing](#-contributing)
|
|
15
|
+
[Installation](#-installation) โข [Quick Start](#-quick-start) โข [Features](#-features) โข [Documentation](#-documentation) โข [Development](#-development) โข [Contributing](#-contributing)
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
> **๐ข Migrating from v0.x?**
|
|
22
|
+
> infra-cost v1.0 introduces a new subcommand-based CLI architecture for better organization and discoverability.
|
|
23
|
+
>
|
|
24
|
+
> - **Quick migration:** Run `infra-cost config migrate` to automatically update your configuration
|
|
25
|
+
> - **Command changes:** Old flags are now organized subcommands (e.g., `--inventory` โ `export inventory json`)
|
|
26
|
+
> - **Full guide:** See [MIGRATION_GUIDE.md](./MIGRATION_GUIDE.md) for complete migration instructions
|
|
27
|
+
>
|
|
28
|
+
> All new features and improvements are built on this solid foundation!
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
21
32
|
## ๐ฏ Why infra-cost?
|
|
22
33
|
|
|
23
34
|
**Save money. Optimize resources. Make informed decisions.**
|
|
@@ -34,7 +45,7 @@
|
|
|
34
45
|
|
|
35
46
|
### ๐ **Multi-Cloud Support**
|
|
36
47
|
- **AWS** โ
(Full support with Cost Explorer integration)
|
|
37
|
-
- **Google Cloud**
|
|
48
|
+
- **Google Cloud** โ
(BigQuery billing export, multi-project support)
|
|
38
49
|
- **Microsoft Azure** ๐ง (Architecture ready, coming soon)
|
|
39
50
|
- **Alibaba Cloud** ๐ง (Architecture ready, coming soon)
|
|
40
51
|
- **Oracle Cloud** ๐ง (Architecture ready, coming soon)
|
|
@@ -62,6 +73,301 @@
|
|
|
62
73
|
- **API Server**: REST endpoints for custom integrations
|
|
63
74
|
- **Webhook Support**: Real-time notifications and integrations
|
|
64
75
|
|
|
76
|
+
## ๐ CLI Commands Overview
|
|
77
|
+
|
|
78
|
+
infra-cost v1.0 uses a modern subcommand-based architecture for better organization and discoverability.
|
|
79
|
+
|
|
80
|
+
### โก Quick Commands
|
|
81
|
+
|
|
82
|
+
#### `infra-cost now` - Instant Cost Check (NEW in v1.2.0)
|
|
83
|
+
|
|
84
|
+
See today's cloud spending in one second - perfect for morning cost checks!
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Quick daily cost check (zero config)
|
|
88
|
+
infra-cost now
|
|
89
|
+
|
|
90
|
+
# Output:
|
|
91
|
+
# ๐ฐ Today's Cost: $45.23 (+$3.12 โ from yesterday)
|
|
92
|
+
# ๐ Top Services: EC2 $22.10 | RDS $15.30 | S3 $4.20
|
|
93
|
+
# ๐ Month-to-Date: $892.45 / $1,500 (59%)
|
|
94
|
+
# [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 59%
|
|
95
|
+
#
|
|
96
|
+
# Provider: AWS
|
|
97
|
+
# Run `infra-cost cost` for detailed breakdown
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Features:**
|
|
101
|
+
- ๐ **Zero configuration** - auto-detects your default AWS profile
|
|
102
|
+
- ๐ **Smart summary** - today's cost + delta from yesterday
|
|
103
|
+
- ๐ฏ **Top 3 services** - see where your money is going at a glance
|
|
104
|
+
- ๐น **Budget progress** - visual progress bar if budgets configured
|
|
105
|
+
- ๐จ **Color-coded** - green = under budget, red = over budget
|
|
106
|
+
- โก **Lightning fast** - get your answer in ~1 second
|
|
107
|
+
|
|
108
|
+
**Options:**
|
|
109
|
+
```bash
|
|
110
|
+
infra-cost now # Default profile
|
|
111
|
+
infra-cost now --profile prod # Specific profile
|
|
112
|
+
infra-cost now --provider gcp # Google Cloud
|
|
113
|
+
infra-cost now --json # JSON output for scripting
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Perfect for:**
|
|
117
|
+
- Morning stand-ups: "How much did we spend yesterday?"
|
|
118
|
+
- Quick sanity checks before demos
|
|
119
|
+
- Solo developers and indie hackers
|
|
120
|
+
- Anyone who wants instant cost visibility
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
#### `infra-cost free-tier` - AWS Free Tier Tracker (NEW in v1.2.0)
|
|
125
|
+
|
|
126
|
+
Track your AWS Free Tier usage and prevent surprise bills - perfect for solo developers and indie hackers!
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Check free tier status
|
|
130
|
+
infra-cost free-tier
|
|
131
|
+
|
|
132
|
+
# Output:
|
|
133
|
+
# ๐ AWS Free Tier Status (Account: 123456789012)
|
|
134
|
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
135
|
+
#
|
|
136
|
+
# EC2 (t2.micro/t3.micro instances)
|
|
137
|
+
# โโโ Used: 620.0 hours / 750 hours (82.7%)
|
|
138
|
+
# โโโ [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 83%
|
|
139
|
+
# โโโ โ ๏ธ Warning: 130.0 hours remaining
|
|
140
|
+
#
|
|
141
|
+
# S3 (Standard storage)
|
|
142
|
+
# โโโ Used: 4.2 GB / 5 GB (84.0%)
|
|
143
|
+
# โโโ [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 84%
|
|
144
|
+
# โโโ โ ๏ธ Warning: 0.8 GB remaining
|
|
145
|
+
#
|
|
146
|
+
# Lambda (1M requests, 400K GB-sec)
|
|
147
|
+
# โโโ Used: 0.0 cost / 0 cost (0.0%)
|
|
148
|
+
# โโโ [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 0%
|
|
149
|
+
# โโโ โ
On track
|
|
150
|
+
#
|
|
151
|
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
152
|
+
# ๐ก Tip: You have 8 days until month end
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Features:**
|
|
156
|
+
- ๐ **Tracks popular free tier services**: EC2, S3, Lambda, RDS
|
|
157
|
+
- ๐ **Visual progress bars** - see usage at a glance
|
|
158
|
+
- โก **Smart alerts** - warns when approaching limits (default: 80%)
|
|
159
|
+
- ๐ฐ **Cost projection** - estimate month-end overages
|
|
160
|
+
- ๐ฏ **Perfect for beginners** - avoid surprise AWS bills
|
|
161
|
+
- ๐จ **Status indicators** - green=safe, yellow=warning, red=critical
|
|
162
|
+
|
|
163
|
+
**Options:**
|
|
164
|
+
```bash
|
|
165
|
+
infra-cost free-tier # Check current status
|
|
166
|
+
infra-cost free-tier --alert-threshold 90 # Custom threshold
|
|
167
|
+
infra-cost free-tier --show-projection # Show projected overages
|
|
168
|
+
infra-cost free-tier --json # JSON output
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Tracked Services:**
|
|
172
|
+
- **EC2**: 750 hours/month (t2.micro/t3.micro)
|
|
173
|
+
- **S3**: 5 GB storage
|
|
174
|
+
- **Lambda**: Cost-based tracking (free tier = $0 cost)
|
|
175
|
+
|
|
176
|
+
**Perfect for:**
|
|
177
|
+
- Solo developers and indie hackers
|
|
178
|
+
- Students learning AWS
|
|
179
|
+
- New AWS users avoiding surprise bills
|
|
180
|
+
- Monthly free tier checkups
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
#### `infra-cost annotate` - Cost Annotations for IaC Files (NEW in v1.3.0)
|
|
185
|
+
|
|
186
|
+
Add cost estimates directly in your Infrastructure as Code files - see costs during code review!
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Annotate Terraform files
|
|
190
|
+
infra-cost annotate --path ./terraform/
|
|
191
|
+
|
|
192
|
+
# Before:
|
|
193
|
+
resource "aws_instance" "web" {
|
|
194
|
+
instance_type = "t3.xlarge"
|
|
195
|
+
ami = "ami-12345678"
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
# After:
|
|
199
|
+
# ๐ฐ infra-cost: $121.47/month | aws_instance @ us-east-1
|
|
200
|
+
# ๐ก Consider t3.large for 50% savings if CPU < 40% (saves $60.74/month)
|
|
201
|
+
# ๐ Last updated: 2026-01-30
|
|
202
|
+
resource "aws_instance" "web" {
|
|
203
|
+
instance_type = "t3.xlarge"
|
|
204
|
+
ami = "ami-12345678"
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Features:**
|
|
209
|
+
- ๐ **Terraform & CloudFormation support** - HCL and YAML annotations
|
|
210
|
+
- ๐ฐ **Monthly cost estimates** - see the cost of each resource
|
|
211
|
+
- ๐ก **Optimization suggestions** - inline recommendations for savings
|
|
212
|
+
- ๐ **Auto-update** - keep annotations fresh with --update flag
|
|
213
|
+
- ๐งน **Clean removal** - remove all annotations with --remove
|
|
214
|
+
- ๐ **Dry run** - preview changes before applying
|
|
215
|
+
|
|
216
|
+
**Commands:**
|
|
217
|
+
```bash
|
|
218
|
+
# Annotate all Terraform files in a directory
|
|
219
|
+
infra-cost annotate --path ./terraform/
|
|
220
|
+
|
|
221
|
+
# CloudFormation templates
|
|
222
|
+
infra-cost annotate --path ./cloudformation/ --format cloudformation
|
|
223
|
+
|
|
224
|
+
# Preview without modifying files
|
|
225
|
+
infra-cost annotate --path ./terraform/ --dry-run
|
|
226
|
+
|
|
227
|
+
# Update existing annotations
|
|
228
|
+
infra-cost annotate --path ./terraform/ --update
|
|
229
|
+
|
|
230
|
+
# Remove all cost annotations
|
|
231
|
+
infra-cost annotate --path ./terraform/ --remove
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Perfect for:**
|
|
235
|
+
- Code reviews with cost visibility
|
|
236
|
+
- DevOps engineers writing IaC
|
|
237
|
+
- Cost-aware development culture
|
|
238
|
+
- Pre-commit cost checks
|
|
239
|
+
- Documentation of infrastructure costs
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
#### `infra-cost history` - Git Cost History (NEW in v1.3.0)
|
|
244
|
+
|
|
245
|
+
Correlate cost changes with git commits - see which code changes impact costs!
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Show cost history with git correlation
|
|
249
|
+
infra-cost history --git
|
|
250
|
+
|
|
251
|
+
# Output:
|
|
252
|
+
# ๐ Cost History with Git Correlation
|
|
253
|
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
254
|
+
# Date Cost Change Commit
|
|
255
|
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
256
|
+
# 2026-01-28 $142.30 +$12.40 abc1234 Add GPU instances
|
|
257
|
+
# 2026-01-27 $129.90 +$45.20 def5678 Deploy new RDS
|
|
258
|
+
# 2026-01-26 $84.70 -$8.30 ghi9012 Cleanup unused EBS
|
|
259
|
+
# 2026-01-25 $93.00 +$3.10 jkl3456 Update Lambda memory
|
|
260
|
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
261
|
+
#
|
|
262
|
+
# ๐ Significant cost changes:
|
|
263
|
+
# โข +$45.20 on 2026-01-27: def5678 "Deploy new RDS for analytics"
|
|
264
|
+
# โข +$12.40 on 2026-01-28: abc1234 "Add GPU instances for ML"
|
|
265
|
+
|
|
266
|
+
# Analyze specific commit
|
|
267
|
+
infra-cost history --commit abc1234
|
|
268
|
+
|
|
269
|
+
# Who caused the most cost changes this month?
|
|
270
|
+
infra-cost blame --period month
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**Features:**
|
|
274
|
+
- ๐ **Cost-commit correlation** - see which commits changed costs
|
|
275
|
+
- ๐ค **Author attribution** - track cost impact by developer
|
|
276
|
+
- ๐ **Trend analysis** - understand cost evolution over time
|
|
277
|
+
- ๐ **Commit details** - deep dive into specific commits
|
|
278
|
+
- ๐ **Multiple formats** - text, JSON, markdown output
|
|
279
|
+
- โ ๏ธ **Significant change alerts** - highlight big cost impacts
|
|
280
|
+
|
|
281
|
+
**Commands:**
|
|
282
|
+
```bash
|
|
283
|
+
# Show cost history for the past week (default)
|
|
284
|
+
infra-cost history --git
|
|
285
|
+
|
|
286
|
+
# Show history for different periods
|
|
287
|
+
infra-cost history --period month
|
|
288
|
+
infra-cost history --period quarter
|
|
289
|
+
|
|
290
|
+
# Filter by author
|
|
291
|
+
infra-cost history --author john@example.com
|
|
292
|
+
|
|
293
|
+
# Analyze specific commit
|
|
294
|
+
infra-cost history --commit abc1234
|
|
295
|
+
|
|
296
|
+
# Blame analysis - who impacted costs most?
|
|
297
|
+
infra-cost blame --period month
|
|
298
|
+
|
|
299
|
+
# Export to JSON for analysis
|
|
300
|
+
infra-cost history --format json > cost-history.json
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Perfect for:**
|
|
304
|
+
- Engineering teams tracking cost accountability
|
|
305
|
+
- Understanding which features drive costs
|
|
306
|
+
- Cost-aware code reviews
|
|
307
|
+
- FinOps culture and awareness
|
|
308
|
+
- Retrospectives on cost trends
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
### Command Migration Table
|
|
313
|
+
|
|
314
|
+
| Command Usage | Old Command (v0.x) | New Command (v1.0) |
|
|
315
|
+
|--------------|-------------------|-------------------|
|
|
316
|
+
| **Cost Analysis** |
|
|
317
|
+
| Default cost analysis | `infra-cost` | `infra-cost cost analyze` |
|
|
318
|
+
| Show cost deltas | `infra-cost --delta` | `infra-cost cost analyze --show-delta` |
|
|
319
|
+
| Cost trends | `infra-cost --trends 30` | `infra-cost cost trends --period 30d` |
|
|
320
|
+
| Compare clouds | `infra-cost --compare-clouds aws,gcp` | `infra-cost cost compare --providers aws,gcp` |
|
|
321
|
+
| Forecast costs | `infra-cost --forecast 30` | `infra-cost cost forecast --days 30` |
|
|
322
|
+
| **Optimization** |
|
|
323
|
+
| Optimization recommendations | `infra-cost --finops` | `infra-cost optimize recommendations` |
|
|
324
|
+
| Quick wins | `infra-cost --quick-wins` | `infra-cost optimize quickwins` |
|
|
325
|
+
| Rightsizing | `infra-cost --rightsize` | `infra-cost optimize rightsizing` |
|
|
326
|
+
| Cross-cloud optimization | `infra-cost --optimization-report` | `infra-cost optimize cross-cloud` |
|
|
327
|
+
| **Monitoring & Alerts** |
|
|
328
|
+
| Cost alerts | `infra-cost --alerts` | `infra-cost monitor alerts` |
|
|
329
|
+
| Budget monitoring | `infra-cost --budgets` | `infra-cost monitor budgets` |
|
|
330
|
+
| Real-time monitoring | `infra-cost --monitor` | `infra-cost monitor watch` |
|
|
331
|
+
| Anomaly detection | `infra-cost --anomaly-detect` | `infra-cost monitor anomaly` |
|
|
332
|
+
| **Export & Reports** |
|
|
333
|
+
| Export inventory (JSON) | `infra-cost --inventory` | `infra-cost export inventory json` |
|
|
334
|
+
| Export inventory (CSV) | `infra-cost --inventory-export csv` | `infra-cost export inventory csv` |
|
|
335
|
+
| Export inventory (Excel) | `infra-cost --inventory-export xlsx` | `infra-cost export inventory xlsx` |
|
|
336
|
+
| Export inventory (PDF) | `infra-cost --inventory-export pdf` | `infra-cost export inventory pdf` |
|
|
337
|
+
| **AWS Organizations** |
|
|
338
|
+
| List accounts | `infra-cost --organizations` | `infra-cost organizations list` |
|
|
339
|
+
| Organization summary | `infra-cost --organizations-summary` | `infra-cost organizations summary` |
|
|
340
|
+
| Daily costs | `infra-cost --organizations-daily` | `infra-cost organizations daily` |
|
|
341
|
+
| **Chargeback** |
|
|
342
|
+
| Chargeback report | `infra-cost --chargeback` | `infra-cost chargeback report` |
|
|
343
|
+
| Send to Slack | `infra-cost --chargeback-slack` | `infra-cost chargeback slack` |
|
|
344
|
+
| **Dashboards** |
|
|
345
|
+
| Interactive dashboard | `infra-cost --dashboard` | `infra-cost dashboard interactive` |
|
|
346
|
+
| Multi-cloud dashboard | `infra-cost --dashboard-multicloud` | `infra-cost dashboard multicloud` |
|
|
347
|
+
| **Configuration** |
|
|
348
|
+
| Show configuration | `infra-cost --config-status` | `infra-cost config show` |
|
|
349
|
+
| Generate configuration | `infra-cost --config-generate` | `infra-cost config init` |
|
|
350
|
+
| Validate configuration | `infra-cost --config-validate` | `infra-cost config validate` |
|
|
351
|
+
| Migrate configuration | N/A (new in v1.0) | `infra-cost config migrate` |
|
|
352
|
+
|
|
353
|
+
### Available Command Groups
|
|
354
|
+
|
|
355
|
+
- **`cost`** - Cost analysis, trends, comparisons, and forecasting
|
|
356
|
+
- **`optimize`** - Optimization recommendations and analysis
|
|
357
|
+
- **`monitor`** - Alerts, budgets, and anomaly detection
|
|
358
|
+
- **`export`** - Export data in multiple formats
|
|
359
|
+
- **`organizations`** - AWS Organizations multi-account support
|
|
360
|
+
- **`chargeback`** - Cost allocation and reporting
|
|
361
|
+
- **`config`** - Configuration management
|
|
362
|
+
- **`dashboard`** - Interactive dashboards
|
|
363
|
+
|
|
364
|
+
**Get help for any command:**
|
|
365
|
+
```bash
|
|
366
|
+
infra-cost --help
|
|
367
|
+
infra-cost cost --help
|
|
368
|
+
infra-cost cost analyze --help
|
|
369
|
+
```
|
|
370
|
+
|
|
65
371
|
## ๐ฆ Installation
|
|
66
372
|
|
|
67
373
|
### npm (Recommended)
|
|
@@ -98,35 +404,77 @@ docker run --rm codecollab-co/infra-cost --help
|
|
|
98
404
|
|
|
99
405
|
### 1. Basic AWS Cost Analysis
|
|
100
406
|
```bash
|
|
101
|
-
#
|
|
102
|
-
infra-cost
|
|
407
|
+
# Analyze costs with default AWS credentials
|
|
408
|
+
infra-cost cost analyze
|
|
409
|
+
|
|
410
|
+
# Show cost trends over time
|
|
411
|
+
infra-cost cost trends --period 30d
|
|
412
|
+
|
|
413
|
+
# Compare costs across multiple providers
|
|
414
|
+
infra-cost cost compare --providers aws,gcp
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### 2. Google Cloud Platform Cost Analysis
|
|
418
|
+
```bash
|
|
419
|
+
# Analyze GCP costs with service account
|
|
420
|
+
infra-cost cost analyze \
|
|
421
|
+
--provider gcp \
|
|
422
|
+
--project-id my-project \
|
|
423
|
+
--key-file /path/to/service-account.json
|
|
424
|
+
|
|
425
|
+
# List all accessible GCP projects
|
|
426
|
+
infra-cost cost analyze \
|
|
427
|
+
--provider gcp \
|
|
428
|
+
--project-id my-project \
|
|
429
|
+
--list-projects
|
|
430
|
+
|
|
431
|
+
# Analyze costs with custom billing dataset
|
|
432
|
+
infra-cost cost analyze \
|
|
433
|
+
--provider gcp \
|
|
434
|
+
--project-id my-project \
|
|
435
|
+
--billing-dataset custom_billing \
|
|
436
|
+
--billing-table custom_table
|
|
437
|
+
|
|
438
|
+
# Compare costs across multiple GCP projects
|
|
439
|
+
infra-cost cost compare \
|
|
440
|
+
--provider gcp \
|
|
441
|
+
--projects project-1,project-2,project-3
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### 3. Optimization & Recommendations
|
|
445
|
+
```bash
|
|
446
|
+
# Get AI-powered optimization recommendations
|
|
447
|
+
infra-cost optimize recommendations
|
|
103
448
|
|
|
104
|
-
#
|
|
105
|
-
infra-cost
|
|
449
|
+
# Find quick wins for immediate savings
|
|
450
|
+
infra-cost optimize quickwins
|
|
106
451
|
|
|
107
|
-
#
|
|
108
|
-
infra-cost
|
|
452
|
+
# Get rightsizing recommendations
|
|
453
|
+
infra-cost optimize rightsizing
|
|
109
454
|
```
|
|
110
455
|
|
|
111
|
-
###
|
|
456
|
+
### 4. Monitoring & Alerts
|
|
112
457
|
```bash
|
|
113
|
-
#
|
|
114
|
-
infra-cost
|
|
458
|
+
# Check cost alerts and budget status
|
|
459
|
+
infra-cost monitor alerts
|
|
115
460
|
|
|
116
|
-
#
|
|
117
|
-
infra-cost
|
|
461
|
+
# Monitor budgets
|
|
462
|
+
infra-cost monitor budgets
|
|
118
463
|
|
|
119
|
-
#
|
|
120
|
-
infra-cost
|
|
464
|
+
# Detect cost anomalies
|
|
465
|
+
infra-cost monitor anomaly
|
|
121
466
|
```
|
|
122
467
|
|
|
123
|
-
###
|
|
468
|
+
### 5. Team Collaboration
|
|
124
469
|
```bash
|
|
125
|
-
# Send
|
|
126
|
-
infra-cost
|
|
470
|
+
# Send cost report to Slack
|
|
471
|
+
infra-cost chargeback slack
|
|
472
|
+
|
|
473
|
+
# Generate chargeback report
|
|
474
|
+
infra-cost chargeback report
|
|
127
475
|
|
|
128
|
-
#
|
|
129
|
-
infra-cost
|
|
476
|
+
# Interactive dashboard
|
|
477
|
+
infra-cost dashboard interactive
|
|
130
478
|
```
|
|
131
479
|
|
|
132
480
|
## ๐ Authentication
|
|
@@ -138,69 +486,202 @@ infra-cost --monitor --alert-threshold 1000 --alert-channel slack
|
|
|
138
486
|
export AWS_ACCESS_KEY_ID=your_access_key
|
|
139
487
|
export AWS_SECRET_ACCESS_KEY=your_secret_key
|
|
140
488
|
export AWS_REGION=us-east-1
|
|
141
|
-
infra-cost
|
|
489
|
+
infra-cost cost analyze
|
|
142
490
|
```
|
|
143
491
|
|
|
144
492
|
#### 2. AWS Profiles
|
|
145
493
|
```bash
|
|
146
494
|
# Use default profile
|
|
147
|
-
infra-cost
|
|
495
|
+
infra-cost cost analyze
|
|
148
496
|
|
|
149
497
|
# Use specific profile
|
|
150
|
-
infra-cost --profile production
|
|
498
|
+
infra-cost cost analyze --profile production
|
|
151
499
|
|
|
152
|
-
#
|
|
153
|
-
infra-cost --discover-profiles
|
|
500
|
+
# Discover available profiles
|
|
501
|
+
infra-cost config show --discover-profiles
|
|
154
502
|
```
|
|
155
503
|
|
|
156
504
|
#### 3. IAM Roles (EC2/Lambda/ECS)
|
|
157
505
|
```bash
|
|
158
506
|
# Automatically uses attached IAM role
|
|
159
|
-
infra-cost
|
|
507
|
+
infra-cost cost analyze
|
|
160
508
|
```
|
|
161
509
|
|
|
162
510
|
#### 4. AWS SSO
|
|
163
511
|
```bash
|
|
164
512
|
aws sso login --profile my-sso-profile
|
|
165
|
-
infra-cost --profile my-sso-profile
|
|
513
|
+
infra-cost cost analyze --profile my-sso-profile
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
#### 5. Configuration File
|
|
517
|
+
```bash
|
|
518
|
+
# Initialize configuration
|
|
519
|
+
infra-cost config init
|
|
520
|
+
|
|
521
|
+
# Validate configuration
|
|
522
|
+
infra-cost config validate
|
|
523
|
+
|
|
524
|
+
# Show current configuration
|
|
525
|
+
infra-cost config show
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### Google Cloud Platform Authentication
|
|
529
|
+
|
|
530
|
+
#### 1. Service Account Key File (Recommended)
|
|
531
|
+
```bash
|
|
532
|
+
# Download service account key from GCP Console
|
|
533
|
+
# IAM & Admin > Service Accounts > Create Key (JSON)
|
|
534
|
+
|
|
535
|
+
export GOOGLE_PROJECT_ID=your-project-id
|
|
536
|
+
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
|
|
537
|
+
infra-cost cost analyze --provider gcp
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
#### 2. Application Default Credentials (ADC)
|
|
541
|
+
```bash
|
|
542
|
+
# Authenticate with gcloud CLI
|
|
543
|
+
gcloud auth application-default login
|
|
544
|
+
|
|
545
|
+
# Set default project
|
|
546
|
+
gcloud config set project your-project-id
|
|
547
|
+
|
|
548
|
+
# Run infra-cost
|
|
549
|
+
infra-cost cost analyze --provider gcp --project-id your-project-id
|
|
166
550
|
```
|
|
167
551
|
|
|
168
|
-
|
|
552
|
+
#### 3. Command-Line Arguments
|
|
553
|
+
```bash
|
|
554
|
+
infra-cost cost analyze \
|
|
555
|
+
--provider gcp \
|
|
556
|
+
--project-id my-project \
|
|
557
|
+
--key-file /path/to/service-account.json
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
#### 4. Configuration File
|
|
561
|
+
```bash
|
|
562
|
+
# Initialize configuration with GCP
|
|
563
|
+
infra-cost config init
|
|
564
|
+
|
|
565
|
+
# Edit ~/.infra-cost/config.json
|
|
566
|
+
{
|
|
567
|
+
"provider": "gcp",
|
|
568
|
+
"credentials": {
|
|
569
|
+
"projectId": "my-project",
|
|
570
|
+
"keyFilePath": "/path/to/service-account.json",
|
|
571
|
+
"billingDatasetId": "billing_export",
|
|
572
|
+
"billingTableId": "gcp_billing_export"
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
#### GCP Permissions Required
|
|
578
|
+
Your service account needs the following IAM permissions:
|
|
579
|
+
- `resourcemanager.projects.get` - Read project information
|
|
580
|
+
- `bigquery.jobs.create` - Query billing data
|
|
581
|
+
- `bigquery.tables.getData` - Read billing tables
|
|
582
|
+
|
|
583
|
+
**Recommended IAM Role:** `roles/bigquery.user` + custom role for project access
|
|
584
|
+
|
|
585
|
+
#### Enable BigQuery Billing Export
|
|
586
|
+
infra-cost requires BigQuery billing export to be enabled:
|
|
587
|
+
|
|
588
|
+
1. Go to [GCP Billing Console](https://console.cloud.google.com/billing)
|
|
589
|
+
2. Select your billing account
|
|
590
|
+
3. Navigate to "Billing export"
|
|
591
|
+
4. Enable "BigQuery export"
|
|
592
|
+
5. Configure dataset (default: `billing_export`)
|
|
593
|
+
6. Wait 24 hours for initial data
|
|
594
|
+
|
|
595
|
+
### Multi-Cloud Setup
|
|
596
|
+
|
|
169
597
|
```bash
|
|
170
598
|
# Google Cloud Platform
|
|
171
|
-
infra-cost --provider gcp --project-id my-project --key-file service-account.json
|
|
599
|
+
infra-cost cost analyze --provider gcp --project-id my-project --key-file service-account.json
|
|
600
|
+
|
|
601
|
+
# Microsoft Azure (Coming Soon)
|
|
602
|
+
infra-cost cost analyze --provider azure --subscription-id sub-id --tenant-id tenant-id
|
|
172
603
|
|
|
173
|
-
#
|
|
174
|
-
infra-cost --provider
|
|
604
|
+
# Oracle Cloud (Coming Soon)
|
|
605
|
+
infra-cost cost analyze --provider oracle --user-id user-ocid --tenancy-id tenancy-ocid
|
|
175
606
|
|
|
176
607
|
# Cross-cloud comparison
|
|
177
|
-
infra-cost
|
|
608
|
+
infra-cost cost compare --providers aws,gcp
|
|
609
|
+
|
|
610
|
+
# Cross-cloud optimization report (Coming Soon)
|
|
611
|
+
infra-cost optimize cross-cloud
|
|
178
612
|
```
|
|
179
613
|
|
|
180
614
|
## ๐ Output Examples
|
|
181
615
|
|
|
182
616
|
### Default Rich Terminal UI
|
|
183
617
|
```bash
|
|
184
|
-
infra-cost --
|
|
618
|
+
infra-cost cost analyze --output fancy
|
|
185
619
|
```
|
|
186
620
|

|
|
187
621
|
|
|
188
|
-
###
|
|
622
|
+
### Export Options
|
|
189
623
|
```bash
|
|
190
|
-
|
|
624
|
+
# Export inventory to JSON
|
|
625
|
+
infra-cost export inventory json
|
|
626
|
+
|
|
627
|
+
# Export to CSV
|
|
628
|
+
infra-cost export inventory csv
|
|
629
|
+
|
|
630
|
+
# Export to Excel
|
|
631
|
+
infra-cost export inventory xlsx
|
|
632
|
+
|
|
633
|
+
# Export to PDF
|
|
634
|
+
infra-cost export inventory pdf
|
|
191
635
|
```
|
|
192
|
-

|
|
193
636
|
|
|
194
637
|
### JSON for Automation
|
|
195
638
|
```bash
|
|
196
|
-
infra-cost
|
|
639
|
+
infra-cost cost analyze --output json
|
|
197
640
|
```
|
|
198
641
|
|
|
199
|
-
###
|
|
642
|
+
### Interactive TUI Dashboard
|
|
643
|
+
|
|
644
|
+
**Real-time cost monitoring with keyboard navigation**
|
|
645
|
+
|
|
200
646
|
```bash
|
|
201
|
-
|
|
647
|
+
# Launch interactive TUI dashboard (shortcut)
|
|
648
|
+
infra-cost dashboard
|
|
649
|
+
|
|
650
|
+
# Or explicitly
|
|
651
|
+
infra-cost dashboard interactive
|
|
652
|
+
|
|
653
|
+
# Custom refresh interval (default: 60 seconds)
|
|
654
|
+
infra-cost dashboard --refresh 30
|
|
655
|
+
|
|
656
|
+
# Multi-cloud dashboard
|
|
657
|
+
infra-cost dashboard multicloud
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
**Features:**
|
|
661
|
+
- ๐จ Beautiful terminal UI with real-time updates
|
|
662
|
+
- โจ๏ธ Full keyboard navigation (vim-style supported)
|
|
663
|
+
- ๐ Multiple views: Services, Resources, Trends, Alerts
|
|
664
|
+
- ๐ Live trend indicators (โ up, โ down, โ stable)
|
|
665
|
+
- ๐ Real-time alert notifications
|
|
666
|
+
- ๐ Auto-refresh with configurable intervals
|
|
667
|
+
- ๐ฏ Drill-down into services and resources
|
|
668
|
+
|
|
669
|
+
**Keyboard Shortcuts:**
|
|
670
|
+
```
|
|
671
|
+
q - Quit
|
|
672
|
+
r - Refresh data
|
|
673
|
+
โโ/jk - Navigate rows
|
|
674
|
+
โโ/hl - Switch tabs
|
|
675
|
+
1-4 - Quick tab switch
|
|
676
|
+
? - Help
|
|
202
677
|
```
|
|
203
678
|
|
|
679
|
+
**Perfect for:**
|
|
680
|
+
- DevOps engineers monitoring costs in terminal
|
|
681
|
+
- SREs with terminal-based workflows
|
|
682
|
+
- Real-time cost exploration
|
|
683
|
+
- Server environments without GUI
|
|
684
|
+
|
|
204
685
|
## ๐ฌ Slack Integration
|
|
205
686
|
|
|
206
687
|
### Enhanced Team Collaboration
|
|
@@ -211,14 +692,15 @@ infra-cost --pdf-report monthly-report.pdf --trend --optimization-tips
|
|
|
211
692
|
|
|
212
693
|
### Setup & Usage
|
|
213
694
|
```bash
|
|
214
|
-
#
|
|
215
|
-
|
|
695
|
+
# Configure Slack credentials (one-time setup)
|
|
696
|
+
export SLACK_TOKEN=xoxb-your-token
|
|
697
|
+
export SLACK_CHANNEL="#finops"
|
|
216
698
|
|
|
217
|
-
# Send
|
|
218
|
-
infra-cost
|
|
699
|
+
# Send chargeback report to Slack
|
|
700
|
+
infra-cost chargeback slack
|
|
219
701
|
|
|
220
|
-
#
|
|
221
|
-
infra-cost --slack-token xoxb-your-token --slack-channel "#
|
|
702
|
+
# Or provide inline
|
|
703
|
+
infra-cost chargeback slack --slack-token xoxb-your-token --slack-channel "#finops"
|
|
222
704
|
```
|
|
223
705
|
|
|
224
706
|
### Automated Daily Reports
|
|
@@ -232,11 +714,9 @@ jobs:
|
|
|
232
714
|
runs-on: ubuntu-latest
|
|
233
715
|
steps:
|
|
234
716
|
- run: |
|
|
235
|
-
npx infra-cost \
|
|
236
|
-
--executive-summary \
|
|
717
|
+
npx infra-cost chargeback slack \
|
|
237
718
|
--slack-token ${{ secrets.SLACK_TOKEN }} \
|
|
238
|
-
--slack-channel ${{ secrets.SLACK_CHANNEL }}
|
|
239
|
-
--smart-alerts --trends 7
|
|
719
|
+
--slack-channel ${{ secrets.SLACK_CHANNEL }}
|
|
240
720
|
```
|
|
241
721
|
|
|
242
722
|
## ๐ค GitHub Actions Integration
|
|
@@ -334,88 +814,307 @@ See [example workflows](.github/workflows/examples/) for more use cases.
|
|
|
334
814
|
|
|
335
815
|
## ๐ง Advanced Usage
|
|
336
816
|
|
|
337
|
-
###
|
|
817
|
+
### AWS Organizations Support
|
|
818
|
+
|
|
819
|
+
#### Multi-Account Management
|
|
820
|
+
```bash
|
|
821
|
+
# List all accounts in organization
|
|
822
|
+
infra-cost organizations list
|
|
823
|
+
|
|
824
|
+
# Get organization-wide cost summary
|
|
825
|
+
infra-cost organizations summary
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
#### Daily Cost Reports with Slack Integration
|
|
829
|
+
```bash
|
|
830
|
+
# Get daily costs for all accounts
|
|
831
|
+
infra-cost organizations daily
|
|
832
|
+
|
|
833
|
+
# Send daily report to Slack
|
|
834
|
+
infra-cost organizations daily --slack-webhook https://hooks.slack.com/services/YOUR/WEBHOOK/URL
|
|
835
|
+
|
|
836
|
+
# View 30-day history
|
|
837
|
+
infra-cost organizations daily --days 30
|
|
838
|
+
|
|
839
|
+
# Get scheduling instructions for automated daily reports
|
|
840
|
+
infra-cost organizations daily --schedule-daily --schedule-time 09:00
|
|
841
|
+
|
|
842
|
+
# Export to JSON for automation
|
|
843
|
+
infra-cost organizations daily --json
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
**Features:**
|
|
847
|
+
- ๐ Multi-account cost breakdown
|
|
848
|
+
- ๐ Day-over-day cost trends with visual indicators
|
|
849
|
+
- ๐ฅ Top 5 spender accounts
|
|
850
|
+
- ๐ Weekly averages and projections
|
|
851
|
+
- ๐ฌ Slack webhook integration for team notifications
|
|
852
|
+
- โฐ Scheduling instructions (cron, Lambda, GitHub Actions)
|
|
853
|
+
|
|
854
|
+
**Perfect for:**
|
|
855
|
+
- Large organizations with multiple AWS accounts
|
|
856
|
+
- FinOps teams managing cross-account costs
|
|
857
|
+
- Daily cost visibility and team accountability
|
|
858
|
+
- Automated cost reporting workflows
|
|
859
|
+
|
|
860
|
+
### Cost Analysis & Forecasting
|
|
861
|
+
```bash
|
|
862
|
+
# Analyze costs with delta comparison
|
|
863
|
+
infra-cost cost analyze --show-delta --delta-threshold 10
|
|
864
|
+
|
|
865
|
+
# Get cost trends
|
|
866
|
+
infra-cost cost trends --period 90d
|
|
867
|
+
|
|
868
|
+
# Compare costs across providers
|
|
869
|
+
infra-cost cost compare --providers aws,gcp,azure
|
|
870
|
+
|
|
871
|
+
# Forecast future costs
|
|
872
|
+
infra-cost cost forecast --days 30
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
### Optimization Commands
|
|
338
876
|
```bash
|
|
339
|
-
#
|
|
340
|
-
infra-cost
|
|
877
|
+
# Get all optimization recommendations
|
|
878
|
+
infra-cost optimize recommendations
|
|
879
|
+
|
|
880
|
+
# Find quick wins for immediate savings
|
|
881
|
+
infra-cost optimize quickwins
|
|
341
882
|
|
|
342
|
-
#
|
|
343
|
-
infra-cost
|
|
883
|
+
# Get rightsizing recommendations
|
|
884
|
+
infra-cost optimize rightsizing
|
|
344
885
|
|
|
345
|
-
#
|
|
346
|
-
infra-cost
|
|
886
|
+
# Cross-cloud optimization analysis
|
|
887
|
+
infra-cost optimize cross-cloud
|
|
347
888
|
```
|
|
348
889
|
|
|
349
|
-
###
|
|
890
|
+
### Monitoring & Alerts
|
|
350
891
|
```bash
|
|
351
|
-
#
|
|
352
|
-
infra-cost
|
|
892
|
+
# Check cost alerts
|
|
893
|
+
infra-cost monitor alerts
|
|
353
894
|
|
|
354
|
-
#
|
|
355
|
-
infra-cost
|
|
895
|
+
# Monitor budgets
|
|
896
|
+
infra-cost monitor budgets
|
|
356
897
|
|
|
357
|
-
#
|
|
358
|
-
infra-cost
|
|
898
|
+
# Watch for cost changes in real-time
|
|
899
|
+
infra-cost monitor watch
|
|
900
|
+
|
|
901
|
+
# Detect anomalies
|
|
902
|
+
infra-cost monitor anomaly
|
|
359
903
|
```
|
|
360
904
|
|
|
361
|
-
###
|
|
905
|
+
### Configuration Management
|
|
362
906
|
```bash
|
|
363
|
-
#
|
|
364
|
-
infra-cost
|
|
907
|
+
# Initialize new configuration
|
|
908
|
+
infra-cost config init
|
|
909
|
+
|
|
910
|
+
# Show current configuration
|
|
911
|
+
infra-cost config show
|
|
365
912
|
|
|
366
|
-
#
|
|
367
|
-
infra-cost
|
|
913
|
+
# Validate configuration
|
|
914
|
+
infra-cost config validate
|
|
368
915
|
|
|
369
|
-
#
|
|
370
|
-
infra-cost
|
|
916
|
+
# Migrate from old version
|
|
917
|
+
infra-cost config migrate
|
|
371
918
|
```
|
|
372
919
|
|
|
373
920
|
## ๐๏ธ Architecture & Extensibility
|
|
374
921
|
|
|
375
|
-
###
|
|
922
|
+
### Clean Architecture Structure (v1.0)
|
|
376
923
|
```
|
|
377
924
|
src/
|
|
378
|
-
โโโ
|
|
379
|
-
โ โโโ
|
|
380
|
-
โ โโโ
|
|
381
|
-
โ โโโ
|
|
382
|
-
โ โโโ
|
|
383
|
-
โ โโโ
|
|
384
|
-
โ
|
|
385
|
-
โโโ
|
|
386
|
-
โโโ
|
|
387
|
-
|
|
388
|
-
โโโ
|
|
389
|
-
โโโ
|
|
925
|
+
โโโ cli/ # CLI layer
|
|
926
|
+
โ โโโ commands/ # Subcommand structure
|
|
927
|
+
โ โ โโโ cost/ # Cost analysis commands
|
|
928
|
+
โ โ โโโ optimize/ # Optimization commands
|
|
929
|
+
โ โ โโโ monitor/ # Monitoring commands
|
|
930
|
+
โ โ โโโ export/ # Export commands
|
|
931
|
+
โ โ โโโ organizations/ # AWS Organizations commands
|
|
932
|
+
โ โ โโโ chargeback/ # Chargeback commands
|
|
933
|
+
โ โ โโโ config/ # Configuration commands
|
|
934
|
+
โ โ โโโ dashboard/ # Dashboard commands
|
|
935
|
+
โ โโโ middleware/ # Auth, validation, error handling
|
|
936
|
+
โ โโโ index.ts # CLI entry point
|
|
937
|
+
โโโ core/ # Core business logic
|
|
938
|
+
โ โโโ config/ # Configuration system
|
|
939
|
+
โ โ โโโ schema.ts # Zod validation schemas
|
|
940
|
+
โ โ โโโ loader.ts # Config file loading
|
|
941
|
+
โ โ โโโ discovery.ts # Profile discovery
|
|
942
|
+
โ โ โโโ profiles.ts # Profile management
|
|
943
|
+
โ โโโ logging/ # Structured logging
|
|
944
|
+
โ โโโ analytics/ # Cost analytics engines
|
|
945
|
+
โ โโโ optimization/ # Optimization engines
|
|
946
|
+
โ โโโ monitoring/ # Monitoring systems
|
|
947
|
+
โโโ providers/ # Cloud provider implementations
|
|
948
|
+
โ โโโ factory.ts # Provider factory
|
|
949
|
+
โ โโโ aws/ # AWS implementation โ
|
|
950
|
+
โ โโโ provider.ts # Main provider class
|
|
951
|
+
โ โโโ cost.ts # Cost Explorer integration
|
|
952
|
+
โ โโโ account.ts # Account/Organizations
|
|
953
|
+
โ โโโ config.ts # AWS-specific config
|
|
954
|
+
โโโ exporters/ # Output formatters
|
|
955
|
+
โ โโโ formats/
|
|
956
|
+
โ โโโ fancy.ts # Rich terminal output
|
|
957
|
+
โ โโโ json.ts # JSON output
|
|
958
|
+
โ โโโ text.ts # Plain text
|
|
959
|
+
โ โโโ slack.ts # Slack formatting
|
|
960
|
+
โโโ enterprise/ # Enterprise features
|
|
961
|
+
โโโ multi-tenant/ # Multi-tenancy support
|
|
962
|
+
โโโ audit/ # Audit logging
|
|
390
963
|
```
|
|
391
964
|
|
|
392
965
|
### Key Design Principles
|
|
393
|
-
- **
|
|
394
|
-
- **
|
|
395
|
-
- **Type
|
|
396
|
-
- **
|
|
397
|
-
- **
|
|
966
|
+
- **Subcommand Architecture** - Domain-organized, discoverable commands
|
|
967
|
+
- **Clean Separation** - CLI, core logic, and providers are decoupled
|
|
968
|
+
- **Type Safety** - Comprehensive TypeScript with Zod validation
|
|
969
|
+
- **Testability** - Dependency injection and mocking support
|
|
970
|
+
- **Extensibility** - Plugin architecture for new providers
|
|
971
|
+
- **Configuration First** - Unified config system with profiles
|
|
398
972
|
|
|
399
973
|
## ๐ Roadmap
|
|
400
974
|
|
|
401
|
-
###
|
|
975
|
+
### โ
Completed (2024-2025)
|
|
976
|
+
|
|
977
|
+
**Core Platform & Architecture:**
|
|
402
978
|
- โ
Enhanced terminal UI and visualization
|
|
403
979
|
- โ
AI-powered anomaly detection
|
|
404
980
|
- โ
Comprehensive PDF reporting
|
|
405
981
|
- โ
Advanced Slack integration
|
|
406
|
-
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
-
|
|
410
|
-
-
|
|
411
|
-
-
|
|
412
|
-
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
-
|
|
416
|
-
-
|
|
417
|
-
-
|
|
418
|
-
-
|
|
982
|
+
- โ
GitHub Actions integration
|
|
983
|
+
- โ
npm and Homebrew distribution
|
|
984
|
+
- โ
**Phase 1: Clean Architecture Restructuring (v1.0)**
|
|
985
|
+
- Subcommand-based CLI architecture
|
|
986
|
+
- Unified configuration system with profiles
|
|
987
|
+
- Automatic cloud profile discovery
|
|
988
|
+
- Structured logging with audit trails
|
|
989
|
+
- AWS Organizations support (Issue #10 โ
)
|
|
990
|
+
- Cost allocation and chargeback reporting (Issue #30 โ
)
|
|
991
|
+
- Configuration file support (Issue #29 โ
)
|
|
992
|
+
- Caching layer for performance (Issue #28 โ
)
|
|
993
|
+
- IAM Roles and environment variables auth (Issues #12, #13 โ
)
|
|
994
|
+
- AWS SSO login support (Issue #9 โ
)
|
|
995
|
+
|
|
996
|
+
**Multi-Cloud Foundation:**
|
|
997
|
+
- โ
Multi-cloud provider architecture (Issue #20 - foundation)
|
|
998
|
+
- AWS provider fully implemented
|
|
999
|
+
- GCP, Azure, Alibaba Cloud, Oracle Cloud - architecture ready
|
|
1000
|
+
|
|
1001
|
+
### Q1 2026 (Current - In Progress)
|
|
1002
|
+
|
|
1003
|
+
**Priority: Multi-Cloud Expansion**
|
|
1004
|
+
- โ
**Google Cloud Platform support - COMPLETE** (Issue #66)
|
|
1005
|
+
- โ
Provider implementation with BigQuery billing export
|
|
1006
|
+
- โ
GCP authentication (service account, ADC)
|
|
1007
|
+
- โ
Multi-project support with parallel retrieval
|
|
1008
|
+
- โ
Multi-currency cost aggregation
|
|
1009
|
+
- โ
Cost breakdown by service and time period
|
|
1010
|
+
- โ
Resource inventory (GCE, Storage, SQL, GKE)
|
|
1011
|
+
- โ
Budget tracking and alerts
|
|
1012
|
+
- โ
Organization-level cost aggregation
|
|
1013
|
+
- โ
Comprehensive documentation and examples
|
|
1014
|
+
- โ
65 unit tests passing (100% coverage)
|
|
1015
|
+
- ๐ **Advanced forecasting models** (No GitHub issue)
|
|
1016
|
+
- ML-based cost predictions
|
|
1017
|
+
- Seasonal trend analysis
|
|
1018
|
+
- Budget recommendations
|
|
1019
|
+
- ๐ **Enhanced analytics** (No GitHub issue)
|
|
1020
|
+
- Advanced cost attribution
|
|
1021
|
+
- Custom tagging strategies
|
|
1022
|
+
- Cost optimization scoring
|
|
1023
|
+
|
|
1024
|
+
### Q2 2026 (Planned)
|
|
1025
|
+
|
|
1026
|
+
**Priority: Complete Multi-Cloud & Automation**
|
|
1027
|
+
- ๐ฎ **Microsoft Azure integration** (Issue #20 - partial)
|
|
1028
|
+
- Azure Cost Management API
|
|
1029
|
+
- Subscription and resource group support
|
|
1030
|
+
- Azure-specific recommendations
|
|
1031
|
+
- ๐ฎ **Alibaba Cloud support** (Issue #20 - partial)
|
|
1032
|
+
- Alibaba Cloud Cost API integration
|
|
1033
|
+
- Multi-region support
|
|
1034
|
+
- ๐ฎ **Oracle Cloud support** (Issue #20 - partial)
|
|
1035
|
+
- OCI Cost Management integration
|
|
1036
|
+
- Compartment-based analysis
|
|
1037
|
+
- ๐ **Advanced automation engine** (No GitHub issue)
|
|
1038
|
+
- Automated cost optimization actions
|
|
1039
|
+
- Policy-based automation
|
|
1040
|
+
- Approval workflows
|
|
1041
|
+
- Related: Issue #42 (Scheduled Reports), Issue #49 (API Server)
|
|
1042
|
+
|
|
1043
|
+
### Q2 2026 (v1.3.0 - Phase 2 Complete)
|
|
1044
|
+
|
|
1045
|
+
**Priority: Developer Experience & IDE Integration**
|
|
1046
|
+
- โ
**Interactive TUI Dashboard** (Issue #43)
|
|
1047
|
+
- React Ink-based terminal UI
|
|
1048
|
+
- Real-time cost monitoring with keyboard navigation
|
|
1049
|
+
- Multiple views: Services, Resources, Trends, Alerts
|
|
1050
|
+
- โ
**Cost Annotations for IaC Files** (Issue #54)
|
|
1051
|
+
- Terraform and CloudFormation cost comments
|
|
1052
|
+
- Inline optimization suggestions
|
|
1053
|
+
- Update/remove annotations
|
|
1054
|
+
- โ
**Git Cost History** (Issue #56)
|
|
1055
|
+
- Cost-commit correlation
|
|
1056
|
+
- Blame analysis by author
|
|
1057
|
+
- Historical trend analysis
|
|
1058
|
+
- ๐ฎ **VS Code Extension** (Issue #55 - Planned)
|
|
1059
|
+
- Inline cost display for Terraform/CloudFormation
|
|
1060
|
+
- Sidebar panel with cost summaries
|
|
1061
|
+
- CodeLens integration
|
|
1062
|
+
- Hover information with alternatives
|
|
1063
|
+
- **Note:** VS Code extension will be a separate repository
|
|
1064
|
+
- Integration points with CLI for cost data
|
|
1065
|
+
|
|
1066
|
+
### Q3 2026 (Planned)
|
|
1067
|
+
|
|
1068
|
+
**Priority: Enterprise Features**
|
|
1069
|
+
- โ
/๐ง **Enterprise SSO integration**
|
|
1070
|
+
- AWS SSO: โ
Completed (Issue #9)
|
|
1071
|
+
- SAML/OAuth support: ๐ฒ Planned (Issue #52)
|
|
1072
|
+
- Azure AD, Okta, Auth0 integration: ๐ฒ Planned
|
|
1073
|
+
- Role-based access control (RBAC): ๐ฒ Planned (Issue #50)
|
|
1074
|
+
- ๐ **Custom plugin system** (No GitHub issue)
|
|
1075
|
+
- Plugin SDK
|
|
1076
|
+
- Custom provider support
|
|
1077
|
+
- Third-party integrations
|
|
1078
|
+
- ๐ **Mobile app companion** (No GitHub issue)
|
|
1079
|
+
- iOS and Android apps
|
|
1080
|
+
- Real-time cost alerts
|
|
1081
|
+
- Executive dashboards on mobile
|
|
1082
|
+
|
|
1083
|
+
### Future Vision
|
|
1084
|
+
|
|
1085
|
+
**FinOps & Intelligence:**
|
|
1086
|
+
- ๐ **Sustainability tracking expansion** (No GitHub issue)
|
|
1087
|
+
- Carbon footprint tracking
|
|
1088
|
+
- Green cloud recommendations
|
|
1089
|
+
- Renewable energy usage analytics
|
|
1090
|
+
- ๐ฒ **FinOps best practices automation** (Issue #59 - partial)
|
|
1091
|
+
- FinOps Scorecards implementation
|
|
1092
|
+
- Automated best practices enforcement
|
|
1093
|
+
- Team performance metrics
|
|
1094
|
+
- ๐ฒ **AI-powered cost conversations** (Issue #44 - partial)
|
|
1095
|
+
- Natural language cost queries
|
|
1096
|
+
- ChatOps integration
|
|
1097
|
+
- AI cost assistant
|
|
1098
|
+
|
|
1099
|
+
**Platform & Scale:**
|
|
1100
|
+
- ๐ **Multi-tenant SaaS platform** (No GitHub issue)
|
|
1101
|
+
- Organization management
|
|
1102
|
+
- Team collaboration features
|
|
1103
|
+
- Centralized cost governance
|
|
1104
|
+
- ๐ฒ **Additional integrations** (Various open issues)
|
|
1105
|
+
- Microsoft Teams (Issue #45)
|
|
1106
|
+
- PagerDuty/OpsGenie (Issue #48)
|
|
1107
|
+
- Terraform cost preview (Issue #47)
|
|
1108
|
+
- API Server mode (Issue #49)
|
|
1109
|
+
- Multi-cloud dashboard (Issue #62)
|
|
1110
|
+
- Web-based dashboards (Issue #60)
|
|
1111
|
+
|
|
1112
|
+
**Legend:**
|
|
1113
|
+
- โ
Completed
|
|
1114
|
+
- ๐ง In Progress
|
|
1115
|
+
- ๐ฎ Planned (this quarter)
|
|
1116
|
+
- ๐ฒ Open GitHub Issue
|
|
1117
|
+
- ๐ Not yet tracked in GitHub issues
|
|
419
1118
|
|
|
420
1119
|
## ๐ Requirements & Permissions
|
|
421
1120
|
|
|
@@ -449,6 +1148,8 @@ src/
|
|
|
449
1148
|
|
|
450
1149
|
## ๐งช Development
|
|
451
1150
|
|
|
1151
|
+
> ๐ **Developer Resources**: See the [`docs/`](./docs) folder for comprehensive technical documentation including architecture guides, testing reports, and release procedures.
|
|
1152
|
+
|
|
452
1153
|
### Local Development Setup
|
|
453
1154
|
```bash
|
|
454
1155
|
# Clone repository
|
|
@@ -551,6 +1252,28 @@ For enterprise deployments, custom integrations, and professional support:
|
|
|
551
1252
|
- ๐จ Custom branding and whitelabeling
|
|
552
1253
|
- ๐๏ธ Professional services and consulting
|
|
553
1254
|
|
|
1255
|
+
## ๐ Documentation
|
|
1256
|
+
|
|
1257
|
+
### ๐ User Documentation
|
|
1258
|
+
- **[README.md](./README.md)** - Main project documentation (you are here)
|
|
1259
|
+
- **[CHANGELOG.md](./CHANGELOG.md)** - Version history and release notes
|
|
1260
|
+
- **[CONTRIBUTING.md](./CONTRIBUTING.md)** - Contribution guidelines
|
|
1261
|
+
|
|
1262
|
+
### ๐ง Developer Documentation
|
|
1263
|
+
Comprehensive technical documentation is available in the [`docs/`](./docs) folder:
|
|
1264
|
+
|
|
1265
|
+
- **[docs/RELEASE_SUMMARY.md](./docs/RELEASE_SUMMARY.md)** - Complete release guide for GitHub, npm, and Homebrew
|
|
1266
|
+
- **[docs/PRODUCTION_READINESS.md](./docs/PRODUCTION_READINESS.md)** - Production readiness assessment and checklist
|
|
1267
|
+
- **[docs/TEST_RESULTS.md](./docs/TEST_RESULTS.md)** - Comprehensive test results and analysis
|
|
1268
|
+
- **[docs/NPM_PUBLISHING.md](./docs/NPM_PUBLISHING.md)** - npm publishing workflow and best practices
|
|
1269
|
+
- **[docs/HOMEBREW_SETUP.md](./docs/HOMEBREW_SETUP.md)** - Homebrew formula creation guide
|
|
1270
|
+
- **[docs/code_flow.md](./docs/code_flow.md)** - Codebase architecture and flow
|
|
1271
|
+
- **[docs/infra_cost_cli.md](./docs/infra_cost_cli.md)** - CLI implementation details
|
|
1272
|
+
- **[docs/MULTI-CLOUD-INVENTORY.md](./docs/MULTI-CLOUD-INVENTORY.md)** - Multi-cloud features
|
|
1273
|
+
- **[docs/ENHANCED-FEATURES.md](./docs/ENHANCED-FEATURES.md)** - Advanced capabilities
|
|
1274
|
+
|
|
1275
|
+
See [docs/README.md](./docs/README.md) for the complete documentation index.
|
|
1276
|
+
|
|
554
1277
|
## ๐ License
|
|
555
1278
|
|
|
556
1279
|
MIT ยฉ [Code Collab](https://github.com/codecollab-co)
|
|
@@ -559,7 +1282,27 @@ MIT ยฉ [Code Collab](https://github.com/codecollab-co)
|
|
|
559
1282
|
|
|
560
1283
|
## ๐ Changelog
|
|
561
1284
|
|
|
562
|
-
###
|
|
1285
|
+
### v1.0.0 - Major Release (Phase 1: Clean Architecture) ๐
|
|
1286
|
+
- โ
**Subcommand-Based CLI** - New organized command structure
|
|
1287
|
+
- `cost` - Cost analysis and trends
|
|
1288
|
+
- `optimize` - Optimization recommendations
|
|
1289
|
+
- `monitor` - Alerts and monitoring
|
|
1290
|
+
- `export` - Data export in multiple formats
|
|
1291
|
+
- `organizations` - AWS Organizations support
|
|
1292
|
+
- `chargeback` - Cost allocation and reporting
|
|
1293
|
+
- `config` - Configuration management
|
|
1294
|
+
- `dashboard` - Interactive dashboards
|
|
1295
|
+
- โ
**Unified Configuration System** - Single config file with profiles
|
|
1296
|
+
- โ
**Profile Discovery** - Auto-detect cloud provider profiles
|
|
1297
|
+
- โ
**Clean Architecture** - Separation of CLI, core, and providers
|
|
1298
|
+
- โ
**Enhanced Logging** - Structured logging with multiple outputs
|
|
1299
|
+
- โ
**Migration Tool** - Automated migration from v0.x (`infra-cost config migrate`)
|
|
1300
|
+
- โ
**Improved Error Handling** - Better error messages and validation
|
|
1301
|
+
- โ
**TypeScript Improvements** - Full type safety with Zod schemas
|
|
1302
|
+
|
|
1303
|
+
**Breaking Changes:** See [MIGRATION_GUIDE.md](./MIGRATION_GUIDE.md) for upgrading from v0.x
|
|
1304
|
+
|
|
1305
|
+
### v0.3.0
|
|
563
1306
|
- โ
**GitHub Marketplace Action** - Integrate cost analysis into CI/CD workflows
|
|
564
1307
|
- โ
**Node.js 20+ support** - Updated runtime requirements
|
|
565
1308
|
- โ
**Sprint 6 UX improvements** - Enhanced user experience
|
|
@@ -579,8 +1322,8 @@ MIT ยฉ [Code Collab](https://github.com/codecollab-co)
|
|
|
579
1322
|
- โ
**Multi-cloud architecture** ready for expansion
|
|
580
1323
|
- โ
**Enterprise features** including multi-tenancy and API server
|
|
581
1324
|
|
|
582
|
-
### Migration from
|
|
583
|
-
|
|
1325
|
+
### Migration from v0.x
|
|
1326
|
+
See the comprehensive [MIGRATION_GUIDE.md](./MIGRATION_GUIDE.md) for step-by-step instructions on migrating from v0.x to v1.0.
|
|
584
1327
|
|
|
585
1328
|
---
|
|
586
1329
|
|