sysmaint 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sysmaint-0.1.0/.gitignore +119 -0
- sysmaint-0.1.0/CHANGELOG.md +16 -0
- sysmaint-0.1.0/PKG-INFO +307 -0
- sysmaint-0.1.0/README.md +258 -0
- sysmaint-0.1.0/USER_GUIDE.md +186 -0
- sysmaint-0.1.0/assets/sysmaint-icon.ico +0 -0
- sysmaint-0.1.0/assets/sysmaint-icon.png +0 -0
- sysmaint-0.1.0/packaging/linux/install.sh +39 -0
- sysmaint-0.1.0/packaging/linux/sysmaint.desktop +12 -0
- sysmaint-0.1.0/packaging/windows/sysmaint.iss +64 -0
- sysmaint-0.1.0/pyproject.toml +106 -0
- sysmaint-0.1.0/requirements-dev.txt +6 -0
- sysmaint-0.1.0/requirements.txt +9 -0
- sysmaint-0.1.0/setup.py +14 -0
- sysmaint-0.1.0/src/sysmaint/__init__.py +17 -0
- sysmaint-0.1.0/src/sysmaint/__main__.py +6 -0
- sysmaint-0.1.0/src/sysmaint/cli.py +637 -0
- sysmaint-0.1.0/src/sysmaint/config.py +229 -0
- sysmaint-0.1.0/src/sysmaint/gui/__init__.py +5 -0
- sysmaint-0.1.0/src/sysmaint/gui/app.py +193 -0
- sysmaint-0.1.0/src/sysmaint/gui/components/__init__.py +13 -0
- sysmaint-0.1.0/src/sysmaint/gui/components/cards.py +239 -0
- sysmaint-0.1.0/src/sysmaint/gui/components/console.py +61 -0
- sysmaint-0.1.0/src/sysmaint/gui/components/dialogs.py +79 -0
- sysmaint-0.1.0/src/sysmaint/gui/theme.py +52 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/__init__.py +25 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/backup.py +167 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/cleaner.py +227 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/dashboard.py +252 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/diagnostics.py +243 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/integrity.py +158 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/malware.py +293 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/network.py +171 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/security.py +118 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/settings.py +211 -0
- sysmaint-0.1.0/src/sysmaint/gui/views/startup.py +133 -0
- sysmaint-0.1.0/src/sysmaint/logging_setup.py +62 -0
- sysmaint-0.1.0/src/sysmaint/modules/__init__.py +41 -0
- sysmaint-0.1.0/src/sysmaint/modules/backup.py +106 -0
- sysmaint-0.1.0/src/sysmaint/modules/cleaner.py +249 -0
- sysmaint-0.1.0/src/sysmaint/modules/disk.py +160 -0
- sysmaint-0.1.0/src/sysmaint/modules/drivers.py +89 -0
- sysmaint-0.1.0/src/sysmaint/modules/integrity.py +148 -0
- sysmaint-0.1.0/src/sysmaint/modules/malware.py +412 -0
- sysmaint-0.1.0/src/sysmaint/modules/memory.py +105 -0
- sysmaint-0.1.0/src/sysmaint/modules/network.py +167 -0
- sysmaint-0.1.0/src/sysmaint/modules/optimizer.py +186 -0
- sysmaint-0.1.0/src/sysmaint/modules/recovery.py +353 -0
- sysmaint-0.1.0/src/sysmaint/modules/report.py +232 -0
- sysmaint-0.1.0/src/sysmaint/modules/restore.py +123 -0
- sysmaint-0.1.0/src/sysmaint/modules/scheduler.py +137 -0
- sysmaint-0.1.0/src/sysmaint/modules/security.py +88 -0
- sysmaint-0.1.0/src/sysmaint/modules/services.py +171 -0
- sysmaint-0.1.0/src/sysmaint/modules/startup.py +95 -0
- sysmaint-0.1.0/src/sysmaint/modules/sysinfo.py +112 -0
- sysmaint-0.1.0/src/sysmaint/service/__init__.py +5 -0
- sysmaint-0.1.0/src/sysmaint/service/server.py +210 -0
- sysmaint-0.1.0/src/sysmaint/tui/__init__.py +5 -0
- sysmaint-0.1.0/src/sysmaint/tui/app.py +830 -0
- sysmaint-0.1.0/src/sysmaint/tui/modals.py +201 -0
- sysmaint-0.1.0/src/sysmaint/tui/themes.py +97 -0
- sysmaint-0.1.0/src/sysmaint/utils/__init__.py +39 -0
- sysmaint-0.1.0/src/sysmaint/utils/common.py +255 -0
- sysmaint-0.1.0/src/sysmaint/utils/escalate.py +93 -0
- sysmaint-0.1.0/src/sysmaint/utils/linux.py +240 -0
- sysmaint-0.1.0/src/sysmaint/utils/parsers.py +171 -0
- sysmaint-0.1.0/src/sysmaint/utils/windows.py +308 -0
- sysmaint-0.1.0/tests/__init__.py +1 -0
- sysmaint-0.1.0/tests/test_common.py +12 -0
- sysmaint-0.1.0/tests/test_disk.py +38 -0
- sysmaint-0.1.0/tests/test_microservice.py +30 -0
- sysmaint-0.1.0/tests/test_recovery.py +58 -0
- sysmaint-0.1.0/uv.lock +1686 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# ===========================
|
|
2
|
+
# Python
|
|
3
|
+
# ===========================
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
*.so
|
|
8
|
+
.Python
|
|
9
|
+
build/
|
|
10
|
+
develop-eggs/
|
|
11
|
+
dist/
|
|
12
|
+
downloads/
|
|
13
|
+
eggs/
|
|
14
|
+
.eggs/
|
|
15
|
+
lib/
|
|
16
|
+
lib64/
|
|
17
|
+
parts/
|
|
18
|
+
sdist/
|
|
19
|
+
var/
|
|
20
|
+
wheels/
|
|
21
|
+
share/python-wheels/
|
|
22
|
+
*.egg-info/
|
|
23
|
+
.installed.cfg
|
|
24
|
+
*.egg
|
|
25
|
+
MANIFEST
|
|
26
|
+
|
|
27
|
+
# Virtual environments
|
|
28
|
+
venv/
|
|
29
|
+
env/
|
|
30
|
+
ENV/
|
|
31
|
+
.venv/
|
|
32
|
+
env.bak/
|
|
33
|
+
venv.bak/
|
|
34
|
+
pipenv/
|
|
35
|
+
pip-wheel-metadata/
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
|
|
51
|
+
# ===========================
|
|
52
|
+
# Logs and generated files
|
|
53
|
+
# ===========================
|
|
54
|
+
*.log
|
|
55
|
+
sysmaint.log
|
|
56
|
+
logs/
|
|
57
|
+
*.tmp
|
|
58
|
+
*.temp
|
|
59
|
+
|
|
60
|
+
# SysMaint quarantine / backups
|
|
61
|
+
quarantine/
|
|
62
|
+
backups/
|
|
63
|
+
/backup/
|
|
64
|
+
/opt/sysmaint/backups/
|
|
65
|
+
|
|
66
|
+
# Configuration with sensitive data (API keys, etc.)
|
|
67
|
+
config.local.yaml
|
|
68
|
+
config.local.yml
|
|
69
|
+
config.local.json
|
|
70
|
+
*.secret
|
|
71
|
+
.env
|
|
72
|
+
.env.*
|
|
73
|
+
|
|
74
|
+
# ===========================
|
|
75
|
+
# Binary / compiled files
|
|
76
|
+
# ===========================
|
|
77
|
+
*.exe
|
|
78
|
+
*.dll
|
|
79
|
+
*.so
|
|
80
|
+
*.dylib
|
|
81
|
+
*.bin
|
|
82
|
+
*.obj
|
|
83
|
+
*.o
|
|
84
|
+
*.a
|
|
85
|
+
*.lib
|
|
86
|
+
*.pyc
|
|
87
|
+
*.pyo
|
|
88
|
+
*.pyd
|
|
89
|
+
|
|
90
|
+
# ===========================
|
|
91
|
+
# Version control / IDE / OS
|
|
92
|
+
# ===========================
|
|
93
|
+
.git/
|
|
94
|
+
.gitignore
|
|
95
|
+
.gitattributes
|
|
96
|
+
.gitmodules
|
|
97
|
+
|
|
98
|
+
# IDEs and editors
|
|
99
|
+
.idea/
|
|
100
|
+
.vscode/
|
|
101
|
+
*.swp
|
|
102
|
+
*.swo
|
|
103
|
+
*~
|
|
104
|
+
.DS_Store
|
|
105
|
+
Thumbs.db
|
|
106
|
+
Desktop.ini
|
|
107
|
+
|
|
108
|
+
# ===========================
|
|
109
|
+
# Misc
|
|
110
|
+
# ===========================
|
|
111
|
+
# Allow local overrides but not secrets
|
|
112
|
+
*.local
|
|
113
|
+
*.private
|
|
114
|
+
|
|
115
|
+
# Private publishing & internal release guides
|
|
116
|
+
docs/PRIVATE_*.md
|
|
117
|
+
PRIVATE_*.md
|
|
118
|
+
dist/
|
|
119
|
+
*.spec
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **SysMaint** by **Kennny7 Microservices** are documented in this file.
|
|
4
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [0.1.0] - Sentinel Microservice (2026-11-25)
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- **Microservice Architecture (`sysmaint serve` / `sysmaint-serve`)**: FastAPI + Uvicorn HTTP microservice with OpenAPI docs at `/docs`, `/health`, `/v1/sysinfo`, `/v1/smart-scan`, `/v1/diagnose`, `/v1/scan`, `/v1/repair`, `/v1/recovery/*`, and `/v1/ai/*`, plus `X-Powered-By: Kennny7 Microservices` service headers.
|
|
10
|
+
- **Interactive Terminal Client UI (`sysmaint tui` / `sysmaint-tui`)**: Textual + Rich dark-slate/cyan TUI with live CPU, RAM, and Disk telemetry, 5 tabbed workspaces, and optional remote microservice client mode (`--server`).
|
|
11
|
+
- **Data Recovery Engine (`sysmaint recovery`)**: Recycle Bin / FreeDesktop Trash inspection and restoration, Windows Volume Shadow Copy (`vssadmin`) & Linux snapshot listing, Office/LibreOffice/temp auto-recovery draft scanning, and safe read-only file signature carving (`pdf`, `png`, `jpg`, `zip`, `sqlite`).
|
|
12
|
+
- **Network Stack & Offline Integrity Repair**: Added `network reset` (`netsh winsock reset` / `netsh int ip reset` / `NetworkManager` restart) and `--offline-source` WIM/ESD support for DISM.
|
|
13
|
+
- **Modern `uv` Packaging**: Migrated to `src/sysmaint/` layout with `hatchling`, `uv` dependency groups, and `pytest` suite covering recovery, disk, and microservice endpoints.
|
|
14
|
+
|
|
15
|
+
## [2.0.0] - Legacy Toolkit
|
|
16
|
+
- Cross-platform CLI and CustomTkinter GUI for diagnostics, malware scanning (ClamAV, YARA, VirusTotal), system integrity (`DISM`/`SFC`/`dpkg`/`rpm`), junk cleaning, backup/restore, and scheduling.
|
sysmaint-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: sysmaint
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Cross-Platform System Maintenance, Security & Data Recovery Microservice by Kennny7 Microservices
|
|
5
|
+
Project-URL: Homepage, https://github.com/Kennny7/sysmaint
|
|
6
|
+
Project-URL: Repository, https://github.com/Kennny7/sysmaint
|
|
7
|
+
Project-URL: Documentation, https://github.com/Kennny7/sysmaint/blob/main/USER_GUIDE.md
|
|
8
|
+
Project-URL: Issues, https://github.com/Kennny7/sysmaint/issues
|
|
9
|
+
Author-email: Kennny7 <kennny7@users.noreply.github.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
Keywords: data-recovery,diagnostics,kennny7-microservices,malware-scanner,microservice,sysmaint,system-maintenance,tui
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Environment :: Win32 (MS Windows)
|
|
15
|
+
Classifier: Environment :: X11 Applications
|
|
16
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
17
|
+
Classifier: Intended Audience :: System Administrators
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
20
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Topic :: System :: Recovery Tools
|
|
27
|
+
Classifier: Topic :: System :: Systems Administration
|
|
28
|
+
Classifier: Topic :: Utilities
|
|
29
|
+
Requires-Python: >=3.10
|
|
30
|
+
Requires-Dist: fastapi>=0.111.0
|
|
31
|
+
Requires-Dist: httpx>=0.27.0
|
|
32
|
+
Requires-Dist: psutil>=5.9.0
|
|
33
|
+
Requires-Dist: pydantic>=2.7.0
|
|
34
|
+
Requires-Dist: pyyaml>=6.0
|
|
35
|
+
Requires-Dist: requests>=2.28.0
|
|
36
|
+
Requires-Dist: rich>=13.7.0
|
|
37
|
+
Requires-Dist: textual>=0.60.0
|
|
38
|
+
Requires-Dist: uvicorn[standard]>=0.30.0
|
|
39
|
+
Provides-Extra: all
|
|
40
|
+
Requires-Dist: customtkinter>=5.2.0; extra == 'all'
|
|
41
|
+
Requires-Dist: darkdetect>=0.8.0; extra == 'all'
|
|
42
|
+
Requires-Dist: yara-python>=4.2.0; extra == 'all'
|
|
43
|
+
Provides-Extra: gui
|
|
44
|
+
Requires-Dist: customtkinter>=5.2.0; extra == 'gui'
|
|
45
|
+
Requires-Dist: darkdetect>=0.8.0; extra == 'gui'
|
|
46
|
+
Provides-Extra: yara
|
|
47
|
+
Requires-Dist: yara-python>=4.2.0; extra == 'yara'
|
|
48
|
+
Description-Content-Type: text/markdown
|
|
49
|
+
|
|
50
|
+
<div align="center">
|
|
51
|
+
|
|
52
|
+
<img src="assets/sysmaint-icon.png" alt="SysMaint Icon" width="140" />
|
|
53
|
+
|
|
54
|
+
# SysMaint
|
|
55
|
+
|
|
56
|
+
**Cross-Platform System Maintenance, Security & Data Recovery Microservice**
|
|
57
|
+
|
|
58
|
+
*Version 0.1.0 — Sentinel Microservice | Built by Kennny7 Microservices*
|
|
59
|
+
|
|
60
|
+
<br />
|
|
61
|
+
|
|
62
|
+
<a href="USER_GUIDE.md"><img src="https://img.shields.io/badge/Read_the-User_Guide-06b6d4?style=for-the-badge" alt="Read the User Guide" /></a>
|
|
63
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/Release-v0.1.0_Sentinel-0f172a?style=for-the-badge" alt="Release v0.1.0" /></a>
|
|
64
|
+
|
|
65
|
+
<br /><br />
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+

|
|
69
|
+

|
|
70
|
+

|
|
71
|
+

|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
> [!NOTE]
|
|
79
|
+
> **New to command-line tools?** Open the step-by-step **[User Guide](USER_GUIDE.md)** for plain-English instructions, microservice health checks, and ready-to-paste examples.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Architecture Overview
|
|
84
|
+
|
|
85
|
+
SysMaint v0.1.0 (`Sentinel Microservice`) evolves the original maintenance toolkit into a modular **microservice + terminal client UI** architecture that works both **offline** and **online**.
|
|
86
|
+
|
|
87
|
+
```mermaid
|
|
88
|
+
flowchart LR
|
|
89
|
+
subgraph Clients["Client Interfaces"]
|
|
90
|
+
TUI["Textual + Rich TUI (sysmaint tui)"]
|
|
91
|
+
CLI["Rich CLI (sysmaint ...)"]
|
|
92
|
+
GUI["Desktop GUI (sysmaint gui)"]
|
|
93
|
+
EXT["Scripts / Dashboards (HTTP/JSON)"]
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
subgraph Service["Kennny7 Microservice Layer"]
|
|
97
|
+
API["FastAPI + Uvicorn (sysmaint serve :8765)"]
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
subgraph Core["Core Engines (Online & Offline)"]
|
|
101
|
+
DIAG["Diagnostics (Disk, RAM, Drivers, Services)"]
|
|
102
|
+
REP["Repair (DISM, SFC, chkdsk, fsck, Net Reset)"]
|
|
103
|
+
SEC["Security & Malware (YARA, ClamAV, VirusTotal)"]
|
|
104
|
+
REC["Data Recovery (Trash, VSS, Temp, Carving)"]
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
TUI --> API
|
|
108
|
+
TUI -. Direct Mode .-> Core
|
|
109
|
+
CLI --> Core
|
|
110
|
+
GUI --> Core
|
|
111
|
+
EXT --> API
|
|
112
|
+
API --> Core
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Execution Workflow
|
|
116
|
+
|
|
117
|
+
```mermaid
|
|
118
|
+
flowchart TD
|
|
119
|
+
Start[Start sysmaint] --> Mode{Selected Mode?}
|
|
120
|
+
Mode -->|tui| LaunchTUI[Launch Textual Terminal Client UI]
|
|
121
|
+
Mode -->|serve| LaunchAPI[Start FastAPI Microservice on :8765]
|
|
122
|
+
Mode -->|diagnose / scan / repair / recovery| PrivCheck{Need Elevation?}
|
|
123
|
+
PrivCheck -->|No| RunMod[Execute Module]
|
|
124
|
+
PrivCheck -->|Yes| Elevate[UAC / sudo Elevation]
|
|
125
|
+
Elevate --> RunMod
|
|
126
|
+
RunMod --> Output[Rich Terminal / JSON / HTML Report]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Key Capabilities
|
|
132
|
+
|
|
133
|
+
| Domain | Windows Tools & Features | Linux Tools & Features | Offline Capable |
|
|
134
|
+
| :--- | :--- | :--- | :--- |
|
|
135
|
+
| **Microservice** | FastAPI REST API + OpenAPI (`/docs`) | FastAPI REST API + OpenAPI (`/docs`) | Yes |
|
|
136
|
+
| **Terminal Client UI** | Textual + Rich 5-tab dashboard | Textual + Rich 5-tab dashboard | Yes |
|
|
137
|
+
| **System Repair** | `DISM /RestoreHealth` (online/WIM), `sfc /scannow`, `chkdsk` | `dpkg --verify`, `rpm -Va`, `pacman -Qk`, `fsck`, `journalctl` | Yes |
|
|
138
|
+
| **Network Repair** | `netsh winsock reset`, `netsh int ip reset`, DNS flush | `NetworkManager` restart, `resolvectl` DNS flush | Yes |
|
|
139
|
+
| **Malware & Security** | Built-in YARA heuristics, ClamAV, VirusTotal, Defender audit | Built-in YARA heuristics, ClamAV, VirusTotal, firewall audit | Yes (YARA/ClamAV) |
|
|
140
|
+
| **Data Recovery** | Recycle Bin restore, `vssadmin` VSS shadows, Office temp drafts, file carving | FreeDesktop Trash restore, Btrfs/Timeshift, temp drafts, file carving | Yes |
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Quick Start
|
|
145
|
+
|
|
146
|
+
### Clickable Installers & Package Managers (No Manual PATH Setup)
|
|
147
|
+
|
|
148
|
+
- **Windows**: Run `SysMaint-Setup-v0.1.0.exe` (creates Desktop/Start Menu shortcuts and configures `PATH` automatically) or install via `winget install Kennny7.SysMaint`.
|
|
149
|
+
- **Linux**: Run `./packaging/linux/install.sh` to install `sysmaint`, update `PATH`, and register the clickable **SysMaint** Application Menu launcher (`sysmaint.desktop`).
|
|
150
|
+
|
|
151
|
+
### From Source (with `uv`)
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
git clone https://github.com/Kennny7/sysmaint.git
|
|
155
|
+
cd sysmaint
|
|
156
|
+
uv sync
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Launch the interactive **Terminal Client UI**:
|
|
160
|
+
```bash
|
|
161
|
+
uv run sysmaint tui
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Start the **Microservice**:
|
|
165
|
+
```bash
|
|
166
|
+
uv run sysmaint serve --host 127.0.0.1 --port 8765
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
> [!TIP]
|
|
170
|
+
> You can connect the Terminal Client UI directly to a running microservice instance:
|
|
171
|
+
> `uv run sysmaint tui --server http://127.0.0.1:8765`
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Command Reference & Expandable Guides
|
|
176
|
+
|
|
177
|
+
<details>
|
|
178
|
+
<summary><strong>1. Diagnostics, Integrity & System Repair</strong></summary>
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# 1-Click read-only health overview
|
|
182
|
+
sysmaint smart-scan
|
|
183
|
+
|
|
184
|
+
# Run specific diagnostics
|
|
185
|
+
sysmaint diagnose --disk --memory --drivers
|
|
186
|
+
|
|
187
|
+
# Check Windows DISM/SFC or Linux package integrity (read-only)
|
|
188
|
+
sysmaint scan --integrity
|
|
189
|
+
|
|
190
|
+
# Repair system files (preview first with --dry-run)
|
|
191
|
+
sysmaint repair --files --dry-run
|
|
192
|
+
sysmaint repair --files
|
|
193
|
+
|
|
194
|
+
# Offline DISM repair using a local WIM/ESD image
|
|
195
|
+
sysmaint repair --files --offline-source D:\sources\install.wim
|
|
196
|
+
|
|
197
|
+
# Reset corrupted network stack (Winsock/TCP-IP or NetworkManager)
|
|
198
|
+
sysmaint network reset --dry-run
|
|
199
|
+
sysmaint network reset
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
</details>
|
|
203
|
+
|
|
204
|
+
<details>
|
|
205
|
+
<summary><strong>2. Malware Scanning & Security Audit</strong></summary>
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Audit firewall, antivirus, and privilege posture
|
|
209
|
+
sysmaint security
|
|
210
|
+
|
|
211
|
+
# Offline malware scan using built-in YARA rules and ClamAV
|
|
212
|
+
sysmaint scan --yara --clamav --offline
|
|
213
|
+
|
|
214
|
+
# Scan a specific folder
|
|
215
|
+
sysmaint scan --yara --target "C:\Users\Admin\Downloads"
|
|
216
|
+
|
|
217
|
+
# Update ClamAV signatures (online)
|
|
218
|
+
sysmaint update-db
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
</details>
|
|
222
|
+
|
|
223
|
+
<details>
|
|
224
|
+
<summary><strong>3. Data Recovery (Trash, Shadow Copies, Temp Drafts, File Carving)</strong></summary>
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# List deleted items in Recycle Bin (Windows) or Trash (Linux)
|
|
228
|
+
sysmaint recovery trash
|
|
229
|
+
|
|
230
|
+
# Restore a deleted item to a safe destination
|
|
231
|
+
sysmaint recovery restore --name "invoice.pdf" --dest "./recovered"
|
|
232
|
+
|
|
233
|
+
# List Volume Shadow Copies (Windows) or Btrfs/Timeshift snapshots (Linux)
|
|
234
|
+
sysmaint recovery shadows
|
|
235
|
+
|
|
236
|
+
# Scan for unsaved Office / LibreOffice / temp drafts
|
|
237
|
+
sysmaint recovery temp
|
|
238
|
+
|
|
239
|
+
# Carve lost files (pdf, png, jpg, zip, sqlite) from a raw disk image
|
|
240
|
+
sysmaint recovery carve --source "./disk.img" --dest "./carved_out" --types pdf png jpg
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
</details>
|
|
244
|
+
|
|
245
|
+
<details>
|
|
246
|
+
<summary><strong>4. Project Structure</strong></summary>
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
sysmaint/
|
|
250
|
+
├── assets/
|
|
251
|
+
│ └── sysmaint-icon.png
|
|
252
|
+
├── src/sysmaint/
|
|
253
|
+
│ ├── __init__.py # Version (0.1.0), Codename, Kennny7 Microservices brand
|
|
254
|
+
│ ├── __main__.py
|
|
255
|
+
│ ├── cli.py # Unified CLI entrypoint
|
|
256
|
+
│ ├── config.py # YAML/JSON configuration dataclasses
|
|
257
|
+
│ ├── logging_setup.py
|
|
258
|
+
│ ├── modules/
|
|
259
|
+
│ │ ├── backup.py # Restore points & snapshots
|
|
260
|
+
│ │ ├── cleaner.py # Temp, browser, package & log cleanup
|
|
261
|
+
│ │ ├── disk.py # Partition usage, SMART, chkdsk/fsck
|
|
262
|
+
│ │ ├── drivers.py
|
|
263
|
+
│ │ ├── integrity.py # DISM/SFC (online & offline WIM) & Linux pkg verify
|
|
264
|
+
│ │ ├── malware.py # YARA, ClamAV, VirusTotal
|
|
265
|
+
│ │ ├── memory.py
|
|
266
|
+
│ │ ├── network.py # Ping, DNS flush, ports, network stack reset
|
|
267
|
+
│ │ ├── optimizer.py # 1-Click smart scan & auto-fix
|
|
268
|
+
│ │ ├── recovery.py # Trash/Recycle Bin, VSS, temp drafts, file carving
|
|
269
|
+
│ │ ├── report.py # JSON, Rich & HTML reporting
|
|
270
|
+
│ │ ├── restore.py
|
|
271
|
+
│ │ ├── scheduler.py
|
|
272
|
+
│ │ ├── security.py
|
|
273
|
+
│ │ ├── services.py
|
|
274
|
+
│ │ ├── startup.py
|
|
275
|
+
│ │ └── sysinfo.py
|
|
276
|
+
│ ├── service/
|
|
277
|
+
│ │ └── server.py # FastAPI + Uvicorn microservice
|
|
278
|
+
│ ├── tui/
|
|
279
|
+
│ │ └── app.py # Textual + Rich Terminal Client UI
|
|
280
|
+
│ ├── gui/ # Optional CustomTkinter Desktop GUI
|
|
281
|
+
│ └── utils/
|
|
282
|
+
├── tests/
|
|
283
|
+
├── pyproject.toml # uv & hatchling configuration
|
|
284
|
+
├── USER_GUIDE.md # Non-technical & CLI user guide
|
|
285
|
+
└── CHANGELOG.md
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
</details>
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Testing & Quality Checks
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
uv run pytest -v
|
|
296
|
+
uv run ruff check src tests
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
<div align="center">
|
|
302
|
+
|
|
303
|
+
**SysMaint v0.1.0 (Sentinel Microservice)** — **Kennny7 Microservices**
|
|
304
|
+
|
|
305
|
+
[User Guide](USER_GUIDE.md) | [Changelog](CHANGELOG.md) | [Issues](https://github.com/Kennny7/sysmaint/issues)
|
|
306
|
+
|
|
307
|
+
</div>
|
sysmaint-0.1.0/README.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="assets/sysmaint-icon.png" alt="SysMaint Icon" width="140" />
|
|
4
|
+
|
|
5
|
+
# SysMaint
|
|
6
|
+
|
|
7
|
+
**Cross-Platform System Maintenance, Security & Data Recovery Microservice**
|
|
8
|
+
|
|
9
|
+
*Version 0.1.0 — Sentinel Microservice | Built by Kennny7 Microservices*
|
|
10
|
+
|
|
11
|
+
<br />
|
|
12
|
+
|
|
13
|
+
<a href="USER_GUIDE.md"><img src="https://img.shields.io/badge/Read_the-User_Guide-06b6d4?style=for-the-badge" alt="Read the User Guide" /></a>
|
|
14
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/Release-v0.1.0_Sentinel-0f172a?style=for-the-badge" alt="Release v0.1.0" /></a>
|
|
15
|
+
|
|
16
|
+
<br /><br />
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+

|
|
22
|
+

|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
> [!NOTE]
|
|
30
|
+
> **New to command-line tools?** Open the step-by-step **[User Guide](USER_GUIDE.md)** for plain-English instructions, microservice health checks, and ready-to-paste examples.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Architecture Overview
|
|
35
|
+
|
|
36
|
+
SysMaint v0.1.0 (`Sentinel Microservice`) evolves the original maintenance toolkit into a modular **microservice + terminal client UI** architecture that works both **offline** and **online**.
|
|
37
|
+
|
|
38
|
+
```mermaid
|
|
39
|
+
flowchart LR
|
|
40
|
+
subgraph Clients["Client Interfaces"]
|
|
41
|
+
TUI["Textual + Rich TUI (sysmaint tui)"]
|
|
42
|
+
CLI["Rich CLI (sysmaint ...)"]
|
|
43
|
+
GUI["Desktop GUI (sysmaint gui)"]
|
|
44
|
+
EXT["Scripts / Dashboards (HTTP/JSON)"]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
subgraph Service["Kennny7 Microservice Layer"]
|
|
48
|
+
API["FastAPI + Uvicorn (sysmaint serve :8765)"]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
subgraph Core["Core Engines (Online & Offline)"]
|
|
52
|
+
DIAG["Diagnostics (Disk, RAM, Drivers, Services)"]
|
|
53
|
+
REP["Repair (DISM, SFC, chkdsk, fsck, Net Reset)"]
|
|
54
|
+
SEC["Security & Malware (YARA, ClamAV, VirusTotal)"]
|
|
55
|
+
REC["Data Recovery (Trash, VSS, Temp, Carving)"]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
TUI --> API
|
|
59
|
+
TUI -. Direct Mode .-> Core
|
|
60
|
+
CLI --> Core
|
|
61
|
+
GUI --> Core
|
|
62
|
+
EXT --> API
|
|
63
|
+
API --> Core
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Execution Workflow
|
|
67
|
+
|
|
68
|
+
```mermaid
|
|
69
|
+
flowchart TD
|
|
70
|
+
Start[Start sysmaint] --> Mode{Selected Mode?}
|
|
71
|
+
Mode -->|tui| LaunchTUI[Launch Textual Terminal Client UI]
|
|
72
|
+
Mode -->|serve| LaunchAPI[Start FastAPI Microservice on :8765]
|
|
73
|
+
Mode -->|diagnose / scan / repair / recovery| PrivCheck{Need Elevation?}
|
|
74
|
+
PrivCheck -->|No| RunMod[Execute Module]
|
|
75
|
+
PrivCheck -->|Yes| Elevate[UAC / sudo Elevation]
|
|
76
|
+
Elevate --> RunMod
|
|
77
|
+
RunMod --> Output[Rich Terminal / JSON / HTML Report]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Key Capabilities
|
|
83
|
+
|
|
84
|
+
| Domain | Windows Tools & Features | Linux Tools & Features | Offline Capable |
|
|
85
|
+
| :--- | :--- | :--- | :--- |
|
|
86
|
+
| **Microservice** | FastAPI REST API + OpenAPI (`/docs`) | FastAPI REST API + OpenAPI (`/docs`) | Yes |
|
|
87
|
+
| **Terminal Client UI** | Textual + Rich 5-tab dashboard | Textual + Rich 5-tab dashboard | Yes |
|
|
88
|
+
| **System Repair** | `DISM /RestoreHealth` (online/WIM), `sfc /scannow`, `chkdsk` | `dpkg --verify`, `rpm -Va`, `pacman -Qk`, `fsck`, `journalctl` | Yes |
|
|
89
|
+
| **Network Repair** | `netsh winsock reset`, `netsh int ip reset`, DNS flush | `NetworkManager` restart, `resolvectl` DNS flush | Yes |
|
|
90
|
+
| **Malware & Security** | Built-in YARA heuristics, ClamAV, VirusTotal, Defender audit | Built-in YARA heuristics, ClamAV, VirusTotal, firewall audit | Yes (YARA/ClamAV) |
|
|
91
|
+
| **Data Recovery** | Recycle Bin restore, `vssadmin` VSS shadows, Office temp drafts, file carving | FreeDesktop Trash restore, Btrfs/Timeshift, temp drafts, file carving | Yes |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Quick Start
|
|
96
|
+
|
|
97
|
+
### Clickable Installers & Package Managers (No Manual PATH Setup)
|
|
98
|
+
|
|
99
|
+
- **Windows**: Run `SysMaint-Setup-v0.1.0.exe` (creates Desktop/Start Menu shortcuts and configures `PATH` automatically) or install via `winget install Kennny7.SysMaint`.
|
|
100
|
+
- **Linux**: Run `./packaging/linux/install.sh` to install `sysmaint`, update `PATH`, and register the clickable **SysMaint** Application Menu launcher (`sysmaint.desktop`).
|
|
101
|
+
|
|
102
|
+
### From Source (with `uv`)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git clone https://github.com/Kennny7/sysmaint.git
|
|
106
|
+
cd sysmaint
|
|
107
|
+
uv sync
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Launch the interactive **Terminal Client UI**:
|
|
111
|
+
```bash
|
|
112
|
+
uv run sysmaint tui
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Start the **Microservice**:
|
|
116
|
+
```bash
|
|
117
|
+
uv run sysmaint serve --host 127.0.0.1 --port 8765
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
> [!TIP]
|
|
121
|
+
> You can connect the Terminal Client UI directly to a running microservice instance:
|
|
122
|
+
> `uv run sysmaint tui --server http://127.0.0.1:8765`
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Command Reference & Expandable Guides
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary><strong>1. Diagnostics, Integrity & System Repair</strong></summary>
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# 1-Click read-only health overview
|
|
133
|
+
sysmaint smart-scan
|
|
134
|
+
|
|
135
|
+
# Run specific diagnostics
|
|
136
|
+
sysmaint diagnose --disk --memory --drivers
|
|
137
|
+
|
|
138
|
+
# Check Windows DISM/SFC or Linux package integrity (read-only)
|
|
139
|
+
sysmaint scan --integrity
|
|
140
|
+
|
|
141
|
+
# Repair system files (preview first with --dry-run)
|
|
142
|
+
sysmaint repair --files --dry-run
|
|
143
|
+
sysmaint repair --files
|
|
144
|
+
|
|
145
|
+
# Offline DISM repair using a local WIM/ESD image
|
|
146
|
+
sysmaint repair --files --offline-source D:\sources\install.wim
|
|
147
|
+
|
|
148
|
+
# Reset corrupted network stack (Winsock/TCP-IP or NetworkManager)
|
|
149
|
+
sysmaint network reset --dry-run
|
|
150
|
+
sysmaint network reset
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
</details>
|
|
154
|
+
|
|
155
|
+
<details>
|
|
156
|
+
<summary><strong>2. Malware Scanning & Security Audit</strong></summary>
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Audit firewall, antivirus, and privilege posture
|
|
160
|
+
sysmaint security
|
|
161
|
+
|
|
162
|
+
# Offline malware scan using built-in YARA rules and ClamAV
|
|
163
|
+
sysmaint scan --yara --clamav --offline
|
|
164
|
+
|
|
165
|
+
# Scan a specific folder
|
|
166
|
+
sysmaint scan --yara --target "C:\Users\Admin\Downloads"
|
|
167
|
+
|
|
168
|
+
# Update ClamAV signatures (online)
|
|
169
|
+
sysmaint update-db
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
</details>
|
|
173
|
+
|
|
174
|
+
<details>
|
|
175
|
+
<summary><strong>3. Data Recovery (Trash, Shadow Copies, Temp Drafts, File Carving)</strong></summary>
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# List deleted items in Recycle Bin (Windows) or Trash (Linux)
|
|
179
|
+
sysmaint recovery trash
|
|
180
|
+
|
|
181
|
+
# Restore a deleted item to a safe destination
|
|
182
|
+
sysmaint recovery restore --name "invoice.pdf" --dest "./recovered"
|
|
183
|
+
|
|
184
|
+
# List Volume Shadow Copies (Windows) or Btrfs/Timeshift snapshots (Linux)
|
|
185
|
+
sysmaint recovery shadows
|
|
186
|
+
|
|
187
|
+
# Scan for unsaved Office / LibreOffice / temp drafts
|
|
188
|
+
sysmaint recovery temp
|
|
189
|
+
|
|
190
|
+
# Carve lost files (pdf, png, jpg, zip, sqlite) from a raw disk image
|
|
191
|
+
sysmaint recovery carve --source "./disk.img" --dest "./carved_out" --types pdf png jpg
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
</details>
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary><strong>4. Project Structure</strong></summary>
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
sysmaint/
|
|
201
|
+
├── assets/
|
|
202
|
+
│ └── sysmaint-icon.png
|
|
203
|
+
├── src/sysmaint/
|
|
204
|
+
│ ├── __init__.py # Version (0.1.0), Codename, Kennny7 Microservices brand
|
|
205
|
+
│ ├── __main__.py
|
|
206
|
+
│ ├── cli.py # Unified CLI entrypoint
|
|
207
|
+
│ ├── config.py # YAML/JSON configuration dataclasses
|
|
208
|
+
│ ├── logging_setup.py
|
|
209
|
+
│ ├── modules/
|
|
210
|
+
│ │ ├── backup.py # Restore points & snapshots
|
|
211
|
+
│ │ ├── cleaner.py # Temp, browser, package & log cleanup
|
|
212
|
+
│ │ ├── disk.py # Partition usage, SMART, chkdsk/fsck
|
|
213
|
+
│ │ ├── drivers.py
|
|
214
|
+
│ │ ├── integrity.py # DISM/SFC (online & offline WIM) & Linux pkg verify
|
|
215
|
+
│ │ ├── malware.py # YARA, ClamAV, VirusTotal
|
|
216
|
+
│ │ ├── memory.py
|
|
217
|
+
│ │ ├── network.py # Ping, DNS flush, ports, network stack reset
|
|
218
|
+
│ │ ├── optimizer.py # 1-Click smart scan & auto-fix
|
|
219
|
+
│ │ ├── recovery.py # Trash/Recycle Bin, VSS, temp drafts, file carving
|
|
220
|
+
│ │ ├── report.py # JSON, Rich & HTML reporting
|
|
221
|
+
│ │ ├── restore.py
|
|
222
|
+
│ │ ├── scheduler.py
|
|
223
|
+
│ │ ├── security.py
|
|
224
|
+
│ │ ├── services.py
|
|
225
|
+
│ │ ├── startup.py
|
|
226
|
+
│ │ └── sysinfo.py
|
|
227
|
+
│ ├── service/
|
|
228
|
+
│ │ └── server.py # FastAPI + Uvicorn microservice
|
|
229
|
+
│ ├── tui/
|
|
230
|
+
│ │ └── app.py # Textual + Rich Terminal Client UI
|
|
231
|
+
│ ├── gui/ # Optional CustomTkinter Desktop GUI
|
|
232
|
+
│ └── utils/
|
|
233
|
+
├── tests/
|
|
234
|
+
├── pyproject.toml # uv & hatchling configuration
|
|
235
|
+
├── USER_GUIDE.md # Non-technical & CLI user guide
|
|
236
|
+
└── CHANGELOG.md
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
</details>
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Testing & Quality Checks
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
uv run pytest -v
|
|
247
|
+
uv run ruff check src tests
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
<div align="center">
|
|
253
|
+
|
|
254
|
+
**SysMaint v0.1.0 (Sentinel Microservice)** — **Kennny7 Microservices**
|
|
255
|
+
|
|
256
|
+
[User Guide](USER_GUIDE.md) | [Changelog](CHANGELOG.md) | [Issues](https://github.com/Kennny7/sysmaint/issues)
|
|
257
|
+
|
|
258
|
+
</div>
|