@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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#Requires -RunAsAdministrator
|
|
2
|
+
|
|
3
|
+
# Configuração de codificação para UTF-8
|
|
4
|
+
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
|
|
5
|
+
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
6
|
+
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
7
|
+
|
|
8
|
+
# Definir caminho do relatório
|
|
9
|
+
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
|
10
|
+
$reportPath = Join-Path ([Environment]::GetFolderPath("Desktop")) "diagnostico_sistema_$timestamp.txt"
|
|
11
|
+
|
|
12
|
+
# Função para escrever no relatório
|
|
13
|
+
function Write-Report {
|
|
14
|
+
param(
|
|
15
|
+
[Parameter(Mandatory=$true)]
|
|
16
|
+
[string]$Message,
|
|
17
|
+
[string]$Type = "INFO"
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
$time = Get-Date -Format "HH:mm:ss"
|
|
21
|
+
$line = "[$time] [$Type] $Message"
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
# Escrever diretamente no arquivo usando .NET para garantir codificação
|
|
25
|
+
[System.IO.File]::AppendAllText($reportPath, $line + "`r`n", [System.Text.Encoding]::UTF8)
|
|
26
|
+
|
|
27
|
+
# Mostrar na tela com cores
|
|
28
|
+
switch ($Type) {
|
|
29
|
+
"ERRO" { Write-Host $line -ForegroundColor Red }
|
|
30
|
+
"AVISO" { Write-Host $line -ForegroundColor Yellow }
|
|
31
|
+
"SUCESSO" { Write-Host $line -ForegroundColor Green }
|
|
32
|
+
default { Write-Host $line }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
Write-Host "ERRO ao escrever no arquivo: $_" -ForegroundColor Red
|
|
37
|
+
exit 1
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
# Início do diagnóstico
|
|
42
|
+
Write-Report "Iniciando diagnóstico do sistema"
|
|
43
|
+
Write-Report "Relatório será salvo em: $reportPath" -Type "SUCESSO"
|
|
44
|
+
|
|
45
|
+
# 1. Sistema Operacional
|
|
46
|
+
Write-Report "`r`n=== Sistema Operacional ===" -Type "INFO"
|
|
47
|
+
try {
|
|
48
|
+
$os = Get-CimInstance Win32_OperatingSystem
|
|
49
|
+
Write-Report "Nome: $($os.Caption)" -Type "SUCESSO"
|
|
50
|
+
Write-Report "Versão: $($os.Version)" -Type "SUCESSO"
|
|
51
|
+
Write-Report "Arquitetura: $($os.OSArchitecture)" -Type "SUCESSO"
|
|
52
|
+
Write-Report "Último Boot: $($os.LastBootUpTime)" -Type "SUCESSO"
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
Write-Report "Erro ao obter informações do sistema: $_" -Type "ERRO"
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
# 2. Hardware
|
|
59
|
+
Write-Report "`r`n=== Hardware ===" -Type "INFO"
|
|
60
|
+
try {
|
|
61
|
+
# CPU
|
|
62
|
+
$cpu = Get-CimInstance Win32_Processor
|
|
63
|
+
Write-Report "Processador: $($cpu.Name)" -Type "SUCESSO"
|
|
64
|
+
Write-Report "Núcleos: $($cpu.NumberOfCores)" -Type "SUCESSO"
|
|
65
|
+
|
|
66
|
+
# Memória
|
|
67
|
+
$memory = Get-CimInstance Win32_ComputerSystem
|
|
68
|
+
$totalMemoryGB = [math]::Round($memory.TotalPhysicalMemory / 1GB, 2)
|
|
69
|
+
Write-Report "Memória Total: $totalMemoryGB GB" -Type "SUCESSO"
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
Write-Report "Erro ao obter informações de hardware: $_" -Type "ERRO"
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
# 3. Discos
|
|
76
|
+
Write-Report "`r`n=== Discos ===" -Type "INFO"
|
|
77
|
+
try {
|
|
78
|
+
Get-Volume | Where-Object {$_.DriveLetter} | ForEach-Object {
|
|
79
|
+
$free = [math]::Round($_.SizeRemaining / 1GB, 2)
|
|
80
|
+
$total = [math]::Round($_.Size / 1GB, 2)
|
|
81
|
+
$used = [math]::Round(100 - (($_.SizeRemaining / $_.Size) * 100), 2)
|
|
82
|
+
|
|
83
|
+
if ($used -gt 90) {
|
|
84
|
+
Write-Report "Drive $($_.DriveLetter): $free GB livres de $total GB ($used% usado)" -Type "AVISO"
|
|
85
|
+
} else {
|
|
86
|
+
Write-Report "Drive $($_.DriveLetter): $free GB livres de $total GB ($used% usado)" -Type "SUCESSO"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
Write-Report "Erro ao obter informações dos discos: $_" -Type "ERRO"
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
# 4. Serviços Críticos
|
|
95
|
+
Write-Report "`r`n=== Serviços Críticos ===" -Type "INFO"
|
|
96
|
+
$servicosImportantes = @(
|
|
97
|
+
"wuauserv", # Windows Update
|
|
98
|
+
"WinDefend", # Windows Defender
|
|
99
|
+
"RpcSs", # Remote Procedure Call
|
|
100
|
+
"EventLog" # Windows Event Log
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
foreach ($servico in $servicosImportantes) {
|
|
104
|
+
try {
|
|
105
|
+
$status = Get-Service -Name $servico -ErrorAction Stop
|
|
106
|
+
if ($status.Status -eq "Running") {
|
|
107
|
+
Write-Report "$($status.DisplayName): Em execução" -Type "SUCESSO"
|
|
108
|
+
} else {
|
|
109
|
+
Write-Report "$($status.DisplayName): Parado" -Type "AVISO"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
Write-Report "Erro ao verificar serviço $servico" -Type "ERRO"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# Verificar se o relatório foi criado com sucesso
|
|
118
|
+
if (Test-Path $reportPath) {
|
|
119
|
+
$fileInfo = Get-Item $reportPath
|
|
120
|
+
Write-Report "`r`n=== Relatório Gerado com Sucesso ===" -Type "SUCESSO"
|
|
121
|
+
Write-Report "Caminho: $($fileInfo.FullName)" -Type "SUCESSO"
|
|
122
|
+
Write-Report "Tamanho: $([math]::Round($fileInfo.Length/1KB, 2)) KB" -Type "SUCESSO"
|
|
123
|
+
Write-Report "Hora: $($fileInfo.LastWriteTime)" -Type "SUCESSO"
|
|
124
|
+
|
|
125
|
+
# Testar leitura do arquivo
|
|
126
|
+
try {
|
|
127
|
+
$null = Get-Content $reportPath -Encoding UTF8 -ErrorAction Stop
|
|
128
|
+
Write-Report "Verificação de leitura: OK" -Type "SUCESSO"
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
Write-Report "Erro ao ler o arquivo gerado: $_" -Type "ERRO"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
Write-Report "ERRO: Falha ao gerar relatório!" -Type "ERRO"
|
|
136
|
+
exit 1
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
Write-Report "Diagnóstico concluído" -Type "SUCESSO"
|
|
140
|
+
exit 0
|
|
141
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
|
|
2
|
+
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
|
3
|
+
$reportPath = ".\diagnostico_sistema_$timestamp.txt"
|
|
4
|
+
|
|
5
|
+
function Write-Log {
|
|
6
|
+
param($Message)
|
|
7
|
+
$line = "[$(Get-Date -Format 'HH:mm:ss')] $Message"
|
|
8
|
+
Write-Output $line
|
|
9
|
+
$line | Out-File -FilePath $reportPath -Append -Encoding utf8
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Write-Log "=== INICIANDO DIAGNÓSTICO COMPLETO (USER MODE) ==="
|
|
13
|
+
|
|
14
|
+
# 1. OS & Uptime
|
|
15
|
+
$os = Get-CimInstance Win32_OperatingSystem -ErrorAction SilentlyContinue
|
|
16
|
+
if ($os) {
|
|
17
|
+
Write-Log "OS: $($os.Caption) ($($os.OSArchitecture))"
|
|
18
|
+
Write-Log "Versão: $($os.Version)"
|
|
19
|
+
Write-Log "Último Boot: $($os.LastBootUpTime)"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
# 2. CPU & Memory
|
|
23
|
+
try {
|
|
24
|
+
$cpu = Get-CimInstance Win32_Processor -ErrorAction Stop
|
|
25
|
+
Write-Log "CPU: $($cpu.Name)"
|
|
26
|
+
|
|
27
|
+
$mem = Get-CimInstance Win32_ComputerSystem
|
|
28
|
+
$totalMem = [math]::Round($mem.TotalPhysicalMemory / 1GB, 2)
|
|
29
|
+
|
|
30
|
+
# Get free memory
|
|
31
|
+
$osInfo = Get-CimInstance Win32_OperatingSystem
|
|
32
|
+
$freeMem = [math]::Round($osInfo.FreePhysicalMemory / 1024 / 1024, 2) # GB
|
|
33
|
+
$usedMemPct = [math]::Round((($totalMem - $freeMem) / $totalMem) * 100, 1)
|
|
34
|
+
|
|
35
|
+
Write-Log "Memória: Total $totalMem GB | Livre $freeMem GB | Uso: $usedMemPct%"
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
Write-Log "Erro ao verificar Hardware: $_"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
# 3. Disk Space
|
|
42
|
+
Write-Log "`n--- DISCOS ---"
|
|
43
|
+
Get-Volume | Where-Object { $_.DriveLetter } | ForEach-Object {
|
|
44
|
+
$free = [math]::Round($_.SizeRemaining / 1GB, 2)
|
|
45
|
+
$total = [math]::Round($_.Size / 1GB, 2)
|
|
46
|
+
$pctFree = [math]::Round(($free / $total) * 100, 1)
|
|
47
|
+
|
|
48
|
+
$status = "OK"
|
|
49
|
+
if ($pctFree -lt 10) { $status = "CRÍTICO (<10% livre)" }
|
|
50
|
+
elseif ($pctFree -lt 20) { $status = "ALERTA (<20% livre)" }
|
|
51
|
+
|
|
52
|
+
Write-Log "Drive $($_.DriveLetter): $free GB livres de $total GB ($pctFree%) - $status"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# 4. Network
|
|
56
|
+
Write-Log "`n--- REDE ---"
|
|
57
|
+
try {
|
|
58
|
+
$test = Test-Connection -TargetName "google.com" -Count 1 -Quiet
|
|
59
|
+
Write-Log ("Internet (google.com): " + (if ($test) { 'Conectado' }else { 'Falha' }))
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
Write-Log ("Erro no teste de rede: " + $_)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
# 5. Top Consumers
|
|
66
|
+
Write-Log "`n--- TOP PROCESSOS (CPU) ---"
|
|
67
|
+
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 | ForEach-Object {
|
|
68
|
+
Write-Log ("$($_.ProcessName): " + [math]::Round($_.CPU, 1) + "s CPU")
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
Write-Log "`n--- TOP PROCESSOS (RAM) ---"
|
|
72
|
+
Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 5 | ForEach-Object {
|
|
73
|
+
Write-Log ("$($_.ProcessName): " + [math]::Round($_.WorkingSet / 1MB, 0) + " MB")
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# 6. Dev Tools
|
|
77
|
+
Write-Log "`n--- AMBIENTE DEV ---"
|
|
78
|
+
$tools = @("git", "python", "node", "docker", "code", "rustc")
|
|
79
|
+
foreach ($t in $tools) {
|
|
80
|
+
try {
|
|
81
|
+
$cmd = Get-Command $t -ErrorAction SilentlyContinue
|
|
82
|
+
if ($cmd) {
|
|
83
|
+
Write-Log ("${t}: Instalado (" + $cmd.Source + ")")
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
Write-Log ("${t}: NÃO encontrado")
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch {}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Write-Log "`nDiagnostico Concluido."
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
|
2
|
+
$reportFile = "diagnostico_v2_$timestamp.txt"
|
|
3
|
+
|
|
4
|
+
function Log {
|
|
5
|
+
param($Msg)
|
|
6
|
+
$out = "[$(Get-Date -Format 'HH:mm:ss')] $Msg"
|
|
7
|
+
Write-Host $out
|
|
8
|
+
$out | Out-File -FilePath $reportFile -Append -Encoding utf8
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Log "=== DIAGNOSTICO DE SISTEMA (V2) ==="
|
|
12
|
+
Log "Data: $timestamp"
|
|
13
|
+
|
|
14
|
+
# 1. DISCO (CRITICO)
|
|
15
|
+
Log "`n--- DISCOS ---"
|
|
16
|
+
Get-Volume | Where-Object { $_.DriveLetter } | ForEach-Object {
|
|
17
|
+
$free = [math]::Round($_.SizeRemaining / 1GB, 2)
|
|
18
|
+
$total = [math]::Round($_.Size / 1GB, 2)
|
|
19
|
+
$pct = [math]::Round(($free / $total) * 100, 1)
|
|
20
|
+
Log "Drive $($_.DriveLetter): $free GB livres ($pct%)"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
# 2. MEMORIA
|
|
24
|
+
Log "`n--- MEMORIA ---"
|
|
25
|
+
$mem = Get-CimInstance Win32_OperatingSystem
|
|
26
|
+
$freeMem = [math]::Round($mem.FreePhysicalMemory / 1024 / 1024, 2)
|
|
27
|
+
$totalMem = [math]::Round($mem.TotalVisibleMemorySize / 1024 / 1024, 2)
|
|
28
|
+
Log "RAM: $freeMem GB livres de $totalMem GB"
|
|
29
|
+
|
|
30
|
+
# 3. TOP CPU
|
|
31
|
+
Log "`n--- TOP CPU ---"
|
|
32
|
+
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 | ForEach-Object {
|
|
33
|
+
Log "$($_.ProcessName): $([math]::Round($_.CPU, 1))s"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Log "`n--- FIM ---"
|
package/UserAudit.ps1
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$ErrorActionPreference = "SilentlyContinue"
|
|
2
|
+
$user = $env:USERPROFILE
|
|
3
|
+
$folders = @("Desktop", "Documents", "Downloads", "Videos", "Pictures", "Music", "AppData", "PROJETOS")
|
|
4
|
+
|
|
5
|
+
Write-Host "=== USER PROFILE AUDIT ($user) ===" -ForegroundColor Cyan
|
|
6
|
+
foreach ($f in $folders) {
|
|
7
|
+
$path = Join-Path $user $f
|
|
8
|
+
if (Test-Path $path) {
|
|
9
|
+
$size = Get-ChildItem $path -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
10
|
+
Write-Host "$f : $([math]::Round($size.Sum / 1GB, 2)) GB"
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
Write-Host "$f : Not Found"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
# Check for other large hidden folders in user root
|
|
18
|
+
Get-ChildItem $user -Directory -Force | Where-Object { $folders -notcontains $_.Name } | ForEach-Object {
|
|
19
|
+
$size = Get-ChildItem $_.FullName -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
|
|
20
|
+
if ($size.Sum -gt 1GB) {
|
|
21
|
+
Write-Host "$($_.Name) (Extra) : $([math]::Round($size.Sum / 1GB, 2)) GB"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/bin/orbit.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { Command } from 'commander';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import spawn from 'cross-spawn';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = path.dirname(__filename);
|
|
11
|
+
const PROJECT_ROOT = path.join(__dirname, '..');
|
|
12
|
+
|
|
13
|
+
const program = new Command();
|
|
14
|
+
|
|
15
|
+
program
|
|
16
|
+
.name('orbit')
|
|
17
|
+
.description('Orbit-DevOps: The Developer\'s Workspace Command Center')
|
|
18
|
+
.version('1.0.0');
|
|
19
|
+
|
|
20
|
+
import fs from 'fs';
|
|
21
|
+
|
|
22
|
+
// ... (previous imports)
|
|
23
|
+
|
|
24
|
+
// Helper to run PowerShell scripts
|
|
25
|
+
function runScript(scriptPath, args = []) {
|
|
26
|
+
// Safe path resolution for Windows
|
|
27
|
+
const fullPath = path.normalize(path.resolve(PROJECT_ROOT, scriptPath));
|
|
28
|
+
|
|
29
|
+
if (!fs.existsSync(fullPath)) {
|
|
30
|
+
console.error(chalk.red(`\n❌ Error: Script not found at: ${fullPath}`));
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
console.log(chalk.blue(`\n🚀 Orbit Launching: ${path.basename(fullPath)}...`));
|
|
35
|
+
|
|
36
|
+
// Don't manually quote the path; spawn handles it if we don't use windowsVerbatimArgumentsor specific shell options
|
|
37
|
+
const child = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-File', fullPath, ...args], {
|
|
38
|
+
stdio: 'inherit'
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
child.on('close', (code) => {
|
|
42
|
+
if (code === 0) {
|
|
43
|
+
console.log(chalk.green(`\n✅ Mission Complete (Exit Code: ${code})`));
|
|
44
|
+
} else {
|
|
45
|
+
console.log(chalk.red(`\n❌ Mission Failed (Exit Code: ${code})`));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// --- Commands ---
|
|
51
|
+
|
|
52
|
+
program
|
|
53
|
+
.command('doctor')
|
|
54
|
+
.description('Run a full system diagnostic health check')
|
|
55
|
+
.action(() => {
|
|
56
|
+
runScript('SystemDiagnosticUser_v2.ps1');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
program
|
|
60
|
+
.command('space')
|
|
61
|
+
.description('Analyze disk usage and find hotspots')
|
|
62
|
+
.action(() => {
|
|
63
|
+
runScript('ScanStorage.ps1');
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
program
|
|
67
|
+
.command('clean')
|
|
68
|
+
.description('Perform safe system and dev-tool cleanup')
|
|
69
|
+
.action(() => {
|
|
70
|
+
runScript('AdditionalCleanup.ps1');
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
program
|
|
74
|
+
.command('compact')
|
|
75
|
+
.description('Compact WSL2 virtual disks manually (requires Admin)')
|
|
76
|
+
.action(() => {
|
|
77
|
+
console.log(chalk.yellow('⚠️ Note: Compaction might require Administrator privileges.'));
|
|
78
|
+
runScript('scripts/wsl/CompactWSL.ps1');
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
program
|
|
82
|
+
.command('sync')
|
|
83
|
+
.description('Sync environment stack to GitHub (sh1w4/stack)')
|
|
84
|
+
.action(() => {
|
|
85
|
+
runScript('scripts/stack/Push-Stack.ps1');
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
program
|
|
89
|
+
.command('menu')
|
|
90
|
+
.description('Launch the interactive PowerShell menu (Legacy)')
|
|
91
|
+
.action(() => {
|
|
92
|
+
runScript('Orbit.ps1');
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
program.parse(process.argv);
|
|
96
|
+
|
|
97
|
+
if (!process.argv.slice(2).length) {
|
|
98
|
+
program.outputHelp();
|
|
99
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Script de Verificação do Ambiente de Desenvolvimento
|
|
2
|
+
# check_environment.ps1
|
|
3
|
+
|
|
4
|
+
function Write-StatusMessage {
|
|
5
|
+
param(
|
|
6
|
+
[string]$Tool,
|
|
7
|
+
[string]$Status,
|
|
8
|
+
[string]$Version = "",
|
|
9
|
+
[string]$Color = "White"
|
|
10
|
+
)
|
|
11
|
+
$statusEmoji = switch ($Status) {
|
|
12
|
+
"Instalado" { "✅" }
|
|
13
|
+
"Não Encontrado" { "❌" }
|
|
14
|
+
default { "⚠️" }
|
|
15
|
+
}
|
|
16
|
+
Write-Host "$statusEmoji $Tool" -NoNewline
|
|
17
|
+
if ($Version) {
|
|
18
|
+
Write-Host " ($Version)" -NoNewline
|
|
19
|
+
}
|
|
20
|
+
Write-Host " - $Status" -ForegroundColor $Color
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function Test-Command {
|
|
24
|
+
param([string]$Command)
|
|
25
|
+
(Get-Command $Command -ErrorAction SilentlyContinue) -ne $null
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Write-Host "`n=== Verificação do Ambiente de Desenvolvimento ===" -ForegroundColor Cyan
|
|
29
|
+
Write-Host "Data: $(Get-Date -Format 'yyyy-MM-dd HH:mm')`n"
|
|
30
|
+
|
|
31
|
+
# Verificar Python
|
|
32
|
+
try {
|
|
33
|
+
$pythonVersion = (python --version 2>&1).ToString()
|
|
34
|
+
Write-StatusMessage "Python" "Instalado" $pythonVersion "Green"
|
|
35
|
+
} catch {
|
|
36
|
+
Write-StatusMessage "Python" "Não Encontrado" "" "Red"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# Verificar Rust
|
|
40
|
+
try {
|
|
41
|
+
$rustVersion = (rustc --version 2>&1).ToString()
|
|
42
|
+
Write-StatusMessage "Rust" "Instalado" $rustVersion "Green"
|
|
43
|
+
} catch {
|
|
44
|
+
Write-StatusMessage "Rust" "Não Encontrado" "" "Red"
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# Verificar Git
|
|
48
|
+
try {
|
|
49
|
+
$gitVersion = (git --version 2>&1).ToString()
|
|
50
|
+
Write-StatusMessage "Git" "Instalado" $gitVersion "Green"
|
|
51
|
+
} catch {
|
|
52
|
+
Write-StatusMessage "Git" "Não Encontrado" "" "Red"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# Verificar VS Code
|
|
56
|
+
try {
|
|
57
|
+
$codeVersion = (code --version 2>&1)[0].ToString()
|
|
58
|
+
Write-StatusMessage "VS Code" "Instalado" $codeVersion "Green"
|
|
59
|
+
} catch {
|
|
60
|
+
Write-StatusMessage "VS Code" "Não Encontrado" "" "Red"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Verificar Node.js
|
|
64
|
+
try {
|
|
65
|
+
$nodeVersion = (node --version 2>&1).ToString()
|
|
66
|
+
Write-StatusMessage "Node.js" "Instalado" $nodeVersion "Green"
|
|
67
|
+
} catch {
|
|
68
|
+
Write-StatusMessage "Node.js" "Não Encontrado" "" "Red"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# Verificar Docker
|
|
72
|
+
try {
|
|
73
|
+
$dockerVersion = (docker --version 2>&1).ToString()
|
|
74
|
+
Write-StatusMessage "Docker" "Instalado" $dockerVersion "Green"
|
|
75
|
+
} catch {
|
|
76
|
+
Write-StatusMessage "Docker" "Não Encontrado" "" "Red"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# Verificar WSL
|
|
80
|
+
try {
|
|
81
|
+
$wslVersion = (wsl --version 2>&1).ToString()
|
|
82
|
+
Write-StatusMessage "WSL" "Instalado" $wslVersion "Green"
|
|
83
|
+
} catch {
|
|
84
|
+
Write-StatusMessage "WSL" "Não Encontrado" "" "Red"
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
# Verificar Variáveis de Ambiente
|
|
88
|
+
Write-Host "`n=== Variáveis de Ambiente ===" -ForegroundColor Cyan
|
|
89
|
+
$pythonPath = [System.Environment]::GetEnvironmentVariable("PYTHONPATH", "User")
|
|
90
|
+
Write-Host "PYTHONPATH: " -NoNewline
|
|
91
|
+
if ($pythonPath) {
|
|
92
|
+
Write-Host $pythonPath -ForegroundColor Green
|
|
93
|
+
} else {
|
|
94
|
+
Write-Host "Não configurado" -ForegroundColor Yellow
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
Write-Host "`nPATH do Usuário:"
|
|
98
|
+
$userPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
|
|
99
|
+
$userPath.Split(";") | ForEach-Object { Write-Host " $_" }
|
|
100
|
+
|
|
101
|
+
Write-Host "`n=== Recomendações ===" -ForegroundColor Cyan
|
|
102
|
+
if (-not (Test-Command "winget")) {
|
|
103
|
+
Write-Host "❗ Instale o App Installer da Microsoft Store para ter acesso ao winget" -ForegroundColor Yellow
|
|
104
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[23:35:32] === STARTING DEEP DOWNLOADS ORGANIZATION ===
|
|
2
|
+
[23:35:32] Creating directory: C:\Users\João\Downloads\Develop\Projects
|
|
3
|
+
[23:35:32] Moving Project: th3m1s-core -> Develop\Projects\th3m1s-core
|
|
4
|
+
[23:35:32] Moving Project: AGILIZE-AI -> Develop\Projects\AGILIZE-AI
|
|
5
|
+
[23:35:32] Moving Project: GuardFlow_AgilizeAI -> Develop\Projects\GuardFlow_AgilizeAI
|
|
6
|
+
[23:35:32] Moving Project: KRONOS -> Develop\Projects\KRONOS
|
|
7
|
+
[23:35:32] Moving Project: GuardDrive -> Develop\Projects\GuardDrive
|
|
8
|
+
[23:35:32] Moving Project: SYMBEON DESIGN -> Develop\Projects\SYMBEON DESIGN
|
|
9
|
+
[23:35:32] Creating directory: C:\Users\João\Downloads\Applications\Extracted
|
|
10
|
+
[23:35:32] Moving Installer: Nitro Sense_Acer_5.0.1473_20241009_W11x64_A -> Applications\Extracted\Nitro Sense_Acer_5.0.1473_20241009_W11x64_A
|
|
11
|
+
[23:35:32] Moving Installer: Reset_L3250 -> Applications\Extracted\Reset_L3250
|
|
12
|
+
[23:35:32] Moving Installer: temp_installers -> Applications\Extracted\temp_installers
|
|
13
|
+
[23:35:32] Creating directory: C:\Users\João\Downloads\Archives\GameData
|
|
14
|
+
[23:35:32] Moving Game Data: The_matrix -> Archives\GameData\The_matrix
|
|
15
|
+
[23:35:32] === DEEP ORGANIZATION COMPLETE ===
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
No C:\Users\João\Desk
|
|
2
|
+
top\PROJETOS\04_DEVEL
|
|
3
|
+
OPER_TOOLS\orbit-devo
|
|
4
|
+
ps\SystemDiagnosticUs
|
|
5
|
+
er.ps1:52
|
|
6
|
+
caractere:80
|
|
7
|
+
+ ... ve
|
|
8
|
+
$($_.DriveLetter):
|
|
9
|
+
$free GB livres de
|
|
10
|
+
$total GB
|
|
11
|
+
($pctFree%) - $sta
|
|
12
|
+
...
|
|
13
|
+
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
~
|
|
17
|
+
É necessário
|
|
18
|
+
fornecer uma
|
|
19
|
+
expressão de valor
|
|
20
|
+
após o operador '%'.
|
|
21
|
+
No C:\Users\João\Desk
|
|
22
|
+
top\PROJETOS\04_DEVEL
|
|
23
|
+
OPER_TOOLS\orbit-devo
|
|
24
|
+
ps\SystemDiagnosticUs
|
|
25
|
+
er.ps1:83
|
|
26
|
+
caractere:24
|
|
27
|
+
+
|
|
28
|
+
Write-Log "$t:
|
|
29
|
+
Instalado
|
|
30
|
+
($($cmd.Source))"
|
|
31
|
+
+
|
|
32
|
+
~~~
|
|
33
|
+
Referência de
|
|
34
|
+
variável inválida.
|
|
35
|
+
':' não era seguido
|
|
36
|
+
de um caractere de
|
|
37
|
+
nome de variável
|
|
38
|
+
válido. Considere
|
|
39
|
+
usar ${} para
|
|
40
|
+
delimitar o nome.
|
|
41
|
+
No C:\Users\João\Desk
|
|
42
|
+
top\PROJETOS\04_DEVEL
|
|
43
|
+
OPER_TOOLS\orbit-devo
|
|
44
|
+
ps\SystemDiagnosticUs
|
|
45
|
+
er.ps1:86
|
|
46
|
+
caractere:24
|
|
47
|
+
+
|
|
48
|
+
Write-Log "$t: NÃO
|
|
49
|
+
encontrado"
|
|
50
|
+
+
|
|
51
|
+
~~~
|
|
52
|
+
Referência de
|
|
53
|
+
variável inválida.
|
|
54
|
+
':' não era seguido
|
|
55
|
+
de um caractere de
|
|
56
|
+
nome de variável
|
|
57
|
+
válido. Considere
|
|
58
|
+
usar ${} para
|
|
59
|
+
delimitar o nome.
|
|
60
|
+
No C:\Users\João\Desk
|
|
61
|
+
top\PROJETOS\04_DEVEL
|
|
62
|
+
OPER_TOOLS\orbit-devo
|
|
63
|
+
ps\SystemDiagnosticUs
|
|
64
|
+
er.ps1:92
|
|
65
|
+
caractere:36
|
|
66
|
+
+ Write-Log
|
|
67
|
+
"`nDiagnostico
|
|
68
|
+
Concluido."
|
|
69
|
+
+
|
|
70
|
+
~
|
|
71
|
+
A cadeia de
|
|
72
|
+
caracteres não tem o
|
|
73
|
+
terminador: ".
|
|
74
|
+
+ CategoryInfo
|
|
75
|
+
: Parser
|
|
76
|
+
Error: (:) [], P
|
|
77
|
+
arentContainsErr
|
|
78
|
+
orRecordExceptio n
|
|
79
|
+
+ FullyQualified
|
|
80
|
+
ErrorId : Expect
|
|
81
|
+
edValueExpressio
|
|
82
|
+
n
|
|
83
|
+
|
package/diskpart_log.txt
ADDED
|
File without changes
|