S
README.md
π LaxyFile - Advanced Terminal File Manager
A beautiful, AI-powered terminal file manager inspired by Superfile with advanced media support and intelligent automation
β¨ Features
π¨ Beautiful Interface
- 5 Gorgeous Themes: Cappuccino (default), Neon, Ocean, Sunset, Forest
- Modern UI: Rounded borders, colorful file listings, beautiful header with rainbow gradient
- Smart Icons: File type icons for 50+ formats with Unicode support
- Dual-Pane: Side-by-side directory browsing with preview panel
- Responsive: Adapts to terminal size with optimal layout
π€ AI Assistant (Powered by Kimi AI)
- Complete System Analysis: Monitor devices, processes, storage, and network
- Intelligent File Organization: AI suggests optimal directory structures and file management
- Security Audits: Vulnerability detection, permission analysis, suspicious file identification
- Performance Optimization: Storage cleanup, resource monitoring, speed improvements
- Video & Media Analysis: Metadata extraction, encoding details, organization suggestions
- Duplicate Detection: Smart file comparison and cleanup recommendations
- Content Analysis: Read and understand file contents for better suggestions
- Real-time Insights: Instant analysis and actionable recommendations
π Advanced File Management
- Smart Operations: Copy, move, delete, rename with progress feedback
- Multi-Selection: Select multiple files with visual indicators
- Quick Navigation: Vim-style (hjkl) + arrow keys, instant directory jumping
- Hidden Files: Toggle visibility with smart filtering
- File Operations: Create directories, batch operations, trash support
π¬ Media & Content Viewing
- Image Support: ASCII art conversion with color preservation, metadata display
- Video Analysis: Thumbnail generation, metadata extraction, format details
- Code Highlighting: Syntax highlighting for 100+ programming languages
- Preview Panel: Real-time file preview with smart content detection
- Terminal Graphics: Sixel, Kitty, iTerm2 support for high-quality images
β‘ Performance & Usability
- Fast Navigation: Instant directory switching, efficient file loading
- Session Memory: Remember last directories and settings
- Configurable: YAML configuration with extensive customization
- Error Handling: Graceful failure recovery, comprehensive logging
- Cross-Platform: Linux, macOS, Windows support
π οΈ Installation
Quick Install
# Clone the repository
git clone https://github.com/yourusername/laxyfile.git
cd laxyfile
# Install dependencies
pip install -r requirements.txt
# Run LaxyFile
python run_laxyfile.py
Dependencies
# Core dependencies (required)
pip install rich pydantic PyYAML Pillow opencv-python pygments
# AI features (recommended)
pip install openai psutil python-magic requests aiofiles
π€ AI Setup (Free!)
1. Get OpenRouter API Key
- Visit https://openrouter.ai/
- Create a free account
- Get your API key (free tier includes Kimi AI model)
2. Configure Environment
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export OPENROUTER_API_KEY="your-api-key-here"
# Reload your shell
source ~/.bashrc
3. Verify AI Setup
# Launch LaxyFile
python run_laxyfile.py
# Look for: "π€ AI Assistant: Ready with Kimi AI model"
π― Usage
Basic Navigation
- hjkl or Arrow Keys: Navigate files
- Tab: Switch between panels
- Enter: Open file/directory
- Space: Select/deselect files
- g/G: Jump to top/bottom
File Operations
- c: Copy selected files
- m: Move selected files
- d: Delete files
- r: Rename file
- n: New directory
- v: View file with media viewer
- e: Edit file
π€ AI Features
- i: Open AI Assistant menu
- F9: Quick AI analysis of current directory
AI Assistant Menu Options:
- π¬ Chat: Ask AI anything about your files
- π System Analysis: Complete device and file analysis
- π File Organization: Smart organization suggestions
- π Security Audit: Vulnerability and security analysis
- β‘ Performance: Optimization recommendations
- π¬ Video Analysis: Media file analysis and optimization
- π Duplicates: Find and manage duplicate files
- πΈ Media Organization: Organize photos and videos intelligently
- πΎ Backup Strategy: Intelligent backup recommendations
Themes & UI
- t: Cycle through themes
- F1-F5: Set specific theme (Cappuccino, Neon, Ocean, Sunset, Forest)
- p: Toggle preview panel
- .: Toggle hidden files
Quick Navigation
- ~: Go to home directory
- /: Go to root directory
- ?: Show help
π¨ Themes
π€ Cappuccino (Default)
Warm browns and golden colors for a cozy coding experience
π Neon
Bright electric colors with high contrast
π Ocean
Cool blues and teals for a calming experience
π Sunset
Warm oranges and reds for vibrant browsing
π² Forest
Natural greens and earth tones
π§ Configuration
Create ~/.config/laxyfile/config.yaml:
# AI Configuration
ai:
enabled: true
provider: "openrouter"
model: "moonshotai/kimi-dev-72b:free"
max_tokens: 4000
enable_content_analysis: true
enable_device_monitoring: true
# Theme and UI
theme:
name: "cappuccino"
use_icons: true
ui:
preview_pane: true
refresh_rate: 30
# Keyboard shortcuts
hotkeys:
ai_assistant: ["i"]
quick_ai_analysis: ["F9"]
See example_config.yaml for complete configuration options.
π AI Examples
System Analysis
π€ AI analyzing your system...
π SYSTEM OVERVIEW:
β’ CPU: Intel i7 (8 cores) - 15% usage
β’ Memory: 16GB (45% used)
β’ Storage: 512GB SSD (78% full)
β’ Network: Connected, 50+ Mbps
π DIRECTORY ANALYSIS:
β’ 1,247 files across 89 directories
β’ Top types: .js (234), .py (156), .jpg (89)
β’ Large files: video.mp4 (2.1GB), dataset.csv (456MB)
π RECOMMENDATIONS:
β’ Clean up old videos to free 3.2GB space
β’ Archive old project files to external storage
β’ Consider organizing code files by project
β’ Update system packages for security
Smart File Organization
π€ Analyzing file structure...
π CURRENT STRUCTURE:
Downloads/
βββ 234 mixed files (docs, images, code)
βββ No clear organization pattern
βββ 15 duplicate files detected
β¨ RECOMMENDED STRUCTURE:
Downloads/
βββ Documents/
β βββ PDFs/
β βββ Spreadsheets/
βββ Media/
β βββ Images/2024/
β βββ Videos/
βββ Code/
β βββ Python/
β βββ JavaScript/
βββ Archive/old_files/
π― ACTIONS:
1. Move 89 images to Media/Images/2024/
2. Organize 45 documents by type
3. Remove 15 duplicate files (saves 234MB)
4. Archive files older than 1 year
Security Audit
π SECURITY ANALYSIS:
β οΈ VULNERABILITIES FOUND:
β’ 3 executable files with 777 permissions
β’ 12 hidden files in system directories
β’ 1 suspicious .exe file detected
β’ Weak permissions on SSH keys
π‘οΈ RECOMMENDATIONS:
β’ Fix file permissions: chmod 644 suspicious_files
β’ Review hidden files for malware
β’ Move executables to secure location
β’ Strengthen SSH key permissions (600)
β’ Enable firewall for additional protection
π MONITORING:
β’ No active suspicious processes
β’ Network connections appear normal
β’ File integrity checks passed
π¬ Video Features
LaxyFile includes advanced video analysis capabilities:
- Format Detection: Automatically identify video codecs and containers
- Metadata Extraction: Resolution, framerate, duration, bitrate
- Thumbnail Generation: Preview frames for quick identification
- Quality Analysis: Bitrate analysis and compression recommendations
- Organization: Smart sorting by resolution, date, or quality
- Conversion Suggestions: AI recommends optimal formats for different uses
π System Requirements
- Python: 3.8 or higher
- Terminal: Any modern terminal with color support
- OS: Linux, macOS, Windows (with proper terminal)
- Memory: 256MB+ RAM
- Storage: 50MB+ free space
Recommended
- Terminal: Kitty, iTerm2, or modern terminal with truecolor support
- Size: 120x30 characters or larger
- Fonts: Nerd Fonts or Unicode-compatible monospace font
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Development Setup
git clone https://github.com/yourusername/laxyfile.git
cd laxyfile
pip install -r requirements.txt
python run_laxyfile.py
π License
MIT License - see LICENSE file for details.
π Acknowledgments
- Superfile: Inspiration for the beautiful terminal interface
- Rich: Amazing terminal rendering library
- OpenRouter: AI API platform providing access to Kimi AI
- Kimi AI: Powerful language model for intelligent file analysis
π Troubleshooting
AI Not Working?
# Check API key
echo $OPENROUTER_API_KEY
# Verify dependencies
pip install openai psutil python-magic
# Test connection
python -c "import openai; print('OpenAI client available')"
Display Issues?
# Set terminal variables
export TERM="xterm-256color"
export COLORTERM="truecolor"
# Resize terminal to 120x30 or larger
Permission Errors?
# Check file permissions
ls -la laxyfile/
# Fix if needed
chmod +x run_laxyfile.py
Experience the future of terminal file management! π