@symbeon/orbit-devops 1.0.0
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.
- package/.agent/skills/orbit-devops/SKILL.md +54 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +44 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +33 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +51 -0
- package/.github/dependabot.yml +64 -0
- package/ARCHITECTURE.json +98 -0
- package/AdditionalCleanup.ps1 +70 -0
- package/AnalyzeCursor.ps1 +25 -0
- package/AppDataAudit.ps1 +16 -0
- package/CHANGELOG.md +83 -0
- package/CONFIG_LOG.md +35 -0
- package/CONTRIBUTING.md +203 -0
- package/CategorizedScan.ps1 +37 -0
- package/CategorizedScan_v2.ps1 +38 -0
- package/CheckAnaconda.ps1 +9 -0
- package/CheckAppData.ps1 +8 -0
- package/CheckAppDataRoaming.ps1 +8 -0
- package/CheckBackupSizes.ps1 +17 -0
- package/CheckCacheSize.ps1 +17 -0
- package/CheckNodeModules.ps1 +17 -0
- package/CheckSpace.ps1 +2 -0
- package/CheckTargetSizes.ps1 +17 -0
- package/CheckUserRoot.ps1 +10 -0
- package/DeepStorageAnalysis.ps1 +76 -0
- package/DetailedBloatAudit.ps1 +55 -0
- package/DetailedBloatAudit_v3.ps1 +50 -0
- package/DetailedProcessAudit.ps1 +43 -0
- package/DiagnosticoSistema.ps1 +155 -0
- package/ExecuteCleanup.ps1 +73 -0
- package/ExecuteTotalCleanup.ps1 +86 -0
- package/FinalCategorizedReport.ps1 +49 -0
- package/FinalDeepDive.ps1 +34 -0
- package/ForcePush.ps1 +31 -0
- package/ForensicRAMAudit.ps1 +26 -0
- package/ForensicRAMAudit_UTF8.ps1 +32 -0
- package/ForensicRAMAudit_v2.ps1 +25 -0
- package/ForensicRAMAudit_v3.ps1 +25 -0
- package/FullRAMReport_Local.txt +0 -0
- package/FullRAMReport_UTF8.txt +1400 -0
- package/GiantHunt.ps1 +26 -0
- package/GlobalRAMAudit.ps1 +57 -0
- package/LICENSE +21 -0
- package/MeasureSuspects.ps1 +17 -0
- package/NEXT_STEPS.md +35 -0
- package/Orbit.ps1 +40 -0
- package/PostRebootCleanup.ps1 +60 -0
- package/RAMAudit.ps1 +41 -0
- package/RAMAudit_v2.ps1 +24 -0
- package/README.md +58 -0
- package/RootAudit.ps1 +14 -0
- package/RunDiagnostic.ps1 +119 -0
- package/RunDiagnosticSimple.ps1 +42 -0
- package/SECURITY.md +67 -0
- package/SETUP.md +34 -0
- package/SafeSurgery.ps1 +69 -0
- package/ScanPrograms.ps1 +13 -0
- package/ScanRepoWaste.ps1 +45 -0
- package/ScanStorage.ps1 +41 -0
- package/ScanTargets.ps1 +39 -0
- package/SimpleSurgicalAudit.ps1 +22 -0
- package/SurgicalBloatAudit.ps1 +35 -0
- package/SurgicalScan.ps1 +28 -0
- package/SystemDiagnostic.ps1 +588 -0
- package/SystemDiagnosticSimple.ps1 +141 -0
- package/SystemDiagnosticUser.ps1 +92 -0
- package/SystemDiagnosticUser_v2.ps1 +36 -0
- package/UserAudit.ps1 +23 -0
- package/bin/orbit.js +99 -0
- package/check_environment.ps1 +104 -0
- package/deep_downloads_org_log.txt +15 -0
- package/diagnostic_error.txt +83 -0
- package/diskpart_log.txt +0 -0
- package/docs/DEPRECATED_USERNAME_CHANGE.md +138 -0
- package/docs/PROJECT_STRUCTURE.md +156 -0
- package/downloads_audit.txt +32 -0
- package/downloads_audit_clear.txt +27 -0
- package/downloads_org_log.txt +85 -0
- package/mcp/README.md +61 -0
- package/mcp/server.py +109 -0
- package/package.json +39 -0
- package/scripts/mac/diagnostic.sh +46 -0
- package/scripts/stack/Push-Stack.ps1 +41 -0
- package/scripts/stack/SnapshotEnv.ps1 +22 -0
- package/scripts/utils/DeepOrganizeDownloads.ps1 +82 -0
- package/scripts/utils/OrganizeDownloads.ps1 +40 -0
- package/scripts/wsl/CompactWSL.ps1 +60 -0
- package/setup_environment.ps1 +59 -0
- package/sizes.txt +6 -0
- package/verify_environment.ps1 +46 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Contributing to Windows System Diagnostic & Optimization Toolkit
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to this project! This toolkit was born from a real-world crisis and has already helped recover critical disk space. Your contributions can help many more people.
|
|
4
|
+
|
|
5
|
+
## 🎯 How Can I Contribute?
|
|
6
|
+
|
|
7
|
+
### Reporting Bugs
|
|
8
|
+
|
|
9
|
+
Before creating bug reports, please check existing issues. When creating a bug report, include:
|
|
10
|
+
|
|
11
|
+
- **Windows Version:** (e.g., Windows 11 22H2)
|
|
12
|
+
- **PowerShell Version:** Run `$PSVersionTable.PSVersion`
|
|
13
|
+
- **Script Name:** Which script encountered the issue
|
|
14
|
+
- **Expected Behavior:** What you expected to happen
|
|
15
|
+
- **Actual Behavior:** What actually happened
|
|
16
|
+
- **Error Messages:** Full error text from console/logs
|
|
17
|
+
- **Steps to Reproduce:** Detailed steps to reproduce the issue
|
|
18
|
+
|
|
19
|
+
### Suggesting Enhancements
|
|
20
|
+
|
|
21
|
+
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
|
|
22
|
+
|
|
23
|
+
- **Use Case:** Describe the problem you're trying to solve
|
|
24
|
+
- **Proposed Solution:** Your idea for how to solve it
|
|
25
|
+
- **Alternatives Considered:** Other approaches you've thought about
|
|
26
|
+
- **Additional Context:** Screenshots, examples, etc.
|
|
27
|
+
|
|
28
|
+
### Pull Requests
|
|
29
|
+
|
|
30
|
+
1. **Fork the repo** and create your branch from `main`
|
|
31
|
+
2. **Test your changes** thoroughly on a Windows machine
|
|
32
|
+
3. **Update documentation** if you're adding/changing functionality
|
|
33
|
+
4. **Follow the coding style** used in existing scripts
|
|
34
|
+
5. **Write clear commit messages**
|
|
35
|
+
6. **Submit the PR** with a clear description
|
|
36
|
+
|
|
37
|
+
## 💻 Development Setup
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
# Clone your fork
|
|
41
|
+
git clone https://github.com/YOUR_USERNAME/windows-diagnostic-toolkit.git
|
|
42
|
+
cd windows-diagnostic-toolkit
|
|
43
|
+
|
|
44
|
+
# Create a branch for your feature
|
|
45
|
+
git checkout -b feature/your-feature-name
|
|
46
|
+
|
|
47
|
+
# Make your changes and test them
|
|
48
|
+
# ...
|
|
49
|
+
|
|
50
|
+
# Commit your changes
|
|
51
|
+
git add .
|
|
52
|
+
git commit -m "Add: Brief description of your changes"
|
|
53
|
+
|
|
54
|
+
# Push to your fork
|
|
55
|
+
git push origin feature/your-feature-name
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 📝 Coding Guidelines
|
|
59
|
+
|
|
60
|
+
### PowerShell Style
|
|
61
|
+
|
|
62
|
+
- Use **PascalCase** for function names
|
|
63
|
+
- Use **camelCase** for variables
|
|
64
|
+
- Include **comment blocks** for complex logic
|
|
65
|
+
- Add **error handling** with try/catch
|
|
66
|
+
- Use **Write-Log** function for output (see existing scripts)
|
|
67
|
+
- Include **parameter validation** where appropriate
|
|
68
|
+
|
|
69
|
+
### Example:
|
|
70
|
+
|
|
71
|
+
```powershell
|
|
72
|
+
function Get-LargeFiles {
|
|
73
|
+
param(
|
|
74
|
+
[Parameter(Mandatory=$true)]
|
|
75
|
+
[string]$Path,
|
|
76
|
+
|
|
77
|
+
[Parameter(Mandatory=$false)]
|
|
78
|
+
[int]$MinSizeMB = 100
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
Write-Log "Scanning for files larger than $MinSizeMB MB in $Path"
|
|
83
|
+
|
|
84
|
+
Get-ChildItem $Path -Recurse -File -ErrorAction SilentlyContinue |
|
|
85
|
+
Where-Object { $_.Length -gt ($MinSizeMB * 1MB) } |
|
|
86
|
+
Sort-Object Length -Descending
|
|
87
|
+
|
|
88
|
+
Write-Log "Scan completed successfully"
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
Write-Log "Error during scan: $_" -Type "ERROR"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Documentation
|
|
97
|
+
|
|
98
|
+
- **README.md:** Update if adding new scripts or features
|
|
99
|
+
- **Inline Comments:** Explain *why*, not *what* (code shows what)
|
|
100
|
+
- **Function Headers:** Include purpose, parameters, and return values
|
|
101
|
+
- **Examples:** Provide usage examples for new features
|
|
102
|
+
|
|
103
|
+
## 🧪 Testing
|
|
104
|
+
|
|
105
|
+
Before submitting a PR:
|
|
106
|
+
|
|
107
|
+
1. **Test on clean system:** If possible, test on a fresh Windows install
|
|
108
|
+
2. **Test error cases:** Try invalid inputs, missing files, etc.
|
|
109
|
+
3. **Check logs:** Ensure logging is clear and helpful
|
|
110
|
+
4. **Verify cleanup:** If it's a cleanup script, verify it doesn't delete important data
|
|
111
|
+
5. **Test without admin:** Verify scripts work without elevation (if designed to)
|
|
112
|
+
|
|
113
|
+
## 🎨 Project Structure
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
DIAGNOSTIC_BACKUP/
|
|
117
|
+
├── README.md # Main documentation
|
|
118
|
+
├── LICENSE # MIT License
|
|
119
|
+
├── CONTRIBUTING.md # This file
|
|
120
|
+
│
|
|
121
|
+
├── Core Diagnostic/
|
|
122
|
+
│ ├── SystemDiagnostic.ps1 # Full diagnostic (admin)
|
|
123
|
+
│ ├── SystemDiagnosticUser.ps1 # User-level diagnostic
|
|
124
|
+
│ └── SystemDiagnosticSimple.ps1 # Lightweight scan
|
|
125
|
+
│
|
|
126
|
+
├── Analysis/
|
|
127
|
+
│ ├── ScanStorage.ps1 # Storage analysis
|
|
128
|
+
│ ├── ScanTargets.ps1 # Targeted scans
|
|
129
|
+
│ ├── AnalyzeCursor.ps1 # Cursor-specific
|
|
130
|
+
│ └── CheckAppData.ps1 # AppData analysis
|
|
131
|
+
│
|
|
132
|
+
├── Cleanup/
|
|
133
|
+
│ ├── AdditionalCleanup.ps1 # Safe cleanup
|
|
134
|
+
│ ├── ExecuteCleanup.ps1 # Standard cleanup
|
|
135
|
+
│ ├── ExecuteTotalCleanup.ps1 # Aggressive cleanup
|
|
136
|
+
│ └── PostRebootCleanup.ps1 # Post-reboot tasks
|
|
137
|
+
│
|
|
138
|
+
├── Utilities/
|
|
139
|
+
│ ├── check_environment.ps1 # Environment check
|
|
140
|
+
│ ├── setup_environment.ps1 # Setup helper
|
|
141
|
+
│ └── verify_environment.ps1 # Verification
|
|
142
|
+
│
|
|
143
|
+
└── Documentation/
|
|
144
|
+
├── SETUP.md # Setup guide
|
|
145
|
+
├── NEXT_STEPS.md # Next steps
|
|
146
|
+
└── Reports/ # Generated reports
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## 🏷️ Commit Message Guidelines
|
|
150
|
+
|
|
151
|
+
Use clear, descriptive commit messages:
|
|
152
|
+
|
|
153
|
+
- **Add:** New feature or script
|
|
154
|
+
- **Fix:** Bug fix
|
|
155
|
+
- **Update:** Modify existing functionality
|
|
156
|
+
- **Docs:** Documentation changes
|
|
157
|
+
- **Refactor:** Code restructuring without behavior change
|
|
158
|
+
- **Test:** Adding or updating tests
|
|
159
|
+
|
|
160
|
+
Examples:
|
|
161
|
+
```
|
|
162
|
+
Add: Browser cache cleanup to AdditionalCleanup.ps1
|
|
163
|
+
Fix: Handle missing Docker installation gracefully
|
|
164
|
+
Update: Improve error messages in SystemDiagnostic.ps1
|
|
165
|
+
Docs: Add troubleshooting section to README
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## 🌟 Feature Ideas
|
|
169
|
+
|
|
170
|
+
Looking for contribution ideas? Here are some:
|
|
171
|
+
|
|
172
|
+
### High Priority
|
|
173
|
+
- [ ] Add Linux/macOS versions of diagnostic scripts
|
|
174
|
+
- [ ] Create automated tests
|
|
175
|
+
- [ ] Add GitHub Actions CI/CD
|
|
176
|
+
- [ ] Improve error handling across all scripts
|
|
177
|
+
|
|
178
|
+
### Medium Priority
|
|
179
|
+
- [ ] GUI wrapper using Windows Forms
|
|
180
|
+
- [ ] Scheduled task automation
|
|
181
|
+
- [ ] Export reports to JSON/CSV
|
|
182
|
+
- [ ] Integration with Windows Event Log
|
|
183
|
+
|
|
184
|
+
### Nice to Have
|
|
185
|
+
- [ ] Machine learning for cleanup recommendations
|
|
186
|
+
- [ ] Multi-language support
|
|
187
|
+
- [ ] Cloud backup integration warnings
|
|
188
|
+
- [ ] Performance benchmarking
|
|
189
|
+
|
|
190
|
+
## 📞 Questions?
|
|
191
|
+
|
|
192
|
+
- **General Questions:** Open a GitHub Discussion
|
|
193
|
+
- **Bug Reports:** Open a GitHub Issue
|
|
194
|
+
- **Security Issues:** Email directly (don't open public issue)
|
|
195
|
+
|
|
196
|
+
## 🙏 Recognition
|
|
197
|
+
|
|
198
|
+
Contributors will be recognized in:
|
|
199
|
+
- README.md contributors section
|
|
200
|
+
- Release notes
|
|
201
|
+
- Project documentation
|
|
202
|
+
|
|
203
|
+
Thank you for helping make Windows system maintenance easier for everyone! 🎉
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
$ErrorActionPreference = "SilentlyContinue"
|
|
2
|
+
$root = "c:\Users\João\Desktop\PROJETOS"
|
|
3
|
+
$categories = Get-ChildItem $root -Directory | Where-Object { $_.Name -match "^\d+|GUARDRIVE|_SCRIPTS" }
|
|
4
|
+
|
|
5
|
+
Write-Host "=== CATEGORIZED DEV-BLOAT SCAN ===" -ForegroundColor Cyan
|
|
6
|
+
$report = @()
|
|
7
|
+
|
|
8
|
+
foreach ($cat in $categories) {
|
|
9
|
+
Write-Host "Scanning $($cat.Name)..." -NoNewline
|
|
10
|
+
$bloat = Get-ChildItem $cat.FullName -Recurse -Directory -Force -ErrorAction SilentlyContinue | Where-Object {
|
|
11
|
+
$_.Name -eq "node_modules" -or
|
|
12
|
+
$_.Name -eq "target" -or
|
|
13
|
+
$_.Name -eq "venv" -or
|
|
14
|
+
$_.Name -eq ".venv" -or
|
|
15
|
+
$_.Name -eq "dist" -or
|
|
16
|
+
$_.Name -eq "build"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
foreach ($b in $bloat) {
|
|
20
|
+
# Only count if it's not nested inside another bloat folder (like node_modules/something/node_modules)
|
|
21
|
+
if ($b.FullName -notmatch "node_modules.*node_modules") {
|
|
22
|
+
$size = Get-ChildItem $b.FullName -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
23
|
+
if ($size.Sum -gt 1MB) {
|
|
24
|
+
$report += [PSCustomObject]@{
|
|
25
|
+
Category = $cat.Name
|
|
26
|
+
Project = $b.Parent.Name
|
|
27
|
+
Type = $b.Name
|
|
28
|
+
SizeMB = [math]::Round($size.Sum / 1MB, 2)
|
|
29
|
+
FullPath = $b.FullName
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
Write-Host " Done."
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
$report | Sort-Object SizeMB -Descending | Format-Table -AutoSize
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$ErrorActionPreference = "SilentlyContinue"
|
|
2
|
+
$root = "c:\Users\João\Desktop\PROJETOS"
|
|
3
|
+
$categories = @("00_ECOSYSTEM_COMERCIAL", "01_CORE_SYSTEMS", "02_ORGANIZATIONS", "03_AI_AGENTS", "04_DEVELOPER_TOOLS", "05_PLATFORMS", "06_UTILITIES", "07_RESEARCH", "08_PROFILE", "GUARDRIVE", "_SCRIPTS")
|
|
4
|
+
|
|
5
|
+
Write-Host "=== CATEGORIZED DEV-BLOAT SCAN (v2) ===" -ForegroundColor Cyan
|
|
6
|
+
$report = @()
|
|
7
|
+
|
|
8
|
+
foreach ($catName in $categories) {
|
|
9
|
+
# Manual path joining to avoid Join-JoinPath typo or other issues
|
|
10
|
+
$catPath = "$root\$catName"
|
|
11
|
+
if (-not (Test-Path $catPath)) { continue }
|
|
12
|
+
|
|
13
|
+
Write-Host "Scanning $catName ..."
|
|
14
|
+
$bloat = Get-ChildItem -Path $catPath -Recurse -Directory -Force -ErrorAction SilentlyContinue | Where-Object {
|
|
15
|
+
$_.Name -eq "node_modules" -or
|
|
16
|
+
$_.Name -eq "target" -or
|
|
17
|
+
$_.Name -eq "venv" -or
|
|
18
|
+
$_.Name -eq ".venv" -or
|
|
19
|
+
$_.Name -eq "dist" -or
|
|
20
|
+
$_.Name -eq "build"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
foreach ($b in $bloat) {
|
|
24
|
+
if ($b.FullName -notmatch "node_modules.*node_modules") {
|
|
25
|
+
$size = Get-ChildItem $b.FullName -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
26
|
+
if ($size.Sum -gt 1MB) {
|
|
27
|
+
$report += [PSCustomObject]@{
|
|
28
|
+
Category = $catName
|
|
29
|
+
Project = $b.Parent.Name
|
|
30
|
+
Type = $b.Name
|
|
31
|
+
SizeMB = [math]::Round($size.Sum / 1MB, 2)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
$report | Sort-Object SizeMB -Descending | Format-Table -AutoSize
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
$path = "$env:USERPROFILE\anaconda3"
|
|
2
|
+
if (Test-Path $path) {
|
|
3
|
+
Write-Host "Checking Anaconda at $path ..."
|
|
4
|
+
$size = Get-ChildItem $path -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
5
|
+
Write-Host "SIZE: $([math]::Round($size.Sum / 1GB, 2)) GB"
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
Write-Host "Anaconda Gone"
|
|
9
|
+
}
|
package/CheckAppData.ps1
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
$path = "$env:USERPROFILE\AppData\Local"
|
|
3
|
+
Get-ChildItem $path -Directory -ErrorAction SilentlyContinue | ForEach-Object {
|
|
4
|
+
$size = (Get-ChildItem $_.FullName -Recurse -File -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum / 1GB
|
|
5
|
+
if ($size -gt 1) {
|
|
6
|
+
Write-Host "$($_.Name): $([math]::Round($size, 2)) GB"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
$path = "$env:USERPROFILE\AppData\Roaming"
|
|
3
|
+
Get-ChildItem $path -Directory -ErrorAction SilentlyContinue | ForEach-Object {
|
|
4
|
+
$size = (Get-ChildItem $_.FullName -Recurse -File -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum / 1GB
|
|
5
|
+
if ($size -gt 0.5) {
|
|
6
|
+
Write-Host "$($_.Name): $([math]::Round($size, 2)) GB"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
$paths = @(
|
|
2
|
+
"$env:USERPROFILE\Desktop\PROJETOS\02_ORGANIZATIONS\MOBILIDADE\guardrive-core-backup",
|
|
3
|
+
"$env:USERPROFILE\Desktop\PROJETOS\05_PLATFORMS\SYMBEON-AI\SYMBEON\backup",
|
|
4
|
+
"$env:USERPROFILE\Desktop\PROJETOS\04_DEVELOPER_TOOLS\GITHUB_PROFILE_NEO_SH1W4\backups"
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
Write-Host "=== BACKUP SIZE ANALYSIS ==="
|
|
8
|
+
foreach ($p in $paths) {
|
|
9
|
+
if (Test-Path $p) {
|
|
10
|
+
Write-Host "Measuring $p ..."
|
|
11
|
+
$size = Get-ChildItem $p -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
12
|
+
Write-Host "SIZE: $([math]::Round($size.Sum / 1GB, 2)) GB"
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
Write-Host "Not found: $p"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
$paths = @(
|
|
2
|
+
"$env:USERPROFILE\AppData\Roaming\Code\User\workspaceStorage",
|
|
3
|
+
"$env:USERPROFILE\AppData\Local\npm-cache",
|
|
4
|
+
"$env:USERPROFILE\AppData\Local\pip\cache",
|
|
5
|
+
"$env:USERPROFILE\.gradle\caches"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
Write-Host "=== CACHE ANALYSIS ==="
|
|
9
|
+
foreach ($p in $paths) {
|
|
10
|
+
if (Test-Path $p) {
|
|
11
|
+
$size = Get-ChildItem $p -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
12
|
+
Write-Host "$p : $([math]::Round($size.Sum / 1GB, 2)) GB"
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
Write-Host "Not found: $p"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
$paths = @(
|
|
2
|
+
"$env:USERPROFILE\Desktop\PROJETOS\05_PLATFORMS\SYMBEON-ECOSYSTEM\node_modules",
|
|
3
|
+
"$env:USERPROFILE\Desktop\PROJETOS\03_AI_AGENTS\VIREON\frontend\node_modules",
|
|
4
|
+
"$env:USERPROFILE\Desktop\PROJETOS\04_DEVELOPER_TOOLS\SynPhytica\web\node_modules",
|
|
5
|
+
"$env:USERPROFILE\Desktop\PROJETOS\04_DEVELOPER_TOOLS\GITHUB_MASTERY\node_modules",
|
|
6
|
+
"$env:USERPROFILE\Desktop\PROJETOS\00_ECOSYSTEM_COMERCIAL\SEVE-FRAMEWORK\SEVE-FRAMEWORK\node_modules",
|
|
7
|
+
"$env:USERPROFILE\Desktop\PROJETOS\02_ORGANIZATIONS\VAREJO\GuardFlow\frontend\node_modules"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
Write-Host "=== NODE_MODULES SIZE ANALYSIS ==="
|
|
11
|
+
foreach ($p in $paths) {
|
|
12
|
+
if (Test-Path $p) {
|
|
13
|
+
Write-Host "Measuring $p ..."
|
|
14
|
+
$size = Get-ChildItem $p -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
15
|
+
Write-Host "SIZE: $([math]::Round($size.Sum / 1MB, 2)) MB"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/CheckSpace.ps1
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
$paths = @(
|
|
2
|
+
"$env:USERPROFILE\AppData\Local\Docker\wsl\main\ext4.vhdx",
|
|
3
|
+
"$env:USERPROFILE\AppData\Local\Docker\wsl\disk\docker_data.vhdx",
|
|
4
|
+
"$env:USERPROFILE\Downloads\The_Matrix_Path_of_Neo_Win_ISO_EN.7z",
|
|
5
|
+
"$env:USERPROFILE\Downloads\The_Matrix_Path_of_Neo_Win_Files_EN.7z",
|
|
6
|
+
"$env:USERPROFILE\Downloads\560.81-notebook-win10-win11-64bit-international-dch-whql.exe"
|
|
7
|
+
)
|
|
8
|
+
Write-Host "=== TARGETED FILE SIZES ==="
|
|
9
|
+
foreach ($p in $paths) {
|
|
10
|
+
if (Test-Path $p) {
|
|
11
|
+
$f = Get-Item $p
|
|
12
|
+
Write-Host "$($f.Name) : $([math]::Round($f.Length / 1GB, 2)) GB"
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
Write-Host "Not found: $p"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
$path = "$env:USERPROFILE"
|
|
3
|
+
Get-ChildItem $path -Directory -ErrorAction SilentlyContinue | ForEach-Object {
|
|
4
|
+
if ($_.Name -notin @("AppData", "Documents", "Downloads", "Desktop")) {
|
|
5
|
+
$size = (Get-ChildItem $_.FullName -Recurse -File -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum / 1GB
|
|
6
|
+
if ($size -gt 1) {
|
|
7
|
+
Write-Host "$($_.Name): $([math]::Round($size, 2)) GB"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
$ErrorActionPreference = "SilentlyContinue"
|
|
2
|
+
|
|
3
|
+
function Get-FriendlySize {
|
|
4
|
+
param($Bytes)
|
|
5
|
+
if ($Bytes -gt 1GB) {
|
|
6
|
+
return "$([math]::Round($Bytes / 1GB, 2)) GB"
|
|
7
|
+
}
|
|
8
|
+
elseif ($Bytes -gt 1MB) {
|
|
9
|
+
return "$([math]::Round($Bytes / 1MB, 2)) MB"
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return "$Bytes Bytes"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
Write-Host "=== DEEP STORAGE ANALYSIS ===" -ForegroundColor Cyan
|
|
17
|
+
Write-Host ""
|
|
18
|
+
|
|
19
|
+
# 1. Check WSL Virtual Disks
|
|
20
|
+
Write-Host "[1] Checking for WSL Virtual Disks (*.vhdx)..." -ForegroundColor Yellow
|
|
21
|
+
$vhdxFiles = Get-ChildItem -Path "$env:USERPROFILE\AppData\Local\Packages" -Filter "*.vhdx" -Recurse -ErrorAction SilentlyContinue
|
|
22
|
+
if ($vhdxFiles) {
|
|
23
|
+
foreach ($file in $vhdxFiles) {
|
|
24
|
+
Write-Host " FOUND: $($file.FullName)" -ForegroundColor Red
|
|
25
|
+
Write-Host " SIZE: $(Get-FriendlySize $file.Length)" -ForegroundColor Red
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
Write-Host " No huge WSL disks found in standard location." -ForegroundColor Green
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
# 2. Check Specific Dev Folders
|
|
33
|
+
Write-Host ""
|
|
34
|
+
Write-Host "[2] Checking Key Developer Folders..." -ForegroundColor Yellow
|
|
35
|
+
$targets = @(
|
|
36
|
+
"$env:USERPROFILE\AppData\Local\Docker",
|
|
37
|
+
"$env:ProgramData\Docker",
|
|
38
|
+
"$env:USERPROFILE\.docker",
|
|
39
|
+
"$env:USERPROFILE\anaconda3",
|
|
40
|
+
"$env:USERPROFILE\AppData\Local\Temp",
|
|
41
|
+
"$env:USERPROFILE\AppData\Local\NVIDIA",
|
|
42
|
+
"$env:USERPROFILE\AppData\Roaming\Code\User\workspaceStorage",
|
|
43
|
+
"$env:USERPROFILE\AppData\Roaming\Slack"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
foreach ($path in $targets) {
|
|
47
|
+
if (Test-Path $path) {
|
|
48
|
+
Write-Host " Measuring: $path ..."
|
|
49
|
+
$size = Get-ChildItem $path -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
50
|
+
Write-Host " RESULT: $(Get-FriendlySize $size.Sum)" -ForegroundColor Cyan
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# 3. Top 20 Largest Files in User Profile
|
|
55
|
+
Write-Host ""
|
|
56
|
+
Write-Host "[3] Top 20 Largest Files in User Profile (Standard Folders)..." -ForegroundColor Yellow
|
|
57
|
+
$searchPaths = @(
|
|
58
|
+
"$env:USERPROFILE\Downloads",
|
|
59
|
+
"$env:USERPROFILE\Documents",
|
|
60
|
+
"$env:USERPROFILE\Desktop",
|
|
61
|
+
"$env:USERPROFILE\Videos"
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
$largeFiles = foreach ($path in $searchPaths) {
|
|
65
|
+
if (Test-Path $path) {
|
|
66
|
+
Get-ChildItem $path -Recurse -File -ErrorAction SilentlyContinue | Select-Object Name, FullName, Length
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
$largeFiles | Sort-Object Length -Descending | Select-Object -First 20 | ForEach-Object {
|
|
71
|
+
Write-Host " $(Get-FriendlySize $_.Length) - $($_.FullName)"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
Write-Host ""
|
|
75
|
+
Write-Host "=== ANALYSIS COMPLETE ===" -ForegroundColor Cyan
|
|
76
|
+
exit 0
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
$ErrorActionPreference = "SilentlyContinue"
|
|
2
|
+
$root = "c:\Users\João\Desktop\PROJETOS"
|
|
3
|
+
$categories = @("00_ECOSYSTEM_COMERCIAL", "01_CORE_SYSTEMS", "02_ORGANIZATIONS", "03_AI_AGENTS", "04_DEVELOPER_TOOLS", "05_PLATFORMS", "06_UTILITIES", "07_RESEARCH", "08_PROFILE", "GUARDRIVE", "_SCRIPTS")
|
|
4
|
+
|
|
5
|
+
Write-Host "=== RELATORIO DETALHADO DE RESQUICIOS DEV ===" -ForegroundColor Cyan
|
|
6
|
+
Write-Host "Analisando categorias em $root..."
|
|
7
|
+
|
|
8
|
+
$finalReport = @()
|
|
9
|
+
$totalSize = 0
|
|
10
|
+
|
|
11
|
+
foreach ($cat in $categories) {
|
|
12
|
+
$catPath = "$root\$cat"
|
|
13
|
+
if (-not (Test-Path $catPath)) { continue }
|
|
14
|
+
|
|
15
|
+
$catNode = 0
|
|
16
|
+
$catRust = 0
|
|
17
|
+
$catPy = 0
|
|
18
|
+
|
|
19
|
+
# 1. node_modules (Excluindo aninhados)
|
|
20
|
+
$nodes = Get-ChildItem -Path $catPath -Filter "node_modules" -Recurse -Directory -Force | Where-Object { $_.FullName -notmatch "node_modules.*node_modules" }
|
|
21
|
+
foreach ($n in $nodes) {
|
|
22
|
+
$s = Get-ChildItem $n.FullName -Recurse -Force | Measure-Object -Property Length -Sum
|
|
23
|
+
$catNode += $s.Sum
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# 2. target (Rust builds)
|
|
27
|
+
$targets = Get-ChildItem -Path $catPath -Filter "target" -Recurse -Directory -Force
|
|
28
|
+
foreach ($t in $targets) {
|
|
29
|
+
$s = Get-ChildItem $t.FullName -Recurse -Force | Measure-Object -Property Length -Sum
|
|
30
|
+
$catRust += $s.Sum
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# 3. venv / .venv (Python environments)
|
|
34
|
+
$venvs = Get-ChildItem -Path $catPath -Include "venv", ".venv" -Recurse -Directory -Force
|
|
35
|
+
foreach ($v in $venvs) {
|
|
36
|
+
$s = Get-ChildItem $v.FullName -Recurse -Force | Measure-Object -Property Length -Sum
|
|
37
|
+
$catPy += $s.Sum
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
$subTotal = $catNode + $catRust + $catPy
|
|
41
|
+
$totalSize += $subTotal
|
|
42
|
+
|
|
43
|
+
if ($subTotal -gt 0) {
|
|
44
|
+
$finalReport += [PSCustomObject]@{
|
|
45
|
+
Categoria = $cat
|
|
46
|
+
"JS/Node(GB)" = [math]::Round($catNode / 1GB, 2)
|
|
47
|
+
"Rust/Target(GB)" = [math]::Round($catRust / 1GB, 2)
|
|
48
|
+
"Python/Venv(GB)" = [math]::Round($catPy / 1GB, 2)
|
|
49
|
+
"SUBTOTAL(GB)" = [math]::Round($subTotal / 1GB, 3)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
$finalReport | Sort-Object "SUBTOTAL(GB)" -Descending | Format-Table -AutoSize
|
|
55
|
+
Write-Host "`nTOTAL ACUMULADO EM RESQUICIOS: $([math]::Round($totalSize / 1GB, 2)) GB" -ForegroundColor Green
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
$ErrorActionPreference = "SilentlyContinue"
|
|
2
|
+
# Using environment variable to avoid encoding issues with 'João'
|
|
3
|
+
$userPath = [System.IO.Path]::Combine($env:USERPROFILE, "Desktop", "PROJETOS")
|
|
4
|
+
$categories = @("00_ECOSYSTEM_COMERCIAL", "01_CORE_SYSTEMS", "02_ORGANIZATIONS", "03_AI_AGENTS", "04_DEVELOPER_TOOLS", "05_PLATFORMS", "06_UTILITIES", "07_RESEARCH", "08_PROFILE", "GUARDRIVE", "_SCRIPTS")
|
|
5
|
+
|
|
6
|
+
Write-Host "=== RELATORIO DETALHADO DE RESQUICIOS DEV (v3) ===" -ForegroundColor Cyan
|
|
7
|
+
Write-Host "Analisando projetos em: $userPath"
|
|
8
|
+
|
|
9
|
+
$report = @()
|
|
10
|
+
$grandTotal = 0
|
|
11
|
+
|
|
12
|
+
foreach ($cat in $categories) {
|
|
13
|
+
$catPath = Join-Path $userPath $cat
|
|
14
|
+
if (-not (Test-Path $catPath)) { continue }
|
|
15
|
+
|
|
16
|
+
$jsSize = 0
|
|
17
|
+
$rustSize = 0
|
|
18
|
+
$pySize = 0
|
|
19
|
+
|
|
20
|
+
# Fast search for directories
|
|
21
|
+
$folders = Get-ChildItem -Path $catPath -Recurse -Directory -Force -ErrorAction SilentlyContinue | Where-Object {
|
|
22
|
+
$_.Name -eq "node_modules" -or $_.Name -eq "target" -or $_.Name -eq "venv" -or $_.Name -eq ".venv"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
foreach ($f in $folders) {
|
|
26
|
+
# Avoid counting internal node_modules (e.g. node_modules/somepkg/node_modules)
|
|
27
|
+
if ($f.Name -eq "node_modules" -and $f.FullName -match "node_modules.*node_modules") { continue }
|
|
28
|
+
|
|
29
|
+
$size = (Get-ChildItem $f.FullName -Recurse -File -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
|
|
30
|
+
if ($f.Name -eq "node_modules") { $jsSize += $size }
|
|
31
|
+
elseif ($f.Name -eq "target") { $rustSize += $size }
|
|
32
|
+
else { $pySize += $size }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
$subTotal = $jsSize + $rustSize + $pySize
|
|
36
|
+
$grandTotal += $subTotal
|
|
37
|
+
|
|
38
|
+
if ($subTotal -gt 0) {
|
|
39
|
+
$report += [PSCustomObject]@{
|
|
40
|
+
Categoria = $cat
|
|
41
|
+
"Node_JS(GB)" = [math]::Round($jsSize / 1GB, 2)
|
|
42
|
+
"Rust_Build(GB)" = [math]::Round($rustSize / 1GB, 2)
|
|
43
|
+
"Py_Venv(GB)" = [math]::Round($pySize / 1GB, 2)
|
|
44
|
+
"TOTAL(GB)" = [math]::Round($subTotal / 1GB, 2)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$report | Sort-Object "TOTAL(GB)" -Descending | Format-Table -AutoSize
|
|
50
|
+
Write-Host "GANHO TOTAL POSSIVEL: $([math]::Round($grandTotal / 1GB, 2)) GB" -ForegroundColor Green
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
$ErrorActionPreference = "SilentlyContinue"
|
|
2
|
+
|
|
3
|
+
Write-Host "=== ANALISE CIRURGICA DE PROCESSOS (8GB RAM) ===" -ForegroundColor Cyan
|
|
4
|
+
$report = @()
|
|
5
|
+
|
|
6
|
+
# Pegar todos os processos com informacoes de empresa e titulo
|
|
7
|
+
$procs = Get-Process | Select-Object Name, Id, WorkingSet, @{Name = 'Company'; Expression = { $_.Company } }, @{Name = 'Description'; Expression = { $_.Description } } | Sort-Object WorkingSet -Descending
|
|
8
|
+
|
|
9
|
+
Write-Host "--- TOP 30 CONSUMIDORES DETALHADOS ---" -ForegroundColor Yellow
|
|
10
|
+
$p30 = $procs | Select-Object -First 30
|
|
11
|
+
foreach ($p in $p30) {
|
|
12
|
+
$mb = [math]::Round($p.WorkingSet / 1MB, 2)
|
|
13
|
+
Write-Host "- $($p.Name) [$mb MB] : $($p.Description) ($($p.Company))"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
Write-Host "`n--- FOCO: CLUSTER ACER (MANUTENCAO/BLOATWARE) ---" -ForegroundColor Yellow
|
|
17
|
+
$acer = $procs | Where-Object { $_.Name -match "Acer" -or $_.Company -match "Acer" -or $_.Description -match "Acer" }
|
|
18
|
+
if ($acer) {
|
|
19
|
+
foreach ($a in $acer) {
|
|
20
|
+
$mb = [math]::Round($a.WorkingSet / 1MB, 2)
|
|
21
|
+
Write-Host "- $($a.Name) [$mb MB] : $($a.Description)"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
Write-Host "Nenhum processo Acer encontrado nos top ativos."
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Write-Host "`n--- FOCO: PROCESSOS DO WINDOWS (SISTEMA) ---" -ForegroundColor Yellow
|
|
29
|
+
$winTargets = @("wsappx", "System", "ShellExperienceHost", "SearchHost", "SgrmBroker", "MsMpEng")
|
|
30
|
+
foreach ($t in $winTargets) {
|
|
31
|
+
$matched = $procs | Where-Object { $_.Name -eq $t }
|
|
32
|
+
if ($matched) {
|
|
33
|
+
$mb = [math]::Round(($matched | Measure-Object WorkingSet -Sum).Sum / 1MB, 2)
|
|
34
|
+
Write-Host "- $t : $mb MB (Essencial para o SO)"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Write-Host "`n--- FOCO: DESENVOLVIMENTO (NODE/PYTHON/LANGUAGE) ---" -ForegroundColor Yellow
|
|
39
|
+
$dev = $procs | Where-Object { $_.Name -match "node|python|language_server|code" }
|
|
40
|
+
foreach ($d in $dev) {
|
|
41
|
+
$mb = [math]::Round($d.WorkingSet / 1MB, 2)
|
|
42
|
+
Write-Host "- $($d.Name) [$mb MB] : $($d.Description)"
|
|
43
|
+
}
|