strat9_kernel/shell/commands/help/
mod.rs1use crate::{shell::ShellError, shell_println};
3use alloc::string::String;
4
5pub fn cmd_help(_args: &[String]) -> Result<(), ShellError> {
6 shell_println!("Strat9-OS shell (Chevron) - available commands:");
7 shell_println!("");
8
9 shell_println!("-- General --");
10 shell_println!(" help - Display this help message");
11 shell_println!(" version - Display kernel version");
12 shell_println!(" clear - Clear the screen");
13 shell_println!(" uptime - System uptime since boot");
14 shell_println!(" echo <text ...> - Print text to console");
15 shell_println!(" reboot - Reboot the system");
16
17 shell_println!("");
18 shell_println!("-- Process --");
19 shell_println!(" ps - List all tasks");
20 shell_println!(" top - Graphical task manager (interactive)");
21 shell_println!(" kill <pid> - Terminate a task by PID");
22 shell_println!(" whoami - Show current silo identity");
23
24 shell_println!("");
25 shell_println!("-- Filesystem --");
26 shell_println!(" cd [path] - Change current directory");
27 shell_println!(" ls [path] - List directory contents");
28 shell_println!(" cat <path> - Display file contents");
29 shell_println!(" stat <path> - Display file metadata");
30 shell_println!(" mkdir <path> - Create a directory");
31 shell_println!(" touch <path> - Create an empty file");
32 shell_println!(" rm <path> - Remove a file or directory");
33 shell_println!(" cp <src> <dst> - Copy a file");
34 shell_println!(" mv <src> <dst> - Move/rename a file");
35 shell_println!(" write <path> <t> - Write text to a file");
36 shell_println!(" grep <pat> <path> - Search text in a file");
37 shell_println!(" df - Show mounted filesystems usage");
38 shell_println!(" scheme ls - List registered schemes");
39 shell_println!(" mount [src] [dst] - List or create mount points");
40 shell_println!(" umount <path> - Unmount a mount point");
41
42 shell_println!("");
43 shell_println!("-- Silo / Strate --");
44 shell_println!(" silo list - List all silos");
45 shell_println!(" silo info <x> - Detailed silo information");
46 shell_println!(" silo spawn <p> - Spawn strate (path/type, --label, --dev, --type)");
47 shell_println!(" silo start|stop|kill|destroy <x> - Lifecycle");
48 shell_println!(" silo suspend|resume <x> - Pause/resume a running silo");
49 shell_println!(" silo rename <x> <new> - Rename silo label");
50 shell_println!(" silo config show|add|remove ... - TOML configuration");
51 shell_println!(" silo events [x] - Show silo event history");
52 shell_println!(" silo pledge <x> <mode> - Reduce silo permissions (octal)");
53 shell_println!(" silo unveil <x> <path> <rwx> - Restrict path access");
54 shell_println!(" silo sandbox <x> - Enter sandbox mode");
55 shell_println!(" silo top [--sort mem|tasks] - Silo resource overview");
56 shell_println!(" silo logs <x> - Show silo event log");
57 shell_println!(" silos - Shortcut for 'silo list'");
58
59 shell_println!("");
60 shell_println!("-- Memory --");
61 shell_println!(" mem - Display memory status");
62 shell_println!(" mem zones - Display detailed zone information");
63
64 shell_println!("");
65 shell_println!("-- Hardware / IPC --");
66 shell_println!(" lspci - List PCI devices");
67 shell_println!(" lsns - List IPC namespace bindings");
68 shell_println!(" cpuinfo - Display CPU information");
69 shell_println!(" dmesg - Show kernel log buffer");
70 shell_println!(" env - Show system environment info");
71 shell_println!(" health - System health diagnostic");
72
73 shell_println!("");
74 shell_println!("-- Network --");
75 shell_println!(" ping [ip] [count] - ICMP echo request");
76 shell_println!(" ifconfig - Network configuration");
77 shell_println!(" net route ... - IPv4 routing table");
78
79 shell_println!("");
80 shell_println!("-- Scheduler --");
81 shell_println!(" scheduler debug|class|metrics|dump|policy ... ");
82
83 shell_println!("");
84 shell_println!("-- Graphics --");
85 shell_println!(" gfx help|info|mode|ui|test - Framebuffer commands");
86 shell_println!(" gfx-demo - Graphics demo");
87
88 shell_println!("");
89 shell_println!("-- Testing --");
90 shell_println!(" test_pid | test_syscalls | test_mem | test_mem_stressed");
91 shell_println!(" wasm-run <path> - Run a WASM application");
92 shell_println!(" trace mem ... - Memory trace control");
93 shell_println!("");
94 Ok(())
95}