infra-cost 1.2.0 โ†’ 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.
Files changed (4) hide show
  1. package/README.md +187 -2
  2. package/dist/cli/index.js +8910 -7941
  3. package/dist/index.js +9213 -8244
  4. package/package.json +3 -1
package/README.md CHANGED
@@ -181,6 +181,134 @@ infra-cost free-tier --json # JSON output
181
181
 
182
182
  ---
183
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
+
184
312
  ### Command Migration Table
185
313
 
186
314
  | Command Usage | Old Command (v0.x) | New Command (v1.0) |
@@ -511,15 +639,49 @@ infra-cost export inventory pdf
511
639
  infra-cost cost analyze --output json
512
640
  ```
513
641
 
514
- ### Interactive Dashboard
642
+ ### Interactive TUI Dashboard
643
+
644
+ **Real-time cost monitoring with keyboard navigation**
645
+
515
646
  ```bash
516
- # Launch interactive terminal dashboard
647
+ # Launch interactive TUI dashboard (shortcut)
648
+ infra-cost dashboard
649
+
650
+ # Or explicitly
517
651
  infra-cost dashboard interactive
518
652
 
653
+ # Custom refresh interval (default: 60 seconds)
654
+ infra-cost dashboard --refresh 30
655
+
519
656
  # Multi-cloud dashboard
520
657
  infra-cost dashboard multicloud
521
658
  ```
522
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
677
+ ```
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
+
523
685
  ## ๐Ÿ’ฌ Slack Integration
524
686
 
525
687
  ### Enhanced Team Collaboration
@@ -878,6 +1040,29 @@ src/
878
1040
  - Approval workflows
879
1041
  - Related: Issue #42 (Scheduled Reports), Issue #49 (API Server)
880
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
+
881
1066
  ### Q3 2026 (Planned)
882
1067
 
883
1068
  **Priority: Enterprise Features**