Safe, Mole-inspired maintenance for Linux + Docker.
Project description
LinuxMole
Safe maintenance for Linux + Docker, inspired by Mole for macOS, a wonderful project.
Overview
LinuxMole is a Mole-inspired CLI for Linux servers with Docker. It focuses on safe, transparent maintenance with previews, structured output, and explicit confirmation.
Project Status
Note: LinuxMole is under active development. Core functionality is complete and tested, with additional features being implemented.
| Aspect | Status |
|---|---|
| Version | 1.0.10 |
| Tests | 120 passing (100%) |
| Coverage | 14.98% |
| Architecture | Modular (28 modules) |
| CI/CD | ✅ GitHub Actions (Python 3.8-3.12) |
| Completion | 9/11 tasks (81.8%) |
Implemented Features ✅
- ✅ Complete system and Docker status monitoring
- ✅ Safe cleanup operations (system + Docker)
- ✅ Disk usage analyzer with interactive TUI
- ✅ Application uninstaller (apt/snap/flatpak)
- ✅ Whitelist management and config file support
- ✅ Automated testing and CI/CD pipeline
- ✅ Python 3.8-3.12 compatibility
- ✅ Logging and error handling
- ✅ Modular architecture
In Progress 🚧
- TUI launcher integration (low priority)
Coming Soon 🔜
- Comprehensive documentation (commands, configuration, examples)
- Additional test coverage
- Performance optimizations
Features
- Mole-like console UX with structured sections and previews
- Safe-by-default cleanup with explicit confirmation
- Docker-aware maintenance (images, networks, volumes, logs)
- System maintenance (journald, tmpfiles, apt, caches)
- Whitelist support and detailed preview logs
Screenshots
Help Output
_ _ __ __ _
| | (_) | \/ | | |
| | _ _ __ _ ___ __ | \ / | ___ | | ___
| | | | '_ \| | | \ \/ / | |\/| |/ _ \| |/ _ \
| |____| | | | | |_| |> < | | | | (_) | | __/
|______|_|_| |_|\__,_/_/\_\ |_| |_|\___/|_|\___|
https://github.com/4ndymcfly/linux-mole
Safe maintenance for Linux + Docker.
COMMANDS
lm Main menu
lm status Full status (system + docker)
lm status system System status only
lm status docker Docker status only
lm clean Full cleanup (system + docker)
lm clean system System cleanup only
lm clean docker Docker cleanup only
lm analyze Analyze disk usage
lm purge Clean project build artifacts
lm installer Find and remove installer files
lm whitelist Show whitelist config
lm uninstall Remove LinuxMole from this system
lm --version Show version
lm update Update LinuxMole (pipx)
OPTIONS (clean only)
--dry-run Preview only, no actions executed
--yes Assume 'yes' for confirmations
-h, --help Show help
EXAMPLES
lm status
lm status --paths
lm status docker --top-logs 50
lm clean --containers --networks --images dangling --dry-run
lm clean docker --images unused --yes
lm clean docker --truncate-logs-mb 500 --dry-run
lm clean system --journal --tmpfiles --apt --dry-run
lm clean system --logs --logs-days 14 --dry-run
lm clean system --kernels --kernels-keep 2 --dry-run
lm analyze --path /var --top 15
lm purge
lm installer
lm whitelist
lm --version
lm update
Installation
Recommended (pipx)
- Install pipx:
sudo apt update && sudo apt install -y pipx
pipx ensurepath
- Install LinuxMole:
pipx install linuxmole
Development install (latest main):
pipx install "git+https://github.com/4ndymcfly/linux-mole.git"
- Run:
lm status
Legacy (optional)
sudo ./install-linuxmole.sh
Commands
lm statusFull status (system + docker)lm status systemSystem status onlylm status dockerDocker status onlylm cleanFull cleanup (system + docker)lm clean systemSystem cleanup onlylm clean dockerDocker cleanup onlylm analyzeAnalyze disk usagelm purgeClean project build artifactslm installerFind and remove installer fileslm whitelistShow whitelist configlm uninstallRemove LinuxMole from this systemlm --versionShow versionlm updateUpdate LinuxMole (pipx)
Clean Examples
lm clean --containers --networks --images dangling --dry-run
lm clean system --journal --tmpfiles --apt --dry-run
lm clean system --logs --logs-days 14 --dry-run
lm clean system --pip-cache --npm-cache --cargo-cache --go-cache --dry-run
lm clean system --snap --flatpak --logrotate --dry-run
lm clean system --kernels --kernels-keep 2 --dry-run
Analyze / Purge / Installer
lm analyze --path /var --top 15
lm purge
lm installer
Whitelist / Config
- Whitelist file:
~/.config/linuxmole/whitelist.txt - Purge paths file:
~/.config/linuxmole/purge_paths - Edit whitelist:
lm whitelist --edit
Contributing
See CONTRIBUTING.md for guidelines.
Release
See PUBLISHING.md for the PyPI/pipx release workflow.
- Update version in
pyproject.tomlandlm.py - Tag and push:
git tag vX.Y.Z && git push --tags - Users upgrade:
pipx upgrade linuxmole
Acknowledgements
Thanks to the original Mole project for inspiration: https://github.com/tw93/mole
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linuxmole-1.0.10.tar.gz.
File metadata
- Download URL: linuxmole-1.0.10.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcff64ed35f5a2677a6b3e271c18ecd8ba37b52555908aa41115e3c757d16714
|
|
| MD5 |
0d597fd180ac3bf912fe12cae32f03d8
|
|
| BLAKE2b-256 |
368a172e3c4df2513dc39c4397791b5193fb4387057bffd60b4814fa16730960
|
File details
Details for the file linuxmole-1.0.10-py3-none-any.whl.
File metadata
- Download URL: linuxmole-1.0.10-py3-none-any.whl
- Upload date:
- Size: 55.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98fbf6d6ae262cffb04dd245ab3f3138f0b3aab10faca94002d2393148d9ebfb
|
|
| MD5 |
aafe6dd434530d97cc4940e89aa1fa73
|
|
| BLAKE2b-256 |
d7a30f07d10bc12c30c94c97629798026685830f209f50f668886d4574f761a2
|