Skip to content

La Famille / Field notes

Interactive Terminal UI (TUI)

La Famille features an interactive, full-screen Terminal UI built with the Bubbletea framework. The TUI provides a visual, menu-driven alternative to the standard CLI commands, making it easier to manage your workspace and view project statistics.

Tip: The TUI is fully interactive and uses keyboard navigation. It acts as a wrapper around the core CLI commands, giving you a more visual experience.

Launching the TUI

To launch the TUI, use the tui subcommand:

go run ./cmd/la-famille tui

The application will take over your terminal screen (using tea.WithAltScreen()) and present you with the main menu.

You can exit the TUI at any time by pressing q or Esc on the main menu, or ctrl+c globally.

Main Menu Options

The main menu allows you to navigate through the core features of the application using the up and down arrow keys and pressing Enter to select.

1. Build Site

Executes the standard site generation pipeline. This is visually equivalent to running go run ./cmd/la-famille build. It processes your markdown files, creates the HTML output in the public/ folder, and generates the necessary metadata graphs.

2. RAG Export

Triggers the Retrieval-Augmented Generation (RAG) export logic. This extracts the content and structure of your site into specialized LLM-friendly formats located in the rag-archive/ directory.

3. Serve Site

Starts the built-in local development server.

  • This will run an HTTP server pointing to your public/ directory in the background.
  • While the server is running, the TUI displays a screen featuring an ASCII animation of Jules, the project mascot!
  • Press q or Esc to stop the server and return to the main menu.

4. Serve Site with Watch

Starts the built-in local development server and watches for file changes.

  • This will run an HTTP server pointing to your public/ directory and automatically rebuild the site when content or templates change.
  • While the server is running, the TUI displays a screen featuring an ASCII animation of Jules, the project mascot.
  • Press q or Esc to stop the server and return to the main menu.

5. Stats

Displays a statistics dashboard with insights about your generated site, including:

  • Last build time (in milliseconds)
  • Total pages generated
  • Error count
  • RAG token estimations (approximated from exported RAG markdown bundle sizes)

This screen updates live automatically when using watch mode.

6. Just Raoul

Displays an animation of the project mascot.

  • This option simply shows a screen featuring an ASCII animation of Jules, the project mascot.
  • Press q or Esc to return to the main menu.

Keybindings & Discoverability

Changes

Select Changes or press l to inspect the last successful build against its predecessor. j/k step through changed pages and files; r toggles the regressions-only filter. Green means no regressions, while newly broken links and other regressions appear in red. d still opens Diagnostics and returns to Changes; ? opens help. q/Esc returns to the menu.

The pane loads the saved public/diff.json on startup and updates after builds and watcher rebuilds. Failed builds do not replace it. The first build sets a baseline. Cache hits keep the ledger from the last build that actually ran. Full details are available in public/diff.txt.

Every screen shows its valid keys in the footer (e.g., menu: ↑/k, ↓/j: Navigate • Enter/Space: Select • m: Menu • d: Diagnostics • w: Watch • ?: Help • q: Quit). The selected menu item uses a focus-visible highlight (underline + background) following templates/layout.html accessibility patterns.

Key Action Where
↑ / k Move selection up Menu, Diagnostics
↓ / j Move selection down Menu, Diagnostics
Enter / Space Select command Menu (when open)
m Toggle octoburger menu open/closed Menu
d Toggle Diagnostics drawer (warnings → Next: hints) Any screen
w Toggle Watch Mode (auto-rebuild) Menu / Stats / Diagnostics / Help
? / h Open/close Help & Keybindings legend (one-line footer expands to full help) Any screen
c Clear diagnostics Diagnostics drawer
q / Esc Go back to main menu / close menu / quit (Esc closes menu, q on menu quits) Any screen
Ctrl+C Force quit application Any screen

Press ? or h from any screen to expand the footer help line into the full Help screen; press ?, h, Esc, or q to return to the previous screen. Press w to toggle Watch Mode without opening the menu — the dashboard and serve screens reflect the state (Watch Mode: ENABLED/DISABLED).

Diagnostics → Next Action

The Diagnostics drawer (d) is not a dead end — each finding links to the next CLI action:

Warnings from the build (frontmatter fallback to raw markdown, case-only collision notices) are propagated into the drawer as warning entries with Next: hints and appear in View as Next: <hint> beneath each diagnostic plus Source: and Action: guidance.

Mascot Integration

Keep an eye out for Jules! The TUI integrates ASCII graphics of the project’s mascot to make long-running tasks (like serving the site locally) more enjoyable.