flow-tui
Beautiful terminal-based user interface for feature management, built with Ratatui and Crossterm.
What it does
flow-tui is a full-screen terminal application that turns your command line into an interactive dashboard. Think of it like Spotify's terminal interface or htop, but for managing features and tasks.
Instead of opening a web browser, you get a native terminal experience with:
- Kanban board with drag-and-drop feel (keyboard navigation)
- Dependency graph visualization (ASCII art)
- Live agent status showing what multiple AI agents are working on
- Event logs showing real-time updates
- Responsive layout that adapts to your terminal size
It's perfect for developers who live in the terminal and want to stay in their flow state.
Architecture
flow-tui/
├── main.rs - Entry point and event loop
├── lib.rs - Module exports
├── app.rs - Application state and logic
├── theme.rs - Color schemes and styling
├── input.rs - Keyboard event handling
└── views/
├── mod.rs - View organization
├── kanban.rs - Kanban board view
├── agents.rs - Agent status view
├── logs.rs - Event log view
├── graph.rs - Dependency graph view
└── help.rs - Help screen
View Architecture
Terminal Screen
↓
Current View (Kanban, Agents, Logs, Graph)
↓
Ratatui Widgets (Table, Block, Paragraph)
↓
Theme Colors (Dark, Light, Solarized)
Usage
Running the TUI
# Build and run
# Or install and run
Keyboard Controls
Global Controls:
?- Toggle help screenqorCtrl+C- Quit applicationTab- Cycle through views1- Switch to Kanban view2- Switch to Agents view3- Switch to Logs view4- Switch to Graph viewt- Cycle through themes
Navigation:
jorDown- Move selection downkorUp- Move selection upPageDown- Scroll down one pagePageUp- Scroll up one pageHome- Go to topEnd- Go to bottom
Kanban View:
Enter- View feature detailsSpace- Toggle feature statusd- Mark as donei- Mark in progressf- Mark as failing
Graph View:
+- Zoom in-- Zoom out- Arrow keys - Pan around
Views
Kanban Board
┌─ Kanban View ────────────────────────────────────┐
│ │
│ BACKLOG IN PROGRESS DONE │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Feature 1│ │ Feature 3│ │ Feature 5│ │
│ │ ⚡ High │ │ 🔄 50% │ │ ✓ │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Feature 2│ │ Feature 4│ │ Feature 6│ │
│ │ ⬇️ 1 dep │ │ ⬇️ 2 dep│ │ ✓ │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
└───────────────────────────────────────────────────┘
Features organized by status:
- Backlog: Not started
- In Progress: Currently being worked on
- Done: Completed and passing
Agent Status
┌─ Agent Status ───────────────────────────────────┐
│ │
│ AGENT STATUS TASK UPTIME │
│ ─────────────────────────────────────────────── │
│ 🤖 claude Working OAuth impl 2h 15m │
│ 🤖 codex Idle - 1h 45m │
│ 🤖 gemini Working UI tests 0h 30m │
│ │
│ Throughput: 3.2 tasks/hour │
│ Active: 2/3 agents │
│ │
└───────────────────────────────────────────────────┘
Real-time monitoring of AI agent activity.
Logs View
┌─ Event Logs ─────────────────────────────────────┐
│ │
│ 14:23:45 [INFO] Feature #42 marked as passing │
│ 14:23:40 [WARN] Feature #12 has failing tests │
│ 14:23:35 [INFO] Agent 'claude' claimed task 15 │
│ 14:23:30 [INFO] 3 new features created │
│ 14:23:25 [DEBUG] Database backup completed │
│ │
│ [Auto-scroll: ON] [Filter: ALL] │
│ │
└───────────────────────────────────────────────────┘
Scrollable event history with filtering.
Dependency Graph
┌─ Dependency Graph ───────────────────────────────┐
│ │
│ [1] Auth │
│ ├─> [2] Login UI │
│ │ └─> [5] Dashboard │
│ └─> [3] Rate Limiting │
│ └─> [4] Tests │
│ │
│ Legend: ✓ Done 🔄 In Progress ⚠️ Blocked │
│ │
└───────────────────────────────────────────────────┘
ASCII visualization of feature dependencies.
Themes
Built-in Themes
Theme Cycling
Press t to cycle through themes:
- Dark → Light → Solarized → Monokai → Nord → Dark
Custom Theme Colors
// Example: Create custom theme
let custom_theme = TuiTheme ;
Responsive Layout
The TUI automatically adapts to your terminal size:
Full Layout (≥120 columns)
┌───────────────────────────────────────────────────┐
│ Header with stats and navigation tabs │
├───────────────────────────────────────────────────┤
│ Sidebar │ Main Content Area (Kanban/Logs) │
│ - Stats │ │
│ - Filters │ │
│ - Actions │ │
└───────────────────────────────────────────────────┘
Compact Layout (80-119 columns)
┌────────────────────────────────┐
│ Header │
├────────────────────────────────┤
│ Main Content (full width) │
│ │
│ Stats shown in header │
└────────────────────────────────┘
Mobile Layout (<80 columns)
┌──────────────┐
│ Header │
├──────────────┤
│ Content │
│ (minimal) │
│ │
└──────────────┘
Integration with Database
use App;
use Database;
async
Code Example: Custom View
use ;
use crateApp;
Event Loop
The TUI uses a hybrid event-driven architecture:
use ;
use Terminal;
use Duration;
pub async
Performance
- Render time: ~2-5ms per frame
- Input latency: <10ms
- Memory usage: ~5MB for 1000 features
- Supports: Up to 10,000 features before noticeable lag
Optimization Tips
// Use double-buffering (built into Ratatui)
// Only redraw on changes
if app.needs_redraw
// Limit log history
if app.log_messages.len > 100
// Virtualize large lists (only render visible items)
let visible_range = app.scroll_offset..;
let visible_features = &app.features;
Testing
# Run TUI tests
# Run with test TUI backend (doesn't require terminal)
# Manual testing in isolated terminal
Integration Testing
use TestBackend;
use Terminal;
API Reference
App Methods
| Method | Description |
|---|---|
App::new() |
Create new app with default state |
app.render(frame) |
Render current view to terminal |
app.handle_key(key) |
Process keyboard input, returns true if quitting |
app.resize(width, height) |
Handle terminal resize |
app.add_log(message) |
Add message to event log |
app.load_demo_data() |
Load sample features for testing |
View Enum
Layout Modes
Troubleshooting
Terminal rendering issues
# Set TERM variable
# Clear screen
# Reset terminal state
Colors not working
// Check terminal color support
if is_tty else
Cursor remains visible
The TUI automatically hides the cursor on startup and restores it on exit. If it doesn't, run:
Related Crates
- flow-core: Feature and Task types
- flow-db: Database backend for features
- flow-server: Web server alternative
- Ratatui: Terminal UI library (docs)
- Crossterm: Cross-platform terminal manipulation (docs)