Plugins

tfui is built around a modular plugin system. Each plugin provides a focused view accessible via a single key press.

Available Plugins

ID Name Key Category Description
state State Browser s navigation Browse and inspect terraform state resources
plan Plan Review p operations Review terraform plan changes with expandable attribute diffs
apply Apply a operations Apply terraform changes with confirmation and elapsed time tracking
workspace Workspace w navigation Manage terraform workspaces (list, switch, create, delete)
output Outputs o navigation View terraform output values
validate Validate v operations Run terraform validate and show diagnostics
taint Taint t action Mark resources for recreation on next apply
untaint Untaint T action Remove taint mark from resources
import Import n action Import existing infrastructure into terraform state
console Console ~ operations Interactive terraform console (REPL)
risk Risk Analysis R analysis Analyze and group planned changes by risk level
phantom Phantom Changes P analysis Detect and explain phantom (no-op) changes in terraform plans
blastradius Blast Radius B analysis Visualize module-grouped changes with impact scores
context Context C navigation Manage project, chdir, and workspace selection
init Init i operations Run terraform init with form-based options
forceunlock Force Unlock — utility Remove a stale state lock
version Version — utility Show tfui and terraform version information
chdir Chdir Picker — navigation Select chdir member (hidden, activated by context plugin)

Categories

Action (Verb Plugins)

Transient plugins for terraform top-level verbs. Arrive with context, confirm, execute, return.

  • Taint — mark resources for recreation (terraform taint)
  • Untaint — remove taint mark (terraform untaint)
  • Import — import existing infrastructure (terraform import)

Operations

Plugins that execute terraform commands or modify infrastructure.

  • Plan — run and review terraform plan
  • Apply — execute terraform apply with replan + confirmation
  • Init — run terraform init with form-based options
  • Validate — run terraform validate
  • Console — interactive terraform console

Analysis

Plugins that analyze plan output without modifying infrastructure.

Plugins for navigating terraform state, workspaces, and project context.

Utility

Informational and recovery plugins.

Enabling/Disabling Plugins

All plugins are enabled by default. To disable one, configure it in tfui.hcl:

defaults {
  plugin "phantom" {
    enabled = false
  }
  plugin "blastradius" {
    enabled = false
  }
}

Creating a Custom Plugin

To create a new plugin:

  1. Create a new directory plugins/<name>/ with a Go file implementing the Plugin interface from pkg/sdk/plugin.go
  2. Implement the required methods: ID(), Name(), Description(), Init(), Update(), View(), Configure(), Ready()
  3. Register the plugin factory in cmd/tfui/main.go with PluginMeta (keybinding, menu visibility)
  4. Add documentation at docs/plugins/<name>.md

See the /add-plugin slash command for a full step-by-step guide and reference implementation.


Table of contents


This site uses Just the Docs, a documentation theme for Jekyll.