Skip to main content

Documentation 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.

The CookieOS command prompt is a standard CC:Tweaked shell session wrapped with CookieOS styling. Selecting Command from the start menu runs os/.command, which clears the screen, prints a welcome header, and then hands control directly to the shell. From this point you have access to every built-in CC:Tweaked command as well as all CookieOS program replacements registered by startup/replacements.lua.

Welcome Header

When the command prompt starts it calls cosUtils.resetScreen(device) to clear the terminal and reset colours, then writes a brief header before positioning the cursor at row 3 ready for input:
local function cmdPrompt(device)
    device.setTextColor(colors.white)
    cosUtils.resetScreen(device)

    device.write("Welcome to COS CMD Prompt")
    device.setCursorPos(1, 2)
    device.write("===================================================")
    device.setCursorPos(1, 3)
end

cmdPrompt(term)
The === divider line acts as a visual separator between the header and your shell output.

What You Can Do

Once inside the command prompt you have full shell access. Common tasks include:
  • Standard CC:Tweaked programsedit, cd, delete, copy, move, mkdir, lua, and every other built-in program available in the vanilla CC:Tweaked ROM.
  • CookieOS program replacements — commands like list, ls, screenfetch, and about are silently intercepted by shell.resolveProgram and routed to the enhanced versions under programReplacements/ before falling back to the originals.
  • Custom scripts — any Lua file on the filesystem can be run directly by name or full path.
  • File downloads from GitHub — the gitget downloader bundled with CookieOS (os/.install) lets you pull files directly from a GitHub repository over HTTP from within the command prompt.

The gitget Downloader

CookieOS ships with a copy of the gitget GitHub downloading utility inside os/.install. It downloads files from a repository asynchronously and displays a live progress bar with a percentage indicator as files arrive. The downloader is pre-configured with preset variables that point it at the CookieOS repository by default:
local preset = {
    user = "PrinceOfCookies",
    repo = "CookieOS",
    branch = 'main',
    path = '/'
}
When async mode is enabled (the default) all HTTP requests are dispatched in parallel and any failed files are retried automatically. A progress percentage is written to the right edge of the terminal so you can see how much of the download remains.
When cosUtils.developmentMode is false, os.pullEvent is globally replaced with os.pullEventRaw at startup. This means Ctrl+T cannot terminate a running program while the OS is in production mode. If you need to interrupt a hung script during development, set developmentMode = true in startup/loading.lua.

Build docs developers (and LLMs) love