TheDocumentation 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.
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
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:| Field | Description |
|---|---|
| Computer label | os.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 OS | First return value of os.version() — e.g. CraftOS 1.9 |
| Co-OS | Second return value of os.version() — e.g. CookieOS v2.2.5 |
| Runtime | Minecraft 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 |
| Uptime | os.clock() formatted as hours, minutes, and seconds — e.g. 1h 4m 32s |
| Size | Total storage used, from fs.attributes2("/").size — e.g. 48.72 KB |
| COS API | Number of functions currently loaded in cosUtils — e.g. 35 functions loaded |
| Extensions | CC:Tweaked feature flags detected at runtime (see below) |
ASCII art
The computer sprite is rendered withterm.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:
| Environment | Detection method |
|---|---|
| CC: Tweaked | http.websocket ~= nil |
| HTTP enabled | http ~= nil |
| Debug enabled | debug ~= nil |
| CraftOS-PC | mounter ~= nil |
| CraftOS-PC GFX | term.setGraphicsMode ~= nil |
| CraftOS-PC 2 | term.screenshot ~= nil |
| CCEmuX | ccemux ~= nil |
| MBS | .mbs or rom/.mbs file exists on disk |
| CCKernel2 | type(kernel) == "table" |