惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
博客园_首页
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
V
V2EX
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - trupositive-ai/trupositive: Automatically tag Te...
simmestd · 2026-05-06 · via Hacker News: Show HN

License: MIT Bash Version

Automatically tag all your infrastructure with Git metadata - commit SHA, branch, and repo. Zero config. Works with Terraform and AWS CloudFormation.

What Problem Does This Solve?

When infrastructure breaks in production, you need to know exactly which code version deployed it. Manual tagging is error-prone and forgotten. trupositive automatically injects Git metadata into every resource, enabling:

  • Instant root cause analysis - trace any resource back to its exact code commit
  • Compliance & audit trails - automatic documentation of what changed and when
  • Rollback confidence - know exactly which Git SHA to revert to
  • Change tracking - correlate infrastructure changes with code changes

Who Is This For?

  • DevOps Engineers - Automate tagging without changing workflows
  • SREs - Faster incident response with instant Git SHA tracing
  • Platform Teams - Enforce tagging standards across all teams automatically
  • FinOps - Track cost changes back to specific code changes and teams

When Should You NOT Use This?

Don't use trupositive if:

  • You deploy from non-Git sources (manual uploads, artifact registries)
  • You have existing Git tagging automation that works for you
  • Your compliance requires manual tag approval before deployment

Try It in 5 Minutes

# 1. Install (30 seconds)
curl -fsSL https://raw.githubusercontent.com/trupositive-ai/trupositive/main/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"

# 2. Generate config (10 seconds)
cd your-terraform-or-cloudformation-project
trupositive init

# 3. Deploy - Git metadata automatically injected (4 minutes)
terraform apply    # or: aws cloudformation deploy --template-file template.yaml --stack-name my-stack

# ✅ All resources now tagged with git_sha, git_branch, git_repo

Example Output

Terraform - Automatic tagging configuration generated:

# trupositive.auto.tf
variable "git_sha" { default = "a1b2c3d" }
variable "git_branch" { default = "main" }
variable "git_repo" { default = "github.com/org/repo" }

provider "aws" {
  default_tags {
    tags = {
      git_sha    = var.git_sha
      git_branch = var.git_branch
      git_repo   = var.git_repo
    }
  }
}

CloudFormation - Resources deployed with Git metadata:

$ aws cloudformation describe-stacks --stack-name my-app --query 'Stacks[0].Tags'
[
  { "Key": "git_sha", "Value": "a1b2c3d4e5f" },
  { "Key": "git_branch", "Value": "main" },
  { "Key": "git_repo", "Value": "github.com/yourorg/yourapp" }
]

AWS Console - Every resource automatically tagged:

EC2 Instance i-abc123:
  ├─ git_sha: a1b2c3d4e5f
  ├─ git_branch: main
  └─ git_repo: github.com/yourorg/yourapp

S3 Bucket my-bucket:
  ├─ git_sha: a1b2c3d4e5f
  ├─ git_branch: main
  └─ git_repo: github.com/yourorg/yourapp

Latest Release: v1.1.0 - Now with CloudFormation support!

Production Ready

  • Used in production by DevOps teams managing multi-account AWS environments
  • Tested on: AWS (Terraform + CloudFormation), Azure (Terraform), GCP (Terraform)
  • CI/CD compatible: GitHub Actions, GitLab CI, Azure DevOps, Jenkins, CircleCI
  • Zero runtime dependencies - pure Bash, works everywhere
  • Security hardened - Input sanitization, path traversal protection, no external calls

Installation

curl -fsSL https://raw.githubusercontent.com/trupositive-ai/trupositive/main/install.sh | bash

Requirements: Install at least one of the following before running the installer:

  • Terraform (for Terraform projects)
  • AWS CLI (for CloudFormation projects)

Ensure ~/.local/bin is in your PATH. Add it temporarily for the current session:

export PATH="$HOME/.local/bin:$PATH"

To make it permanent, add to your shell configuration file:

For zsh (macOS default):

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

For bash:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

After adding to PATH, verify the installation:

For Terraform:

which terraform
# Should show: /Users/yourusername/.local/bin/terraform

For CloudFormation:

which aws
# Should show: /Users/yourusername/.local/bin/aws

Uninstallation

curl -fsSL https://raw.githubusercontent.com/trupositive-ai/trupositive/main/uninstall.sh | bash

Usage

Terraform

Use terraform as normal - the wrapper is transparent:

terraform apply
terraform plan
terraform destroy

Generate Terraform configuration for automatic tagging:

trupositive init

This creates trupositive.auto.tf with provider-specific tagging configuration. The tool automatically detects AWS, Azure, or GCP providers.

CloudFormation

Use aws cloudformation as normal - the wrapper automatically injects Git metadata:

aws cloudformation deploy --template-file template.yaml --stack-name my-stack
aws cloudformation create-stack --template-file template.yaml --stack-name my-stack
aws cloudformation update-stack --template-file template.yaml --stack-name my-stack

Generate CloudFormation parameter definitions and examples:

trupositive init

This creates trupositive-params.yaml with parameter definitions and usage examples for adding Git metadata tags to your resources.

How It Works

┌─────────────────────────────────────────────────────────────────┐
│  Your Terminal                                                  │
│                                                                 │
│  $ terraform apply                                              │
│         │                                                       │
│         ▼                                                       │
│  ┌─────────────────┐                                           │
│  │ trupositive     │  Detects: Git repo                        │
│  │ wrapper         │  Extracts: commit SHA, branch, repo URL   │
│  └────────┬────────┘  Sanitizes: removes sensitive chars       │
│           │                                                     │
│           ▼                                                     │
│  ┌─────────────────┐                                           │
│  │ Real terraform  │  Receives: TF_VAR_git_sha=a1b2c3d         │
│  │ binary          │           TF_VAR_git_branch=main          │
│  └────────┬────────┘           TF_VAR_git_repo=github.com/...  │
│           │                                                     │
│           ▼                                                     │
│  ┌─────────────────┐                                           │
│  │ Cloud Provider  │  Resources tagged automatically           │
│  │ (AWS/Azure/GCP) │                                           │
│  └─────────────────┘                                           │
└─────────────────────────────────────────────────────────────────┘

Terraform

The wrapper exports Git metadata as Terraform variables:

  • TF_VAR_git_sha - Current commit SHA
  • TF_VAR_git_branch - Current branch name
  • TF_VAR_git_repo - Remote origin URL

Provider Support:

  • AWS: Uses provider-level default_tags - tags applied automatically to all resources.
  • Azure/GCP: Generates locals blocks - add tags = local.default_tags (or labels = local.default_labels for GCP) to resources manually.

CloudFormation

The wrapper automatically injects Git metadata as CloudFormation parameters:

  • GitSha - Current commit SHA
  • GitBranch - Current branch name
  • GitRepo - Remote origin URL

These parameters are automatically passed to deploy, create-stack, update-stack, and create-change-set commands via --parameter-overrides.

Usage in templates:

Parameters:
  GitSha:
    Type: String
    Default: "unknown"
  GitBranch:
    Type: String
    Default: "unknown"
  GitRepo:
    Type: String
    Default: "unknown"

Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      Tags:
        - Key: git_sha
          Value: !Ref GitSha
        - Key: git_branch
          Value: !Ref GitBranch
        - Key: git_repo
          Value: !Ref GitRepo

CI/CD

Automatically detects branch names from CI environment variables (GitHub Actions, GitLab CI, Azure DevOps, Jenkins).

Trade-offs & Current Design

What trupositive does well:

  • ✅ Zero-config automatic tagging
  • ✅ Works transparently with existing workflows
  • ✅ No code changes required
  • ✅ Supports both Terraform and CloudFormation
  • ✅ CI/CD friendly

Current design decisions (open to contribution!):

  • 🔧 Fixed tag names (git_sha, git_branch, git_repo) - configurable tags requested
  • 🔧 Git repository required - could support other VCS systems via PRs
  • 🔧 Terraform Azure/GCP - require manual tags = local.default_tags (AWS has provider-level tagging)
  • 🔧 CloudFormation commands - currently supports deploy, create-stack, update-stack, create-change-set (more can be added)
  • 🔧 No tag validation - compliance checking would be a great addition
  • 🔧 Mono-repo support - context detection could be improved

💡 Want to contribute? These are all great opportunities for PRs! See CONTRIBUTING.md

When to use something else:

  • Need custom tag key names right now → Use native provider tagging (or submit a PR to add this feature!)
  • Deploy from non-Git sources → Implement custom tagging in CI/CD
  • Require tag approval workflows → Use policy-as-code tools (OPA, Sentinel)
  • Complex tag inheritance rules → Use cloud-native tagging strategies

Requirements

  • Git repository
  • Bash shell (version 5.0+)
  • At least one of:
    • Terraform (for Terraform projects)
    • AWS CLI (for CloudFormation projects)

Documentation

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Security

Report security issues per SECURITY.md.

License

MIT - Copyright (c) 2024-2026 trupositive-ai