How overmindtech/cli works
Project type and purpose
• This is a full-featured, open-source CLI tool (“Overmind CLI”) written in Go.
• Purpose: Provide a chat-assistant and Terraform wrapper that connects to multiple infrastructure “sources” (AWS, Kubernetes, etc.), uncovers dependencies (“blast radius”), surfaces risks, and integrates with the Overmind cloud service via protobuf/Connect APIs.
File structure
• Top-level “cmd” and “main.go”: CLI entrypoint implemented with Cobra.
• “auth/”: authentication middleware & NATS auth client.
• “discovery/”: core discovery engine that orchestrates resource adapters over a NATS message bus.
• “aws-source/”, “k8s-source/”, “stdlib-source/”: three separate “source” binaries (micro-services/adapters) that connect to AWS, Kubernetes, and standard data sources.
• “sdp-go/”: shared protobuf definitions, Connect transport stubs, and client libraries used by the CLI to call the Overmind cloud API.
• “sdpcache/”: local in-memory caching layer for discovery data.
• “tfutils/”: Terraform plan parsing & mapping helpers.
• “tracing/”: observability/tracing hooks.
• Config/build files: Dockerfiles, GitHub workflows, Terraform, package.json (for asset builds), goreleaser, etc.
Extract insights from the README
• Overmind CLI wraps Terraform commands and provides an interactive “explore” mode that queries real-time infrastructure state.
• Architecture: Local CLI + pluggable sources + messaging (NATS) + remote Overmind API connectivity.