CookieOS ships a set of drop-in replacements for standard CC:Tweaked shell commands. Rather than patching the ROM, these replacements live inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/PrinceOfCookies/CookieOS/llms.txt
Use this file to discover all available pages before exploring further.
/programReplacements/ and are loaded transparently at boot — every time you type a command, the enhanced version runs instead of the default, with no extra configuration required.
How it works
During startup,startup/replacements.lua monkey-patches shell.resolveProgram(). Before falling back to the standard program path, the override checks whether a matching file exists inside /programReplacements/. Both bare names (e.g. list) and .lua-suffixed names (e.g. list.lua) are accepted.
shell.resolveProgram(), so all standard CC:Tweaked commands continue to work normally.
Available replacements
| Command | Replaces | Key enhancement |
|---|---|---|
list | Default list | Shows file sizes, -s/-i/-h flags, horizontal layout |
ls | Default ls | Alias for list using cosUtils helpers |
shell | N/A (new command) | Shows CookieOS version info |
screenfetch | Default screenfetch | CC:Tweaked system info with ASCII art |
about | Default about | Shows main OS and CookieOS co-OS version |
reboot | os.reboot() | Wrapped by replacements.lua for goodbye animation |
shutdown | os.shutdown() | Wrapped by replacements.lua for goodbye animation |
fs.attributes2()
startup/replacements.lua extends the built-in fs API with fs.attributes2(). It calls the standard fs.attributes() underneath and adds two extra fields: a human-readable file size and relative timestamps for modified and created.
size is the recursive total of all files inside, and modified reflects the most recently changed file anywhere in the tree.
The optional second argument hdOnly switches the timestamp format to a two-unit short form (e.g. "1 day, 4 hrs" instead of the full multi-unit breakdown).
shell.lastDir()
startup/replacements.lua adds a shell.lastDir() function that navigates back to the directory you were in before the most recent cd. The previous directory is persisted to os/data/lastDir.txt by the enhanced shell.setDir(), so it survives between command invocations within the same session.