@indah_sekar/os-t 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/README.md +76 -0
- package/bin/cli.js +248 -0
- package/package.json +58 -0
- package/src/data/commands.js +792 -0
- package/src/data/commands.json +222 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
{
|
|
2
|
+
"windows": [
|
|
3
|
+
{
|
|
4
|
+
"category": "Network",
|
|
5
|
+
"commands": [
|
|
6
|
+
{ "name": "Flush DNS Cache", "command": "ipconfig /flushdns", "description": "Clear the DNS resolver cache", "difficulty": "easy" },
|
|
7
|
+
{ "name": "Reset Winsock", "command": "netsh winsock reset", "description": "Reset Winsock catalog to default", "difficulty": "medium" },
|
|
8
|
+
{ "name": "Release IP", "command": "ipconfig /release", "description": "Release current IP address", "difficulty": "easy" },
|
|
9
|
+
{ "name": "Renew IP", "command": "ipconfig /renew", "description": "Renew IP address from DHCP", "difficulty": "easy" },
|
|
10
|
+
{ "name": "Reset Firewall", "command": "netsh advfirewall reset", "description": "Reset Windows Firewall to default", "difficulty": "medium" },
|
|
11
|
+
{ "name": "Show Network Config", "command": "ipconfig /all", "description": "Display full network configuration", "difficulty": "easy" },
|
|
12
|
+
{ "name": "Ping Test", "command": "ping 8.8.8.8", "description": "Test connectivity to Google DNS", "difficulty": "easy" },
|
|
13
|
+
{ "name": "Traceroute", "command": "tracert google.com", "description": "Trace route to destination", "difficulty": "easy" }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"category": "System",
|
|
18
|
+
"commands": [
|
|
19
|
+
{ "name": "System File Checker", "command": "sfc /scannow", "description": "Scan and repair system files", "difficulty": "medium" },
|
|
20
|
+
{ "name": "DISM Repair", "command": "DISM /Online /Cleanup-Image /RestoreHealth", "description": "Repair Windows image", "difficulty": "hard" },
|
|
21
|
+
{ "name": "Check Disk", "command": "chkdsk C: /f /r", "description": "Check disk for errors and bad sectors", "difficulty": "medium" },
|
|
22
|
+
{ "name": "Disk Cleanup", "command": "cleanmgr /sagerun:1", "description": "Run disk cleanup utility", "difficulty": "easy" },
|
|
23
|
+
{ "name": "System Info", "command": "systeminfo", "description": "Display system information", "difficulty": "easy" },
|
|
24
|
+
{ "name": "Event Viewer", "command": "eventvwr.msc", "description": "Open Event Viewer", "difficulty": "easy" }
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"category": "Process & Services",
|
|
29
|
+
"commands": [
|
|
30
|
+
{ "name": "List Running Processes", "command": "tasklist", "description": "Show all running processes", "difficulty": "easy" },
|
|
31
|
+
{ "name": "Kill Process by Name", "command": "taskkill /F /IM notepad.exe", "description": "Force kill process by name", "difficulty": "easy" },
|
|
32
|
+
{ "name": "List Services", "command": "sc query type= service state= all", "description": "List all services", "difficulty": "medium" },
|
|
33
|
+
{ "name": "Restart Service", "command": "net stop spooler && net start spooler", "description": "Restart Print Spooler service", "difficulty": "medium" },
|
|
34
|
+
{ "name": "Check Ports", "command": "netstat -ano", "description": "Show active connections and ports", "difficulty": "easy" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"category": "Windows Update",
|
|
39
|
+
"commands": [
|
|
40
|
+
{ "name": "Check Updates", "command": "wuauclt /detectnow", "description": "Force check for Windows Updates", "difficulty": "easy" },
|
|
41
|
+
{ "name": "Reset Update Components", "command": "net stop wuauserv && net start wuauserv", "description": "Restart Windows Update service", "difficulty": "medium" },
|
|
42
|
+
{ "name": "View Update History", "command": "wmic qfe list brief /format:table", "description": "List installed updates", "difficulty": "easy" }
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"category": "Driver",
|
|
47
|
+
"commands": [
|
|
48
|
+
{ "name": "List Drivers", "command": "driverquery", "description": "List all installed drivers", "difficulty": "easy" },
|
|
49
|
+
{ "name": "Update Driver", "command": "pnputil /scan-devices", "description": "Scan for hardware changes", "difficulty": "easy" }
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"category": "Power",
|
|
54
|
+
"commands": [
|
|
55
|
+
{ "name": "Shutdown", "command": "shutdown /s /t 0", "description": "Immediate shutdown", "difficulty": "easy" },
|
|
56
|
+
{ "name": "Restart", "command": "shutdown /r /t 0", "description": "Immediate restart", "difficulty": "easy" },
|
|
57
|
+
{ "name": "Cancel Shutdown", "command": "shutdown /a", "description": "Abort scheduled shutdown", "difficulty": "easy" }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"linux": [
|
|
62
|
+
{
|
|
63
|
+
"category": "Network",
|
|
64
|
+
"commands": [
|
|
65
|
+
{ "name": "Flush DNS Cache", "command": "systemd-resolve --flush-caches", "description": "Clear the DNS resolver cache", "difficulty": "medium" },
|
|
66
|
+
{ "name": "Restart Network", "command": "systemctl restart networking", "description": "Restart networking service", "difficulty": "medium" },
|
|
67
|
+
{ "name": "Renew DHCP", "command": "dhclient -r && dhclient", "description": "Release and renew DHCP lease", "difficulty": "easy" },
|
|
68
|
+
{ "name": "Show IP", "command": "ip addr show", "description": "Display network interfaces", "difficulty": "easy" },
|
|
69
|
+
{ "name": "Show Routing", "command": "ip route show", "description": "Display routing table", "difficulty": "easy" },
|
|
70
|
+
{ "name": "Ping Test", "command": "ping -c 4 8.8.8.8", "description": "Test connectivity to Google DNS", "difficulty": "easy" },
|
|
71
|
+
{ "name": "Traceroute", "command": "traceroute google.com", "description": "Trace route to destination", "difficulty": "easy" },
|
|
72
|
+
{ "name": "Open Ports", "command": "ss -tuln", "description": "Show listening ports", "difficulty": "easy" },
|
|
73
|
+
{ "name": "Firewall Rules", "command": "iptables -L", "description": "List firewall rules", "difficulty": "medium" },
|
|
74
|
+
{ "name": "DNS Lookup", "command": "nslookup google.com", "description": "Query DNS records", "difficulty": "easy" }
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"category": "System",
|
|
79
|
+
"commands": [
|
|
80
|
+
{ "name": "System Update (Debian/Ubuntu)", "command": "apt update && apt upgrade -y", "description": "Update package lists and upgrade", "difficulty": "easy" },
|
|
81
|
+
{ "name": "System Update (Fedora/RHEL)", "command": "dnf upgrade -y", "description": "Upgrade packages with dnf", "difficulty": "easy" },
|
|
82
|
+
{ "name": "System Update (Arch)", "command": "pacman -Syu", "description": "System update with pacman", "difficulty": "easy" },
|
|
83
|
+
{ "name": "Check Disk Space", "command": "df -h", "description": "Display disk usage", "difficulty": "easy" },
|
|
84
|
+
{ "name": "Check Memory", "command": "free -h", "description": "Display memory usage", "difficulty": "easy" },
|
|
85
|
+
{ "name": "System Info", "command": "uname -a", "description": "Display kernel information", "difficulty": "easy" },
|
|
86
|
+
{ "name": "Uptime", "command": "uptime", "description": "Show system uptime and load", "difficulty": "easy" },
|
|
87
|
+
{ "name": "List Block Devices", "command": "lsblk", "description": "List block devices", "difficulty": "easy" }
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"category": "Process & Services",
|
|
92
|
+
"commands": [
|
|
93
|
+
{ "name": "List Processes", "command": "ps aux", "description": "Show all running processes", "difficulty": "easy" },
|
|
94
|
+
{ "name": "Top Processes", "command": "top -bn1 | head -20", "description": "Show top processes by CPU", "difficulty": "easy" },
|
|
95
|
+
{ "name": "Kill Process", "command": "kill -9 <PID>", "description": "Force kill process by PID", "difficulty": "easy" },
|
|
96
|
+
{ "name": "List Services (systemd)", "command": "systemctl list-units --type=service", "description": "List all systemd services", "difficulty": "easy" },
|
|
97
|
+
{ "name": "Restart Service", "command": "systemctl restart <service>", "description": "Restart a systemd service", "difficulty": "medium" },
|
|
98
|
+
{ "name": "Check Failed Services", "command": "systemctl --failed", "description": "Show failed services", "difficulty": "easy" },
|
|
99
|
+
{ "name": "Journal Logs", "command": "journalctl -xe", "description": "View system journal logs", "difficulty": "medium" }
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"category": "Disk & Filesystem",
|
|
104
|
+
"commands": [
|
|
105
|
+
{ "name": "Check Disk Health", "command": "smartctl -a /dev/sda", "description": "Check SMART disk status", "difficulty": "medium" },
|
|
106
|
+
{ "name": "Repair Filesystem", "command": "fsck /dev/sda1", "description": "Check and repair filesystem", "difficulty": "hard" },
|
|
107
|
+
{ "name": "Mount filesystem", "command": "mount -a", "description": "Mount all filesystems in fstab", "difficulty": "easy" },
|
|
108
|
+
{ "name": "Find Large Files", "command": "du -sh /* 2>/dev/null | sort -rh | head -10", "description": "Find largest directories", "difficulty": "easy" },
|
|
109
|
+
{ "name": "Check Inodes", "command": "df -i", "description": "Check inode usage", "difficulty": "easy" }
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"category": "User & Permissions",
|
|
114
|
+
"commands": [
|
|
115
|
+
{ "name": "List Users", "command": "cat /etc/passwd | cut -d: -f1", "description": "List all system users", "difficulty": "easy" },
|
|
116
|
+
{ "name": "Fix Permissions", "command": "chown -R $(whoami) /path/to/dir", "description": "Change ownership recursively", "difficulty": "medium" },
|
|
117
|
+
{ "name": "Check Sudo Access", "command": "sudo -l", "description": "List sudo permissions", "difficulty": "easy" },
|
|
118
|
+
{ "name": "Unlock User", "command": "passwd -u <username>", "description": "Unlock a user account", "difficulty": "medium" }
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"category": "Power",
|
|
123
|
+
"commands": [
|
|
124
|
+
{ "name": "Shutdown", "command": "shutdown now", "description": "Immediate shutdown", "difficulty": "easy" },
|
|
125
|
+
{ "name": "Restart", "command": "reboot", "description": "Restart the system", "difficulty": "easy" },
|
|
126
|
+
{ "name": "Schedule Shutdown", "command": "shutdown +10 'Shutdown in 10 minutes'", "description": "Schedule shutdown in 10 minutes", "difficulty": "easy" },
|
|
127
|
+
{ "name": "Cancel Shutdown", "command": "shutdown -c", "description": "Cancel scheduled shutdown", "difficulty": "easy" }
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"category": "Logs & Diagnostics",
|
|
132
|
+
"commands": [
|
|
133
|
+
{ "name": "System Logs", "command": "tail -f /var/log/syslog", "description": "Follow system logs", "difficulty": "easy" },
|
|
134
|
+
{ "name": "Kernel Messages", "command": "dmesg | tail -50", "description": "Show recent kernel messages", "difficulty": "easy" },
|
|
135
|
+
{ "name": "Boot Logs", "command": "journalctl -b", "description": "Show current boot logs", "difficulty": "easy" },
|
|
136
|
+
{ "name": "Hardware Info", "command": "lshw -short", "description": "List hardware components", "difficulty": "easy" }
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"macos": [
|
|
141
|
+
{
|
|
142
|
+
"category": "Network",
|
|
143
|
+
"commands": [
|
|
144
|
+
{ "name": "Flush DNS Cache", "command": "dscacheutil -flushcache && killall -HUP mDNSResponder", "description": "Clear the DNS resolver cache", "difficulty": "medium" },
|
|
145
|
+
{ "name": "Renew DHCP", "command": "ipconfig set en0 DHCP", "description": "Renew DHCP lease on primary interface", "difficulty": "easy" },
|
|
146
|
+
{ "name": "Show IP", "command": "ifconfig en0", "description": "Display network interface configuration", "difficulty": "easy" },
|
|
147
|
+
{ "name": "Show Routing", "command": "netstat -rn", "description": "Display routing table", "difficulty": "easy" },
|
|
148
|
+
{ "name": "Ping Test", "command": "ping -c 4 8.8.8.8", "description": "Test connectivity to Google DNS", "difficulty": "easy" },
|
|
149
|
+
{ "name": "Traceroute", "command": "traceroute google.com", "description": "Trace route to destination", "difficulty": "easy" },
|
|
150
|
+
{ "name": "Open Ports", "command": "lsof -i -P | grep LISTEN", "description": "Show listening ports", "difficulty": "medium" },
|
|
151
|
+
{ "name": "DNS Lookup", "command": "nslookup google.com", "description": "Query DNS records", "difficulty": "easy" },
|
|
152
|
+
{ "name": "Wi-Fi Info", "command": "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I", "description": "Show current Wi-Fi connection details", "difficulty": "medium" },
|
|
153
|
+
{ "name": "Network Reset", "command": "ifconfig en0 down && ifconfig en0 up", "description": "Toggle network interface off and on", "difficulty": "medium" }
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"category": "System",
|
|
158
|
+
"commands": [
|
|
159
|
+
{ "name": "System Update", "command": "softwareupdate --list", "description": "Check for available macOS updates", "difficulty": "easy" },
|
|
160
|
+
{ "name": "Install Updates", "command": "softwareupdate --install --all", "description": "Install all available updates", "difficulty": "easy" },
|
|
161
|
+
{ "name": "Check Disk Space", "command": "df -h", "description": "Display disk usage", "difficulty": "easy" },
|
|
162
|
+
{ "name": "Check Memory", "command": "vm_stat", "description": "Display virtual memory statistics", "difficulty": "medium" },
|
|
163
|
+
{ "name": "System Info", "command": "system_profiler SPSoftwareDataType", "description": "Display detailed system information", "difficulty": "easy" },
|
|
164
|
+
{ "name": "Uptime", "command": "uptime", "description": "Show system uptime and load", "difficulty": "easy" },
|
|
165
|
+
{ "name": "List Block Devices", "command": "diskutil list", "description": "List all disk partitions", "difficulty": "easy" },
|
|
166
|
+
{ "name": "Safe Boot", "command": "nvram boot-args='-x'", "description": "Enable safe boot on next restart", "difficulty": "hard" }
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"category": "Process & Services",
|
|
171
|
+
"commands": [
|
|
172
|
+
{ "name": "List Processes", "command": "ps aux", "description": "Show all running processes", "difficulty": "easy" },
|
|
173
|
+
{ "name": "Top Processes", "command": "top -l 1 -n 10 -o cpu", "description": "Show top processes by CPU usage", "difficulty": "easy" },
|
|
174
|
+
{ "name": "Kill Process", "command": "kill -9 <PID>", "description": "Force kill process by PID", "difficulty": "easy" },
|
|
175
|
+
{ "name": "Force Quit App", "command": "killall <appname>", "description": "Kill all instances of an application", "difficulty": "easy" },
|
|
176
|
+
{ "name": "List Launch Agents", "command": "ls ~/Library/LaunchAgents/", "description": "List user launch agents", "difficulty": "easy" },
|
|
177
|
+
{ "name": "List Launch Daemons", "command": "ls /Library/LaunchDaemons/", "description": "List system launch daemons", "difficulty": "easy" },
|
|
178
|
+
{ "name": "Activity Monitor", "command": "open -a 'Activity Monitor'", "description": "Open Activity Monitor", "difficulty": "easy" }
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"category": "Disk & Filesystem",
|
|
183
|
+
"commands": [
|
|
184
|
+
{ "name": "Verify Disk", "command": "diskutil verifyVolume /", "description": "Verify startup disk integrity", "difficulty": "easy" },
|
|
185
|
+
{ "name": "Repair Disk Permissions", "command": "diskutil repairPermissions /", "description": "Repair disk permissions", "difficulty": "medium" },
|
|
186
|
+
{ "name": "First Aid", "command": "diskutil verifyVolume disk0s1", "description": "Run First Aid on a partition", "difficulty": "medium" },
|
|
187
|
+
{ "name": "Find Large Files", "command": "find / -type f -size +100M 2>/dev/null | head -20", "description": "Find files larger than 100MB", "difficulty": "medium" },
|
|
188
|
+
{ "name": "Purge Disk Space", "command": "purge", "description": "Force purge disk cache", "difficulty": "medium" }
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"category": "User & Permissions",
|
|
193
|
+
"commands": [
|
|
194
|
+
{ "name": "List Users", "command": "dscl . list /Users", "description": "List all system users", "difficulty": "easy" },
|
|
195
|
+
{ "name": "Fix Permissions", "command": "chown -R $(whoami) /path/to/dir", "description": "Change ownership recursively", "difficulty": "medium" },
|
|
196
|
+
{ "name": "Check Sudo Access", "command": "sudo -l", "description": "List sudo permissions", "difficulty": "easy" },
|
|
197
|
+
{ "name": "Reset Password", "command": "dscl . -passwd /Users/<username> <newpassword>", "description": "Reset user password", "difficulty": "hard" },
|
|
198
|
+
{ "name": "Unlock User Account", "command": "dscl . -delete /Users/<username> AuthenticationAuthority", "description": "Remove authentication restrictions", "difficulty": "hard" }
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"category": "Power",
|
|
203
|
+
"commands": [
|
|
204
|
+
{ "name": "Shutdown", "command": "shutdown -h now", "description": "Immediate shutdown", "difficulty": "easy" },
|
|
205
|
+
{ "name": "Restart", "command": "shutdown -r now", "description": "Restart the system", "difficulty": "easy" },
|
|
206
|
+
{ "name": "Schedule Shutdown", "command": "shutdown +10", "description": "Schedule shutdown in 10 minutes", "difficulty": "easy" },
|
|
207
|
+
{ "name": "Cancel Shutdown", "command": "shutdown -c", "description": "Cancel scheduled shutdown", "difficulty": "easy" },
|
|
208
|
+
{ "name": "Sleep", "command": "pmset sleepnow", "description": "Put system to sleep immediately", "difficulty": "easy" }
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"category": "Logs & Diagnostics",
|
|
213
|
+
"commands": [
|
|
214
|
+
{ "name": "System Logs", "command": "log show --predicate 'eventMessage contains \"error\"' --last 1h", "description": "Show recent error log entries", "difficulty": "medium" },
|
|
215
|
+
{ "name": "Console Logs", "command": "log show --predicate 'process == \"kernel\"' --last 30m", "description": "Show recent kernel log entries", "difficulty": "medium" },
|
|
216
|
+
{ "name": "Crash Reports", "command": "ls ~/Library/Logs/DiagnosticReports/", "description": "List crash report files", "difficulty": "easy" },
|
|
217
|
+
{ "name": "Hardware Info", "command": "system_profiler SPHardwareDataType", "description": "Display hardware specifications", "difficulty": "easy" },
|
|
218
|
+
{ "name": "System Diagnostics", "command": "sysdiagnose", "description": "Generate comprehensive system diagnostics", "difficulty": "hard" }
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|