Compare commits

..

2 Commits

Author SHA1 Message Date
ducoterra 6cc2c8db3a add curl, wget, apt, and dnf
Build and Push Container / build-and-push (push) Successful in 18s
2026-05-31 00:28:21 -04:00
ducoterra 5f0cfbd4cb fix the help command 2026-05-31 00:18:39 -04:00
+126 -2
View File
@@ -72,7 +72,7 @@ function createTerminal(face) {
'systemctl list-units', 'systemctl list-units --type=service --state=running --no-pager', 'systemctl list-units', 'systemctl list-units --type=service --state=running --no-pager',
'ip addr show', 'df -h', 'free -h', 'ip addr show', 'df -h', 'free -h',
'ps aux', 'ps aux --sort=-%mem | head -10', 'ps aux', 'ps aux --sort=-%mem | head -10',
'neofetch', 'sl', 'help', 'echo' 'neofetch', 'sl', 'help', 'echo', 'curl', 'wget', 'apt', 'dnf'
]; ];
function updateDisplay(text) { function updateDisplay(text) {
@@ -397,7 +397,7 @@ function createTerminal(face) {
'ps aux --sort=-%mem | head -10': 'USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\nreese 1242 2.1 12.4 4285632 3932160 ? Sl May15 42:18 /opt/llama.cpp/build/bin/llama-server --model /models/Qwen3-30B-A3B.Q4_K_M.gguf --port 8082\ndocker 2341 1.2 6.8 8562348 2156032 ? Sl May15 28:45 /usr/bin/dockerd -H fd://\nreese 3456 0.8 3.2 2845632 1015808 ? Sl May15 18:22 /opt/open-webui/server\nreese 4567 0.5 2.1 1562348 665600 ? Sl May15 12:34 /usr/bin/python3 /opt/borg/borgmatic\nroot 5678 0.3 1.4 945632 448000 ? Ssl May15 8:12 /usr/bin/docker-proxy -p tcp:0.0.0.0:80:80\nreese 6789 0.2 1.1 745632 348000 ? Ssl May15 5:45 /usr/bin/podman run --name homepage\nroot 7890 0.1 0.8 545632 256000 ? Ssl May15 3:22 /usr/bin/docker-proxy -p tcp:0.0.0.0:443:443', 'ps aux --sort=-%mem | head -10': 'USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\nreese 1242 2.1 12.4 4285632 3932160 ? Sl May15 42:18 /opt/llama.cpp/build/bin/llama-server --model /models/Qwen3-30B-A3B.Q4_K_M.gguf --port 8082\ndocker 2341 1.2 6.8 8562348 2156032 ? Sl May15 28:45 /usr/bin/dockerd -H fd://\nreese 3456 0.8 3.2 2845632 1015808 ? Sl May15 18:22 /opt/open-webui/server\nreese 4567 0.5 2.1 1562348 665600 ? Sl May15 12:34 /usr/bin/python3 /opt/borg/borgmatic\nroot 5678 0.3 1.4 945632 448000 ? Ssl May15 8:12 /usr/bin/docker-proxy -p tcp:0.0.0.0:80:80\nreese 6789 0.2 1.1 745632 348000 ? Ssl May15 5:45 /usr/bin/podman run --name homepage\nroot 7890 0.1 0.8 545632 256000 ? Ssl May15 3:22 /usr/bin/docker-proxy -p tcp:0.0.0.0:443:443',
'neofetch': ` 'c. reese@homelab\n ,xNMM. ----------------------\n .OMMMMo OS: Fedora Linux 69 (Workstation Edition) x86_64\n OMMM0, Host: custom-build\n .;loddo:' loolloddol;. Kernel: 6.8.0\n cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 42 days, 3 hours\n .KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 2847 (dnf)\n XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: bash 5.2.26\n;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 2560x1440\n:MMMMMMMMMMMMMMMMMMMMMMMM: DE: GNOME 46.1\n.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Mutter\n kMMMMMMMMMMMMMMMMMMMMMMMMWd. Terminal: /dev/pts/0\n .XMMMMMMMMMMMMMMMMMMMMMMMMMMk CPU: AMD Ryzen 9 7900X (24) @ 5.6GHz\n .XMMMMMMMMMMMMMMMMMMMMMMK. GPU: NVIDIA GeForce RTX 4090\n kMMMMMMMMMMMMMMMMMMMMd GPU: AMD Ryzen Built-in\n ;KMMMMMMMWXXWMMMMMMMk. Memory: 8.2Gi / 31Gi\n .cooc,. .,coo:.\n\n<span style="color: #22c55e">███</span><span style="color: #22c55e">███</span><span style="color: #22c55e">███</span><span style="color: #eab308">███</span><span style="color: #eab308">███</span><span style="color: #eab308">███</span><span style="color: #3b82f6">███</span><span style="color: #3b82f6">███</span><span style="color: #3b82f6">███</span><span style="color: #8b5cf6">███</span><span style="color: #8b5cf6">███</span><span style="color: #8b5cf6">███</span><span style="color: #ec4899">███</span><span style="color: #ec4899">███</span><span style="color: #ec4899">███</span>`, 'neofetch': ` 'c. reese@homelab\n ,xNMM. ----------------------\n .OMMMMo OS: Fedora Linux 69 (Workstation Edition) x86_64\n OMMM0, Host: custom-build\n .;loddo:' loolloddol;. Kernel: 6.8.0\n cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 42 days, 3 hours\n .KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 2847 (dnf)\n XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: bash 5.2.26\n;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 2560x1440\n:MMMMMMMMMMMMMMMMMMMMMMMM: DE: GNOME 46.1\n.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Mutter\n kMMMMMMMMMMMMMMMMMMMMMMMMWd. Terminal: /dev/pts/0\n .XMMMMMMMMMMMMMMMMMMMMMMMMMMk CPU: AMD Ryzen 9 7900X (24) @ 5.6GHz\n .XMMMMMMMMMMMMMMMMMMMMMMK. GPU: NVIDIA GeForce RTX 4090\n kMMMMMMMMMMMMMMMMMMMMd GPU: AMD Ryzen Built-in\n ;KMMMMMMMWXXWMMMMMMMk. Memory: 8.2Gi / 31Gi\n .cooc,. .,coo:.\n\n<span style="color: #22c55e">███</span><span style="color: #22c55e">███</span><span style="color: #22c55e">███</span><span style="color: #eab308">███</span><span style="color: #eab308">███</span><span style="color: #eab308">███</span><span style="color: #3b82f6">███</span><span style="color: #3b82f6">███</span><span style="color: #3b82f6">███</span><span style="color: #8b5cf6">███</span><span style="color: #8b5cf6">███</span><span style="color: #8b5cf6">███</span><span style="color: #ec4899">███</span><span style="color: #ec4899">███</span><span style="color: #ec4899">███</span>`,
'sl': '____\n|DD|____T_\n|_ |_____|<\n @-@-@-oo\\', 'sl': '____\n|DD|____T_\n|_ |_____|<\n @-@-@-oo\\',
'help': 'Available commands:\n ls List directory contents\n pwd Print working directory\n whoami Print current user\n hostname Print hostname\n date Print current date/time\n uname Print system information\n uptime Print system uptime\n id Print user identity\n cat Print file contents (try: cat /etc/os-release)\n docker List running containers\n podman List running pods\n systemctl List running systemd services\n ss Show listening ports\n ip Show network interfaces\n df Show disk usage\n free Show memory usage\n ps Show running processes\n neofetch System info display\n sl Steam locomotive\n help Show this help message', 'help': 'Available commands:\n ls List directory contents\n pwd Print working directory\n whoami Print current user\n hostname Print hostname\n date Print current date/time\n uname Print system information\n uptime Print system uptime\n id Print user identity\n cat Print file contents\n docker List running containers\n podman List running pods\n systemctl List running systemd services\n ss Show listening ports\n ip Show network interfaces\n df Show disk usage\n free Show memory usage\n ps Show running processes\n apt Package manager (update, install)\n curl Fetch a webpage\n wget Fetch a webpage\n neofetch System info display\n sl Steam locomotive\n clear Clear the terminal\n exit Exit to login screen\n sudo Gain root access\n rm Remove files\n echo Print text\n help Show this help message',
}; };
if (cmdText.startsWith('echo ')) { if (cmdText.startsWith('echo ')) {
@@ -407,6 +407,122 @@ function createTerminal(face) {
outLine.textContent = output; outLine.textContent = output;
outLine.style.color = '#ccc'; outLine.style.color = '#ccc';
content.appendChild(outLine); content.appendChild(outLine);
} else if (cmdText.startsWith('curl ')) {
const url = cmdText.replace(/^curl\s+(?:-s\s+)?/, '');
const outLine = document.createElement('div');
outLine.style.whiteSpace = 'pre-wrap';
outLine.style.color = '#ccc';
outLine.textContent = 'Downloading...';
content.appendChild(outLine);
fetch(url)
.then(r => r.text())
.then(data => {
outLine.textContent = data;
content.scrollTop = content.scrollHeight;
})
.catch(err => {
outLine.textContent = 'curl: error fetching ' + url + ': ' + err.message;
content.scrollTop = content.scrollHeight;
});
} else if (cmdText.startsWith('wget ') || cmdText.startsWith('wget ')) {
const url = cmdText.replace(/^wget\s+(?:-O\s+\S+\s+)?/, '');
const outLine = document.createElement('div');
outLine.style.whiteSpace = 'pre-wrap';
outLine.style.color = '#ccc';
outLine.textContent = 'Downloading...';
content.appendChild(outLine);
fetch(url)
.then(r => r.text())
.then(data => {
outLine.textContent = data;
content.scrollTop = content.scrollHeight;
})
.catch(err => {
outLine.textContent = 'wget: error fetching ' + url + ': ' + err.message;
content.scrollTop = content.scrollHeight;
});
} else if (cmdText.startsWith('apt ')) {
const pkg = cmdText.replace(/^apt\s+/, '');
const outLine = document.createElement('div');
outLine.style.whiteSpace = 'pre-wrap';
outLine.style.color = '#ccc';
content.appendChild(outLine);
if (pkg === 'update' || pkg.startsWith('update ')) {
outLine.textContent = 'Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]\nGet:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]\nGet:3 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1,234 kB]\nGet:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [987 kB]\nFetched 2,478 kB in 3s (921 kB/s)\nReading package lists... Done\nBuilding dependency tree... Done\nReading state information... Done\nAll packages are up to date.';
} else if (pkg.startsWith('install ')) {
const packageName = pkg.replace(/^install\s+/, '');
const installOutput = [
'Reading package lists... Done',
'Building dependency tree... Done',
'Reading state information... Done',
'The following NEW packages will be installed:',
' ' + packageName,
'0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.',
'Need to get ' + Math.floor(Math.random() * 5000 + 500) + ' kB of archives.',
'After this operation, ' + Math.floor(Math.random() * 50 + 10) + ' MB of additional disk space will be used.',
'Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 ' + packageName + ' amd64 ' + Math.random().toFixed(2) + ' [1,234 kB]',
'Fetched 1,234 kB in 1s (1,567 kB/s)',
'Selecting previously unselected package ' + packageName + '.',
'Preparing to unpack .../' + packageName + '_amd64.deb ...',
'Unpacking ' + packageName + ' (1.0.0) ...',
'Setting up ' + packageName + ' (1.0.0) ...',
'Processing triggers for man-db (2.10.2-1) ...'
].join('\n');
outLine.textContent = installOutput;
} else {
outLine.textContent = 'Usage: apt <command>\nCommands:\n update Update package lists\n install Install packages';
}
} else if (cmdText.startsWith('dnf ')) {
const pkg = cmdText.replace(/^dnf\s+/, '');
const outLine = document.createElement('div');
outLine.style.whiteSpace = 'pre-wrap';
outLine.style.color = '#ccc';
content.appendChild(outLine);
if (pkg === 'update' || pkg.startsWith('update ')) {
outLine.textContent = 'Fedora Linux 42 - x86_64\nFedora Linux 42 - x86_64 - Updates\nDependencies resolved.\n================================================================================\n Package Architecture Version Repository Size\n================================================================================\nUpdating:\n systemd x86_64 256.4-1.fc42 fedora 4.2 M\n dbus x86_64 1.16.0-1.fc42 fedora-updates 756 k\n\nTransaction Summary\n================================================================================\nUpgrade 2 Packages\n\nTotal download size: 5.0 M\nIs this ok [y/N]: Yes\nDownloading Packages:\n(1/2): systemd-256.4-1.fc42.x86_64.rpm 1.2 MB/s | 4.2 MB 00:03\n(2/2): dbus-1.16.0-1.fc42.x86_64.rpm 890 kB/s | 756 kB 00:00\n--------------------------------------------------------------------------------\nTotal 3.5 MB/s | 5.0 MB 00:01\nRunning transaction check\nTransaction check succeeded.\nRunning transaction test\nTransaction test succeeded.\nRunning transaction\n Preparing : 1/1\n Updating : systemd-256.4-1.fc42.x86_64 1/4\n Running scriptlet: systemd-256.4-1.fc42.x86_64 1/4\n Updating : dbus-1.16.0-1.fc42.x86_64 2/4\n Running scriptlet: dbus-1.16.0-1.fc42.x86_64 2/4\n Cleanup : dbus-1.16.0-1.fc42.x86_64 3/4\n Cleanup : systemd-256.3-1.fc42.x86_64 4/4\n Running scriptlet: systemd-256.3-1.fc42.x86_64 4/4\n Verifying : dbus-1.16.0-1.fc42.x86_64 1/4\n Verifying : systemd-256.4-1.fc42.x86_64 2/4\n\nUpdated:\n systemd-256.4-1.fc42.x86_64 dbus-1.16.0-1.fc42.x86_64\n\nComplete!';
} else if (pkg.startsWith('install ')) {
const packageName = pkg.replace(/^install\s+/, '');
const installOutput = [
'Last metadata expiration check: 0:15:32 ago on Sun May 31 14:30:00 2026.',
'Dependencies resolved.',
'================================================================================',
' Package Architecture Version Repository Size',
'================================================================================',
'Installing:',
' ' + packageName + ' x86_64 1.0.0-1.fc42 fedora 1.2 M',
'',
'Transaction Summary',
'================================================================================',
'Install 1 Package',
'',
'Total download size: 1.2 M',
'Installed size: 3.5 M',
'Is this ok [y/N]: Yes',
'Downloading Packages:',
'(' + packageName + ').rpm 2.1 MB/s | 1.2 MB 00:00',
'--------------------------------------------------------------------------------',
'Total 1.8 MB/s | 1.2 MB 00:00',
'Running transaction check',
'Transaction check succeeded.',
'Running transaction test',
'Transaction test succeeded.',
'Running transaction',
' Preparing : 1/1',
' Installing : ' + packageName + ' 1/1',
' Running scriptlet: ' + packageName + ' 1/1',
' Verifying : ' + packageName + ' 1/1',
'',
'Installed:',
' ' + packageName + '-1.0.0-1.fc42.x86_64',
'',
'Complete!'
].join('\n');
outLine.textContent = installOutput;
} else {
outLine.textContent = 'Usage: dnf <command>\nCommands:\n update Update packages\n install Install packages';
}
} else if (commands[cmdText] !== undefined) { } else if (commands[cmdText] !== undefined) {
const output = commands[cmdText]; const output = commands[cmdText];
const outLine = document.createElement('div'); const outLine = document.createElement('div');
@@ -620,6 +736,11 @@ const ACHIEVEMENTS = {
clean_slate: { name: 'Clean Slate', desc: 'Clear the terminal', icon: '🧹', cmd: 'clear' }, clean_slate: { name: 'Clean Slate', desc: 'Clear the terminal', icon: '🧹', cmd: 'clear' },
train_spotter: { name: 'Train Spotter', desc: 'Run the steam locomotive', icon: '🚂', cmd: 'sl' }, train_spotter: { name: 'Train Spotter', desc: 'Run the steam locomotive', icon: '🚂', cmd: 'sl' },
tain: { name: 'I like trains', desc: 'Choo chooooooo', icon: '🧹', cmd: 'sl' }, tain: { name: 'I like trains', desc: 'Choo chooooooo', icon: '🧹', cmd: 'sl' },
web_navigator: { name: 'Web Navigator', desc: 'Fetch a webpage using curl or wget', icon: '🌐', cmd: 'curl', prefix: true },
package_manager: { name: 'Package Manager', desc: 'Update package lists with apt', icon: '📦', cmd: 'apt update' },
software_installer: { name: 'Software Installer', desc: 'Install a package with apt', icon: '🔧', cmd: 'apt install', prefix: true },
fedora_updater: { name: 'Fedora Updater', desc: 'Update packages with dnf', icon: '🎯', cmd: 'dnf update' },
fedora_installer: { name: 'Fedora Installer', desc: 'Install a package with dnf', icon: '📀', cmd: 'dnf install', prefix: true },
}; };
// Load unlocked achievement keys from localStorage // Load unlocked achievement keys from localStorage
@@ -666,6 +787,9 @@ function checkAchievements(cmdText, isRoot) {
} else if (key === 'podman_confused' && cmdText === 'podman ls') { } else if (key === 'podman_confused' && cmdText === 'podman ls') {
achieved.push(key); achieved.push(key);
newAchievements.push(achievement); newAchievements.push(achievement);
} else if (key === 'web_navigator' && (cmdText.startsWith('curl ') || cmdText.startsWith('wget '))) {
achieved.push(key);
newAchievements.push(achievement);
} else if (achievement.prefix ? cmdText.startsWith(achievement.cmd) : achievement.cmd === cmdText) { } else if (achievement.prefix ? cmdText.startsWith(achievement.cmd) : achievement.cmd === cmdText) {
if ((key === 'nice_try' && isRoot) || (key === 'restore_backup' && !isRoot)) { if ((key === 'nice_try' && isRoot) || (key === 'restore_backup' && !isRoot)) {
continue; continue;