| Crates.io | code-mesh-tui |
| lib.rs | code-mesh-tui |
| version | 0.1.0 |
| created_at | 2025-07-16 15:18:36.886842+00 |
| updated_at | 2025-07-16 15:18:36.886842+00 |
| description | Interactive Terminal User Interface for the Code-Mesh distributed swarm intelligence system |
| homepage | https://github.com/ruvnet/code-mesh |
| repository | https://github.com/ruvnet/code-mesh |
| max_upload_size | |
| id | 1755643 |
| size | 265,403 |
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.
cargo install code-mesh-tui
git clone https://github.com/ruvnet/code-mesh
cd code-mesh
cargo install --path crates/code-mesh-tui
Add this to your Cargo.toml:
[dependencies]
code-mesh-tui = "0.1"
# Start with default settings
code-mesh-tui
# Start with specific configuration
code-mesh-tui --config ~/.config/code-mesh/tui-config.toml
# Connect to remote Code-Mesh instance
code-mesh-tui --connect ws://localhost:8080
# Start in specific mode
code-mesh-tui --mode monitor
Tab / Shift+Tab - Navigate between panels
Ctrl+P - Open command palette
Ctrl+Q - Quit application
? - Show help
Space - Toggle pause/resume
F5 - Refresh data
โโ 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 โโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| 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 |
| Key | Action |
|---|---|
1-6 |
Switch to specific view |
Enter |
View details of selected item |
D |
Toggle detailed mode |
| Key | Action |
|---|---|
+/- |
Zoom in/out |
Arrow Keys |
Pan around topology |
S |
Save topology layout |
R |
Reset layout |
| Key | Action |
|---|---|
Up/Down |
Select agent |
Enter |
View agent details |
K |
Kill selected agent |
M |
Send message to agent |
| Key | Action |
|---|---|
Up/Down |
Select task |
Enter |
View task details |
C |
Cancel selected task |
N |
Create new task |
# Dark theme (default)
code-mesh-tui --theme dark
# Light theme
code-mesh-tui --theme light
# High contrast
code-mesh-tui --theme high-contrast
# Cyberpunk theme
code-mesh-tui --theme cyberpunk
# Minimalist theme
code-mesh-tui --theme minimal
Create ~/.config/code-mesh/tui-theme.toml:
[colors]
background = "#1e1e1e"
foreground = "#d4d4d4"
primary = "#007acc"
secondary = "#ff6b6b"
success = "#4ade80"
warning = "#facc15"
error = "#ef4444"
accent = "#a855f7"
[borders]
style = "rounded" # rounded, sharp, double, thick
color = "primary"
[graphs]
line_color = "primary"
fill_color = "secondary"
grid_color = "foreground"
[layout]
show_borders = true
panel_spacing = 1
header_height = 3
footer_height = 2
[panels]
swarm_topology = { x = 0, y = 0, width = 50, height = 60 }
performance_metrics = { x = 50, y = 0, width = 50, height = 30 }
task_list = { x = 50, y = 30, width = 50, height = 30 }
agent_details = { x = 0, y = 60, width = 100, height = 40 }
~/.config/code-mesh/tui-config.toml)[display]
theme = "dark"
refresh_rate = 1000 # milliseconds
enable_mouse = true
enable_unicode = true
[performance]
max_fps = 60
buffer_size = 1000
enable_vsync = true
[networking]
connection_timeout = 5000
retry_attempts = 3
keepalive_interval = 30
[features]
enable_neural_viz = true
enable_audio_alerts = false
enable_notifications = true
show_debug_info = false
[keybindings]
quit = "Ctrl+Q"
help = "?"
refresh = "F5"
command_palette = "Ctrl+P"
use code_mesh_tui::{TuiApp, TuiConfig};
use code_mesh_core::CodeMesh;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize Code-Mesh core
let mesh = CodeMesh::new().await?;
// Configure TUI
let config = TuiConfig::default()
.with_theme("cyberpunk")
.with_refresh_rate(500)
.with_mouse_support(true);
// Create and run TUI
let mut tui = TuiApp::new(mesh, config).await?;
tui.run().await?;
Ok(())
}
use code_mesh_tui::{View, ViewContext, RenderResult};
struct CustomMetricsView {
data: Vec<Metric>,
}
impl View for CustomMetricsView {
fn render(&mut self, ctx: &ViewContext) -> RenderResult {
// Custom rendering logic
Ok(())
}
fn handle_input(&mut self, input: InputEvent) -> bool {
// Custom input handling
false
}
}
// Register custom view
tui.register_view("custom_metrics", Box::new(CustomMetricsView::new()));
# Start Code-Mesh server with TUI endpoint
code-mesh serve --tui-port 8080
# Connect TUI to remote instance
code-mesh-tui --connect ws://remote-server:8080
# SSH tunnel for secure connection
ssh -L 8080:localhost:8080 remote-server
code-mesh-tui --connect ws://localhost:8080
[performance]
# Reduce refresh rate for better performance
refresh_rate = 2000
max_fps = 30
# Limit data retention
buffer_size = 500
max_history = 100
# Disable expensive features
enable_neural_viz = false
show_topology_animation = false
[display]
# Use minimal theme
theme = "minimal"
enable_unicode = false
[features]
# Disable non-essential features
enable_audio_alerts = false
enable_notifications = false
show_debug_info = false
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
# Enable debug logging
export CODE_MESH_TUI_LOG=debug
# Run with debug output
code-mesh-tui --debug 2>debug.log
# Capture screen output
code-mesh-tui --capture-output tui-output.txt
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under either of
at your option.
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