A modern, fast, and intuitive terminal user interface for managing LXC/LXD containers. Built with Rust and designed for developers who prefer command-line workflows.
- π Fast & Responsive - Async operations with real-time updates
- π± Modern TUI - Clean, intuitive interface built with Ratatui
- π Real-time Operations - Live progress tracking for container operations
- β¨οΈ Keyboard-first - Vim-style navigation with intuitive shortcuts
- π― Smart Actions - Context-aware operations (start/stop toggle)
- π Operation Monitoring - Track running operations with detailed status
- π‘οΈ Robust Error Handling - Graceful error handling with retry logic
- π Container Overview - View status, resource usage, and details at a glance
cargo install lxtuigit clone https://github.com/yourusername/lxtui.git
cd lxtui
cargo build --release
sudo cp target/release/lxtui /usr/local/bin/yay -S lxtui# Will be available via apt once published-
Ensure LXD is installed and running:
# Ubuntu/Debian sudo apt install lxd sudo lxd init # Arch Linux sudo pacman -S lxd sudo lxd init
-
Add your user to the lxd group:
sudo usermod -a -G lxd $USER newgrp lxd -
Run LXTUI:
lxtui
- β/β or j/k - Navigate containers
- Enter - Open container actions menu
- Space - Open system menu
- s - Start selected container (quick action)
- S - Stop selected container (quick action)
- d - Delete selected container (quick action)
- n - Create new container
- r/R - Refresh container list
- o/O - Toggle operations sidebar
- ?/h - Show help
- q/Q - Quit
- Enter - Smart action (Start if stopped, Stop if running)
- 1 - Start container
- 2 - Stop container
- 3 - Restart container
- 4 - Delete container
- 5 - Clone container
- e - Execute shell (container must be running)
- Esc - Close menu
- 1/r - Refresh container list
- 2/l - Check/start LXD service
- 3/n - Create new container
- 4/o - Toggle operations sidebar
- 5/h - Show help
- 6/q - Quit application
- Esc - Close menu
For complete keybindings, see KEYBINDINGS.md.
- Operating System: Linux (Ubuntu 20.04+, Debian 11+, Arch Linux, Fedora 35+)
- LXD Version: 4.0+ (5.0+ recommended)
- Terminal: Any modern terminal emulator with 256+ colors
- Memory: ~10MB RAM
- Storage: ~15MB disk space
LXTUI works out of the box with standard LXD installations. Configuration options:
-
RUST_LOG- Set logging level (off,error,warn,info,debug,trace)RUST_LOG=debug lxtui # Enable debug logging -
LXD_SOCKET- Custom LXD socket path (defaults to/var/lib/lxd/unix.socket)LXD_SOCKET=/custom/path/unix.socket lxtui
LXTUI supports LXD remote servers. Configure remotes using the LXD client:
lxc remote add myserver https://server.example.com:8443
lxtui --remote myserverLXTUI is built with a modern async architecture:
- Frontend: Ratatui for the terminal UI
- Backend: Tokio async runtime
- LXD Communication: RESTful API over Unix sockets
- State Management: Centralized app state with real-time updates
- Error Handling: Comprehensive error types with retry logic
src/app.rs- Main application state and logicsrc/ui.rs- Terminal UI renderingsrc/lxd_api.rs- LXD API client and operationssrc/lxc.rs- Container management and state tracking
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
-
Clone the repository:
git clone https://github.com/yourusername/lxtui.git cd lxtui -
Install Rust and dependencies:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup update
-
Run in development mode:
RUST_LOG=debug cargo run
-
Run tests:
cargo test -
Format code:
cargo fmt
-
Lint code:
cargo clippy
lxtui/
βββ src/
β βββ main.rs # Application entry point
β βββ app.rs # Main application logic
β βββ ui.rs # Terminal UI components
β βββ lxd_api.rs # LXD API client
β βββ lxc.rs # Container operations
βββ tests/ # Integration tests
βββ docs/ # Documentation
βββ .github/workflows/ # CI/CD pipelines
βββ README.md
1. "Failed to connect to LXD"
# Check if LXD is running
sudo systemctl status lxd
# Start LXD if needed
sudo systemctl start lxd
# Verify your user is in the lxd group
groups $USER2. "Permission denied" errors
# Add user to lxd group and refresh
sudo usermod -a -G lxd $USER
newgrp lxd3. "No containers found"
# Verify LXD is initialized
lxc profile list
# If not initialized
sudo lxd init4. Terminal display issues
# Try setting terminal type
export TERM=xterm-256color
lxtuiEnable debug logging for troubleshooting:
RUST_LOG=debug lxtui 2> lxtui.logPlease report issues on GitHub Issues with:
- Your operating system and version
- LXD version (
lxd --version) - LXTUI version (
lxtui --version) - Steps to reproduce the issue
- Debug logs if applicable
This project is licensed under the MIT License - see the LICENSE file for details.
- Ratatui - Excellent TUI framework
- LXD Team - Amazing container runtime
- Tokio - Async runtime for Rust
- The Rust community for incredible tooling and support
- Homepage: https://github.com/yourusername/lxtui
- Documentation: https://docs.rs/lxtui
- Crates.io: https://crates.io/crates/lxtui
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Made with β€οΈ by the LXTUI contributors
Streamline your container workflow with the power of the terminal.
