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 screenfetch command prints a snapshot of your computer’s current state alongside a CC:Tweaked computer ASCII-art sprite. It combines information from the CC:Tweaked API, the CookieOS runtime, and cosUtils to give you a quick overview of the environment you are running in — useful for debugging, screenshots, or simply showing off your setup.

Running it

screenfetch
The screen is cleared and the output is rendered in a single pass. On Advanced Computers the ASCII art is drawn in yellow; on Standard Computers it falls back to gray tones. The display pauses briefly (sleep(0.25)) after rendering so the output is visible before the prompt returns.

Output fields

The following fields are displayed in order alongside the ASCII art:
FieldDescription
Computer labelos.getComputerLabel(), or "Untitled Computer" if no label is set
Type"Command Computer", "Advanced Computer", or "Standard Computer" based on the commands global and term.isColor()
Main OSFirst return value of os.version() — e.g. CraftOS 1.9
Co-OSSecond return value of os.version() — e.g. CookieOS v2.2.5
RuntimeMinecraft version (_MC_VERSION), CraftOS-PC version (os.about()), or CCEmuX version (ccemux.getVersion()); falls back to "Unknown"
Lua_VERSION — e.g. Lua 5.2
Host_HOST string provided by the CC:Tweaked runtime
Uptimeos.clock() formatted as hours, minutes, and seconds — e.g. 1h 4m 32s
SizeTotal storage used, from fs.attributes2("/").size — e.g. 48.72 KB
COS APINumber of functions currently loaded in cosUtils — e.g. 35 functions loaded
ExtensionsCC:Tweaked feature flags detected at runtime (see below)

ASCII art

The computer sprite is rendered with term.blit() using pre-encoded foreground and background color strings. Two color palettes are bundled — one for Standard Computers (gray) and one for Advanced Computers (yellow). The art is 10 characters wide and 7 lines tall, leaving room for system info fields to be printed alongside it on the right.

Environment detection

After the core fields, screenfetch appends one line per detected extension or environment. The following environments are recognised:
EnvironmentDetection method
CC: Tweakedhttp.websocket ~= nil
HTTP enabledhttp ~= nil
Debug enableddebug ~= nil
CraftOS-PCmounter ~= nil
CraftOS-PC GFXterm.setGraphicsMode ~= nil
CraftOS-PC 2term.screenshot ~= nil
CCEmuXccemux ~= nil
MBS.mbs or rom/.mbs file exists on disk
CCKernel2type(kernel) == "table"
Multiple extensions can be listed at the same time if more than one condition is true.

COS API count

The COS API field displays the result of cosUtils.getSizeOfCosUtils(), which counts the number of functions currently registered in the cosUtils table. If this number is lower than expected, it is a quick sign that cosUtils did not load completely during startup.

Build docs developers (and LLMs) love