CookieOS enhances the CC:Tweaked shell at startup throughDocumentation 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.
startup/replacements.lua. Several built-in functions are wrapped or extended to add CookieOS-specific behaviour, and a handful of new helpers are injected directly into the shell and os globals. All changes are applied automatically at boot — no manual configuration is needed.
shell command
Runningshell at the command prompt executes programReplacements/shell.lua, which prints the currently loaded OS versions in yellow text:
about command (programReplacements/about.lua) displays the same information, additionally appending the _HOST string to the main OS line.
os.version() enhancement
The originalos.version() is wrapped to return two values: the base CC:Tweaked version string and the CookieOS co-version stored in the global cosv.
shell.setDir() enhancement
The built-inshell.setDir() is wrapped to write the current directory to os/data/lastDir.txt before navigating away, so that shell.lastDir() always has a valid destination to return to.
false as the second argument suppresses the log write for that single call:
shell.resolveProgram() override
shell.resolveProgram() is overridden to check /programReplacements/ before the standard program search path. This is the mechanism that makes all command replacements transparent — see Program Replacements Overview for the full details and source snippet.
Tab completion
The enhancedlist and ls commands are registered with cc.shell.completion so that directory names are auto-completed when you press Tab:
colors.grey alias
startup/replacements.lua adds colors.grey as an alias for colors.gray, ensuring scripts written with British spelling work without modification:
Summary of shell additions
| Feature | Details |
|---|---|
shell command | Prints main OS + CookieOS co-version |
os.version() | Returns two values: main, co |
shell.lastDir() | Navigates to the previously visited directory |
shell.setDir() | Logs the current directory to os/data/lastDir.txt before changing |
shell.resolveProgram() | Checks /programReplacements/ before the default path |
colors.grey | Alias for colors.gray |
| Tab completion | list and ls complete directory names |