/ laxyfile / README.md
swadhin biswas Update on working process Β· 7/28/2025
f1cf876
379 lines Β· 10.1 KB
Raw Download

πŸš€ LaxyFile - Advanced Terminal File Manager

Tests
codecov
PyPI version
Python 3.8+
License: MIT

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

  1. Visit https://openrouter.ai/
  2. Create a free account
  3. 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:

  1. πŸ’¬ Chat: Ask AI anything about your files
  2. πŸ” System Analysis: Complete device and file analysis
  3. πŸ“ File Organization: Smart organization suggestions
  4. πŸ”’ Security Audit: Vulnerability and security analysis
  5. ⚑ Performance: Optimization recommendations
  6. 🎬 Video Analysis: Media file analysis and optimization
  7. πŸ”„ Duplicates: Find and manage duplicate files
  8. πŸ“Έ Media Organization: Organize photos and videos intelligently
  9. πŸ’Ύ 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! πŸš€