Code-Mesh TUI ๐ฅ๏ธโจ
Interactive Terminal User Interface for the Code-Mesh distributed swarm intelligence system.
Code-Mesh TUI provides a beautiful, feature-rich terminal interface to visualize, monitor, and control your Code-Mesh swarms in real-time. Experience the power of distributed computing through an intuitive, responsive interface.
๐ Features
๐จ Beautiful Interface
- Modern Design: Clean, intuitive interface with customizable themes
- Real-time Updates: Live monitoring with smooth animations
- Responsive Layout: Adapts to any terminal size
- Syntax Highlighting: Code display with language-aware highlighting
๐ Visual Monitoring
- Swarm Topology Visualization: Interactive network graphs of agent relationships
- Performance Dashboards: Real-time metrics with charts and graphs
- Agent Status Display: Live status updates for all active agents
- Task Progress Tracking: Visual progress bars and completion indicators
๐ฎ Interactive Controls
- Command Palette: Quick access to all functions with fuzzy search
- Keyboard Shortcuts: Efficient navigation and control
- Mouse Support: Click and scroll support where available
- Multi-panel Layout: Split views for monitoring multiple aspects simultaneously
๐ง Neural Intelligence Visualization
- Neural Network Display: Visual representation of agent neural networks
- Learning Progress: Real-time learning metrics and pattern recognition
- Cognitive Pattern Visualization: See how different thinking patterns work
- Cross-Agent Communication: Visualize message passing between agents
๐ Installation
From Crates.io
From Source
As a Library
Add this to your Cargo.toml:
[]
= "0.1"
๐ Quick Start
Launch the TUI
# Start with default settings
# Start with specific configuration
# Connect to remote Code-Mesh instance
# Start in specific mode
Basic Navigation
Tab / Shift+Tab - Navigate between panels
Ctrl+P - Open command palette
Ctrl+Q - Quit application
? - Show help
Space - Toggle pause/resume
F5 - Refresh data
๐จ Interface Overview
Main Dashboard
โโ Code-Mesh TUI v0.1.0 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โก Swarm: mesh-001 โ ๐ง Agents: 5/8 โ ๐ CPU: 45% โ ๐พ RAM: 2.1GB โ โ Net โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโ Swarm Topology โโโโโโโโโโโโโโ โโ Performance Metrics โโโโโโโโโโโโโโโโโโโโ
โ โ โ โ CPU Usage โโโโโโโโโโโ 89% โโ
โ โ [R1]โโโโ[C1] โ โ Memory Usage โโโโโโโโโโโ 67% โโ
โ โ โ โ โ โ Neural Ops/sec โโโโโโโโโโ 85% โโ
โ โ [A1]โโโโ[O1] โ โ Network I/O โโโโโโโโโโ 59% โโ
โ โ โ โ โ โ โโ
โ โ [A2]โโโโ[C2] โ โ โโ Recent Tasks โโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ โ โ โ Code analysis (2.3s) โโโ
โ โ Legend: โ โ โ โณ Optimization (45% done) โโโ
โ โ [R] Researcher [C] Coder โ โ โ โธ Documentation (paused) โโโ
โ โ [A] Analyst [O] Optimizerโ โ โ โ Testing (queued) โโโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ โโ Agent Details โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Agent ID: researcher-001 Status: โก Active โโ
โ โ Type: Researcher Uptime: 2h 15m 33s โโ
โ โ Cognitive Pattern: Adaptive Tasks: 12 completed โโ
โ โ Neural Network: nn-1752.. Success Rate: 98.3% โโ
โ โ โโ
โ โ Current Task: "Analyze codebase structure and dependencies" โโ
โ โ Progress: โโโโโโโโโโโโโโโโโโโโ 78% โโ
โ โ ETA: 45 seconds โโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Available Views
1. Dashboard View (Default)
- Overview of entire swarm
- Key performance metrics
- Active task monitoring
- Agent status summary
2. Swarm View
- Detailed swarm topology visualization
- Agent relationships and communication flows
- Network health and connectivity status
- Real-time topology optimization
3. Agent View
- Individual agent details
- Neural network visualization
- Performance metrics per agent
- Task history and success rates
4. Task View
- Task queue and execution status
- Detailed progress tracking
- Task results and outputs
- Performance analytics
5. Neural View
- Neural network architecture display
- Learning progress visualization
- Pattern recognition results
- Cross-agent knowledge sharing
6. Performance View
- Comprehensive system metrics
- Resource utilization graphs
- Performance trends and analytics
- Bottleneck identification
โจ๏ธ Keyboard Shortcuts
Global Shortcuts
| Key | Action |
|---|---|
Ctrl+Q |
Quit application |
Ctrl+P |
Open command palette |
Tab / Shift+Tab |
Navigate panels |
? |
Show help |
F5 |
Refresh data |
Space |
Pause/Resume updates |
Ctrl+R |
Reset view |
View-Specific Shortcuts
Dashboard View
| Key | Action |
|---|---|
1-6 |
Switch to specific view |
Enter |
View details of selected item |
D |
Toggle detailed mode |
Swarm View
| Key | Action |
|---|---|
+/- |
Zoom in/out |
Arrow Keys |
Pan around topology |
S |
Save topology layout |
R |
Reset layout |
Agent View
| Key | Action |
|---|---|
Up/Down |
Select agent |
Enter |
View agent details |
K |
Kill selected agent |
M |
Send message to agent |
Task View
| Key | Action |
|---|---|
Up/Down |
Select task |
Enter |
View task details |
C |
Cancel selected task |
N |
Create new task |
๐จ Themes and Customization
Built-in Themes
# Dark theme (default)
# Light theme
# High contrast
# Cyberpunk theme
# Minimalist theme
Custom Theme Configuration
Create ~/.config/code-mesh/tui-theme.toml:
[]
= "#1e1e1e"
= "#d4d4d4"
= "#007acc"
= "#ff6b6b"
= "#4ade80"
= "#facc15"
= "#ef4444"
= "#a855f7"
[]
= "rounded" # rounded, sharp, double, thick
= "primary"
[]
= "primary"
= "secondary"
= "foreground"
Layout Customization
[]
= true
= 1
= 3
= 2
[]
= { = 0, = 0, = 50, = 60 }
= { = 50, = 0, = 50, = 30 }
= { = 50, = 30, = 50, = 30 }
= { = 0, = 60, = 100, = 40 }
๐ง Configuration
Configuration File (~/.config/code-mesh/tui-config.toml)
[]
= "dark"
= 1000 # milliseconds
= true
= true
[]
= 60
= 1000
= true
[]
= 5000
= 3
= 30
[]
= true
= false
= true
= false
[]
= "Ctrl+Q"
= "?"
= "F5"
= "Ctrl+P"
๐ Advanced Usage
Embedding in Applications
use ;
use CodeMesh;
async
Custom Views
use ;
// Register custom view
tui.register_view;
Remote Monitoring
# Start Code-Mesh server with TUI endpoint
# Connect TUI to remote instance
# SSH tunnel for secure connection
๐ฏ Performance Optimization
For Large Swarms (10+ agents)
[]
# Reduce refresh rate for better performance
= 2000
= 30
# Limit data retention
= 500
= 100
# Disable expensive features
= false
= false
For Resource-Constrained Systems
[]
# Use minimal theme
= "minimal"
= false
[]
# Disable non-essential features
= false
= false
= false
๐ Troubleshooting
Common Issues
Issue: TUI doesn't display correctly Solution: Ensure terminal supports 256 colors and Unicode
Issue: High CPU usage Solution: Increase refresh_rate in config (e.g., 2000ms)
Issue: Connection timeouts Solution: Check network connectivity and increase connection_timeout
Issue: Garbled display
Solution: Try --theme minimal or disable Unicode
Debug Mode
# Enable debug logging
# Run with debug output
# Capture screen output
๐ Documentation
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
๐ License
This project is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
๐จโ๐ป Creator
Created by ruv - Innovator in AI-driven development tools and distributed systems.
Repository: github.com/ruvnet/code-mesh
Code-Mesh TUI - Visualize Your Swarm Intelligence ๐ฅ๏ธโจ
Beautiful, interactive terminal interface for distributed computing