tfui latest

Context

Overview

The Context plugin displays the current working context as a form dashboard – Project directory, Chdir member, and Workspace. Selectable fields navigate to their respective picker plugins (chdir, workspace) for selection.

Changing context invalidates all plugin state. After a switch, every screen reloads for the new context.

Screenshot

Context

Interactive (TUI)

Press C from any screen or type :context to open the Context dashboard.

Keybindings

Key Action When
j / k / ↑ / ↓ Navigate between fields Dashboard
Enter Open picker for selected field Dashboard
Esc Go back Always
q Go home Always

Fields

Field Selectable Action
Project No Displays the project root directory (read-only)
Chdir Only when the project has a tfui.hcl Opens the chdir picker
Workspace Yes Opens the workspace picker

Flow

C (from any screen) → Context
  ├── Enter on Chdir → Chdir picker → select → chdir switches (workspace resets to `default`) → back here
  ├── Enter on Workspace → Workspace picker → select → workspace switches → back here
  └── Esc / q → Home

Command Line (CLI)

Has no command of its own. Context is set via flags:

tfui plan -project ./infra -chdir modules/networking

Equivalence

Goal CLI TUI
Select chdir -chdir <member> flag C → Chdir → select
Set workspace tfui workspace select <name> C → Workspace → select
View current context Implicit from flags C (dashboard)

Members

Members are declared as top-level member "path" {} blocks in the project’s root tfui.hcl, one block per path; each label is used as written. A tfui.hcl without member blocks has one member, the project root (.), and selecting Chdir switches to it without showing a list. Without a tfui.hcl, the Chdir field is not selectable.

# tfui.hcl
member "modules/vpc" {}
member "envs/prod" {}
member "stacks/networking" {}

The configuration guide covers the rest of tfui.hcl.

  • Workspace – manage workspace within the active chdir
  • Chdir Picker – internal picker for member selection
  • State Browser – browse state for the active chdir
  • Plan – plan runs against the active chdir directory

Edit this page on GitHub