The PhoenixBoot Terminal User Interface (TUI) provides an interactive, user-friendly way to manage all PhoenixBoot operations.
The TUI is a modern text-based interface built with the Textual framework that provides:
- 🎯 Organized Task Categories - Tasks grouped by functionality
- 🚀 One-Click Execution - Run tasks with a button press
- 📊 Real-Time Output - See task output as it happens
- 🎨 Modern Design - Clean, intuitive interface
- ⌨️ Keyboard Navigation - Full keyboard support
# Python 3.8+ required
python3 --version
# Install dependencies
pip install textual rich pyyamlThere are three ways to run the TUI:
cd /path/to/PhoenixBoot
python3 containers/tui/app/phoenixboot_tui.py# Using docker-compose
docker-compose --profile tui up
# Or directly
docker run -it --rm -v $(pwd):/phoenixboot phoenixboot-tui# Install quadlet
cp containers/tui/quadlets/phoenixboot-tui.container ~/.config/containers/systemd/
systemctl --user daemon-reload
# Run via systemd
systemctl --user start phoenixboot-tui.service┌─────────────────────────────────────────────────────────────┐
│ 🔥 PhoenixBoot - Secure Boot Defense System │
│ Interactive Management Interface │
├──────────────┬──────────────────────────────────────────────┤
│ │ │
│ Task │ Welcome to PhoenixBoot TUI │
│ Categories │ │
│ │ PhoenixBoot is a production-ready │
│ 🔨 Build │ firmware defense system... │
│ 🧪 Testing │ │
│ 🔐 SecureBoot│ Select a category from the sidebar │
│ 🔑 MOK │ │
│ 🔧 UUEFI │ │
│ 💿 Installer │ │
│ 🛡️ Security │ │
│ ⚙️ Maint. │ │
│ ℹ️ About │ │
│ │ │
└──────────────┴──────────────────────────────────────────────┘
- Sidebar: Click or use arrow keys to select a category
- Main Area: View tasks or information
- Task Buttons: Click or press Enter to execute
- Tab: Navigate between UI elements
- Esc: Go back to previous screen
- q: Quit application
- d: Toggle dark/light mode
Bootstrap the development environment and build artifacts:
- build-setup - Bootstrap toolchain & environment
- build-build - Build production artifacts
- build-package-esp - Package bootable ESP image
Use Case: Initial setup or rebuilding after source changes.
Run QEMU tests to validate functionality:
- test-qemu - Main QEMU boot test
- test-qemu-secure-positive - SecureBoot positive test
- test-qemu-uuefi - UUEFI application test
- test-qemu-secure-strict - SecureBoot strict mode
- test-qemu-secure-negative-attest - Corruption detection test
Use Case: Validate changes, run CI/CD tests locally.
Manage SecureBoot keys and create bootable media:
- secure-keygen - Generate SecureBoot keys (PK, KEK, db)
- secure-make-auth - Create authenticated variable files
- secureboot-create - Create SecureBoot bootable media
Use Case: Setting up new systems with custom SecureBoot keys.
Manage Machine Owner Keys for kernel module signing:
- secure-mok-new - Generate new MOK certificate
- os-mok-enroll - Enroll MOK certificate
- os-mok-list-keys - List enrolled MOK keys
- os-kmod-sign - Sign kernel module
Use Case: Signing custom kernel modules for SecureBoot.
Universal UEFI diagnostic tool operations:
- uuefi-install - Install UUEFI.efi to ESP
- uuefi-apply - Set BootNext for UUEFI
- uuefi-report - Display system security status
Use Case: System diagnostics, security analysis, firmware inspection.
Create and manage EFI System Partition images:
- build-package-esp - Package ESP image
- esp - Complete ESP build & package
- validate-all - Validate all artifacts
Use Case: Creating bootable USB drives or CD/DVD media.
Comprehensive security checks and analysis:
- secure-env - Comprehensive security check
- kernel-hardening-check - Kernel hardening analysis
- kernel-hardening-report - Generate hardening report
- firmware-checksum-list - List firmware checksums
Use Case: Security audits, compliance checks, threat detection.
Cleanup and verification tasks:
- cleanup - Clean build artifacts
- verify - Verify artifacts
Use Case: Cleaning up after builds, verifying integrity.
Information about PhoenixBoot, version details, and container architecture.
- Select a category from the sidebar
- Click on a task button or navigate with arrow keys and press Enter
- Task execution begins immediately
- Output is shown in real-time
When a task runs, you'll see:
┌─────────────────────────────────────────────────────────────┐
│ Task: build-setup │
│ ✓ Success │
├─────────────┬───────────────────────────────────────────────┤
│ Output │ Errors │
├─────────────┴───────────────────────────────────────────────┤
│ Checking for toolchain dependencies... │
│ ✓ gcc found │
│ ✓ make found │
│ ✓ python3 found │
│ Toolchain check complete! │
└─────────────────────────────────────────────────────────────┘
- ✓ Success - Green banner, exit code 0
- ✗ Failed - Red banner, non-zero exit code
If a task fails:
- Check the Errors tab for stderr output
- Review the Output tab for diagnostic information
- Press Esc or q to return to task list
- Fix the issue and retry
q- Quit applicationd- Toggle dark/light modeCtrl+C- Force quitTab- Navigate between elementsShift+Tab- Navigate backwards
Esc- Go back to previous screen↑/↓- Navigate buttonsEnter- Activate selected buttonSpace- Alternative to Enter
Esc- Return to task listq- Return to task listTab- Switch between Output/Errors tabs
- Launch TUI:
python3 containers/tui/app/phoenixboot_tui.py - Click "🔨 Build & Setup"
- Click "build-setup"
- Wait for completion
- Review output
- From main screen, click "🧪 Testing"
- Click "test-qemu"
- Monitor output in real-time
- Check test results in Output tab
- Click "🔐 SecureBoot"
- Click "secure-keygen"
- Wait for key generation
- Keys saved to
keys/directory
- Click "🛡️ Security"
- Click "secure-env"
- Review comprehensive security report
- Address any findings
Set environment variables before launching TUI:
# Force rebuild
export PG_FORCE_BUILD=1
python3 containers/tui/app/phoenixboot_tui.py
# Set ISO path for installer
export ISO_PATH=/path/to/ubuntu.iso
python3 containers/tui/app/phoenixboot_tui.pyThe TUI uses pf.py internally, so all tasks defined in .pf files are available.
To add new task categories or tasks, edit:
containers/tui/app/phoenixboot_tui.py
Look for methods like get_build_tasks() and add your own.
Problem: ModuleNotFoundError: No module named 'textual'
Solution:
pip install textual rich pyyamlProblem: Task fails with "pf.py not found"
Solution: Ensure you're running from PhoenixBoot root directory:
cd /path/to/PhoenixBoot
python3 containers/tui/app/phoenixboot_tui.pyProblem: Garbled display or rendering issues
Solution:
# Set proper terminal type
export TERM=xterm-256color
python3 containers/tui/app/phoenixboot_tui.pyProblem: TUI container won't start
Solution:
# Rebuild container
docker build -f containers/tui/dockerfiles/Dockerfile -t phoenixboot-tui .
# Check logs
docker logs phoenixboot-tuiAlways run "build-setup" before other tasks on a fresh system.
Run tests after building to validate artifacts.
Always check task output, even on success, to understand what happened.
Regularly run "secure-env" to monitor system security.
Use Docker/Podman containers for reproducible environments.
The TUI works seamlessly with the container architecture:
# Run TUI in container with access to all tools
docker-compose --profile tui up
# TUI can orchestrate other containers
# (future feature: launch build/test containers from TUI)To add new features:
- Edit
containers/tui/app/phoenixboot_tui.py - Add new task categories or screens
- Test locally
- Rebuild container:
docker build -f containers/tui/dockerfiles/Dockerfile -t phoenixboot-tui .
The TUI uses Textual's CSS-like styling. Edit the CSS section in PhoenixBootTUI class.
- Textual Documentation: https://textual.textualize.io/
- PhoenixBoot README:
/README.md - Container Architecture:
/docs/CONTAINER_ARCHITECTURE.md - Task Reference: Run
./pf.py listto see all available tasks
For issues or questions:
- GitHub Issues: https://github.com/P4X-ng/PhoenixBoot/issues
- Documentation:
docs/directory - Quick Help: Press
ℹ️ Aboutin TUI
Made with 🔥 for a more secure boot process