Terraphim TUI Features
This document provides a comprehensive overview of all features available in the Terraphim Terminal User Interface.
Table of Contents
- Interactive REPL
- VM Management
- Web Operations
- File Operations
- AI Chat Integration
- Knowledge Graph
- Configuration Management
- MCP Tools Integration
Interactive REPL
The Terraphim TUI provides a powerful REPL (Read-Eval-Print Loop) that gives you access to all functionality through an intuitive command interface.
Starting the REPL
REPL Features
- Smart Autocompletion: Context-aware command suggestions
- Syntax Highlighting: Color-coded commands and output
- Command History: Navigate through previous commands
- Error Handling: Clear error messages and suggestions
- Progress Indicators: Real-time feedback for long-running operations
REPL Commands Reference
# Navigation and Help
# Search and Discovery
VM Management
Manage Firecracker virtual machines for secure, isolated operations.
Prerequisites
- Linux with KVM support
- Firecracker binary installed
- Proper permissions for
/dev/kvm
VM Commands
# VM Lifecycle Management
# VM Monitoring
# VM Pool Management
VM Features
- Isolated Execution: Complete sandboxing for security
- Resource Management: CPU, memory, storage allocation
- Network Isolation: Separate network namespaces
- Snapshot Support: Save and restore VM states
- Performance Monitoring: Real-time metrics and health checks
Web Operations
Perform web operations through secure VM isolation.
Web Commands
# HTTP Requests
# Headers and Authentication
# Web Scraping
# Screenshots and PDFs
# Form Interactions
# API Exploration
# Operation Management
# Configuration
Web Operation Features
- VM Sandboxing: All requests run in isolated microVMs
- Multiple HTTP Methods: GET, POST, PUT, DELETE, PATCH
- Authentication Support: Basic auth, Bearer tokens, API keys
- Content Handling: JSON, XML, form data, file uploads
- Media Capture: Screenshots, PDFs, image extraction
- Operation Tracking: History, status, retry, cancellation
File Operations
Intelligent file operations with semantic understanding and analysis.
File Commands
# Semantic File Search
# Content Classification
# Content Analysis
# Content Summarization
# Metadata Extraction
# File Indexing
# Pattern Finding
# Smart File Listing
# Semantic Tagging
# File Suggestions
# Operation Status
File Operation Features
- Semantic Search: Understanding of content meaning, not just text matching
- Content Classification: Automatic detection of file types, languages, frameworks
- Metadata Extraction: Concepts, entities, keywords, complexity metrics
- Relationship Discovery: Find related files based on content similarity
- Smart Tagging: Automatic tag suggestions based on content analysis
- Performance Analysis: Reading time estimation and complexity scoring
Supported File Types
- Code: Rust, JavaScript, Python, Go, Java, C++, etc.
- Documentation: Markdown, HTML, LaTeX, Text
- Configuration: JSON, YAML, TOML, XML, INI
- Data: CSV, JSON Lines, Parquet, SQLite
- Media: Images (PNG, JPG, SVG), Videos, Audio
- Archives: ZIP, TAR, GZ, 7Z, RAR
- Scripts: Shell, Batch, PowerShell, Python scripts
AI Chat Integration
Conversational AI integration with multiple model providers.
Chat Commands
# Basic Chat
# Context-Aware Chat
# Role-Based Chat
# Model Selection
# Advanced Chat Features
AI Providers
- OpenRouter: Claude, GPT-4, Llama, and more (requires
OPENROUTER_KEY) - Ollama: Local models like Llama3, Mistral (requires
OLLAMA_BASE_URL)
Chat Features
- Context Awareness: Uses provided files and directories as context
- Role-Based Responses: Tailored responses based on selected role
- History Management: Conversation history and session persistence
- Multi-Model Support: Switch between different AI models
- Streaming Responses: Real-time response streaming (planned)
Knowledge Graph
Interactive visualization and navigation of the rolegraph knowledge structure.
Graph Commands
# Basic Graph Visualization
# Graph Analysis
# Graph Export
Graph Features
- Interactive Visualization: ASCII art representation of knowledge graphs
- Role-Based Views: Different knowledge graphs for different roles
- Path Finding: Discover connections between concepts
- Cluster Analysis: Identify related concept groups
- Export Capabilities: Export graphs in various formats
Configuration Management
Real-time configuration and role management.
Configuration Commands
# Role Management
# Configuration Display
# Configuration Updates
# Configuration Export/Import
Configuration Features
- Role Switching: Dynamic role changes during runtime
- Real-Time Updates: Configuration changes take effect immediately
- Validation: Configuration validation and error reporting
- Import/Export: Backup and restore configurations
- Templates: Role configuration templates
MCP Tools Integration
Model Context Protocol integration for extended tool capabilities.
MCP Commands
# MCP Connection
# Tool Execution
# MCP Configuration
MCP Features
- Tool Discovery: Automatic tool discovery and registration
- Secure Communication: Encrypted communication with MCP servers
- Tool Execution: Execute remote tools with local context
- Authentication: Secure authentication with MCP servers
Advanced Usage Patterns
Workflow Automation
# Code Review Workflow
Security Analysis
# Security Review Workflow
Documentation Generation
# Documentation Workflow
Integration Examples
CI/CD Pipeline Integration
#!/bin/bash
# Build pipeline with TUI integration
# Analyze changes
# Generate release notes
# Security scan
Development Workflow Integration
#!/bin/bash
# Development helper script
# Code analysis
# Documentation
# Testing
Performance Considerations
- VM Operations: Allow 10-30 seconds for VM startup/shutdown
- File Indexing: Initial indexing may take time for large repositories
- Web Operations: Configure timeouts based on network conditions
- Memory Usage: Monitor memory usage during large file operations
- Disk Space: Ensure sufficient space for VM images and file indexes
Troubleshooting
Common Issues
- VM operations fail: Check KVM permissions and Firecracker installation
- Web operations timeout: Increase
WEB_OPERATION_TIMEOUT - File operations slow: Consider limiting scope or using filters
- Chat not working: Verify API keys and server feature flags
Debug Mode
# Enable debug logging
# Check feature availability
For more detailed troubleshooting, see the main TUI documentation.