Pug is a terminal interface for running Terraform-family commands in parallel, exploring modules and workspaces, and managing state interactively.
Overview
Pug is a terminal user interface aimed at people who work heavily with Terraform, OpenTofu, or Terragrunt. It discovers root modules under the working directory and presents modules, workspaces, and tasks in panes you navigate from the keyboard.
You can run init, plan, apply, fmt, validate, and destroy across one or many selected modules or workspaces. Tasks run with configurable parallelism, blocking rules for state safety, and queues when capacity is full.
A state view lists resources per workspace and supports targeted plan and apply, state moves and removals, taint and untaint, and state pull. Terragrunt mode detects terragrunt.hcl modules, parses dependencies, and respects topological order for applies and destroys.
Pug loads workspace-specific .tfvars files automatically, integrates with Infracost for cost breakdowns when that tool is installed, and can invoke arbitrary commands per module. Configuration accepts flags, PUG-prefixed environment variables, or a YAML config file.
Install via Go, Homebrew, or unpacked GitHub release binaries. A nerdfonts-patched font is recommended for icon rendering.
Key features
- Parallel terraform tasks
- Module and workspace tree
- Interactive state management
- Terragrunt dependency order
- Infracost cost breakdown
- Workspace tfvars auto-load
- Task queue and cancel
- Tofu and terragrunt programs
Use cases
- Multi-module Terraform ops
- Targeted state edits
- Terragrunt fleet applies
- IaC cost estimates
- Large workspace navigation