fork of guillaumearm/cc-libs github repo
Go to file
2026-06-08 01:10:06 +02:00
.plans chore: add plan 2026-05-31 01:50:14 +02:00
apis fix(libtui): improve flex layout handling 2026-06-08 00:53:52 +02:00
docs docs: add CraftOS-PC harness setup 2026-06-08 01:10:06 +02:00
programs feat: libtui + tuidemo (WIP) 2026-06-08 00:41:19 +02:00
servers chore: remove cube and goo programs 2026-06-07 19:45:00 +02:00
startup feat: add TrapOS manifest install flow 2026-06-07 23:40:32 +02:00
.gitignore feat: rename set-startup command in set-boot 2022-07-18 23:28:17 +02:00
.luacheckrc feat: add goo v1 2026-05-31 01:37:19 +02:00
CLAUDE.md docs: add CraftOS-PC harness setup 2026-06-08 01:10:06 +02:00
DEVELOPMENT.md docs: add CraftOS-PC harness setup 2026-06-08 01:10:06 +02:00
install.lua feat: add TrapOS manifest install flow 2026-06-07 23:40:32 +02:00
Justfile docs: add CraftOS-PC harness setup 2026-06-08 01:10:06 +02:00
manifest.json feat: libtui + tuidemo (WIP) 2026-06-08 00:41:19 +02:00
README.md feat: add TrapOS manifest install flow 2026-06-07 23:40:32 +02:00

TrapOS

A small in-game operating system for ComputerCraft / CC:Tweaked, built around a single-threaded event loop and a routed networking layer.

Installation

wget run https://raw.githubusercontent.com/guillaumearm/cc-libs/master/install.lua

Install the beta branch (one-time opt-in, asks for confirmation):

wget run https://raw.githubusercontent.com/guillaumearm/cc-libs/next/install.lua --beta

Once a machine is on beta, upgrade keeps it on beta — --beta is not needed again. Use upgrade --stable to go back to the stable branch.

After install, every boot shows a colored MOTD with the installed version and branch (lime for stable, orange + [BETA] for beta).

Manifest

The installed file list, version, autostart servers, and current branch all live in manifest.json at the repo root. A copy is persisted locally at /trapos/manifest.json after install, and drives upgrade, startup/motd.lua, and startup/servers.lua.

APIs

  • /apis/eventloop: a simple event loop API.
  • /apis/net: an API to simplify sending and receiving routed messages, based on the eventloop library.

Servers

Servers listed in manifest.autostart are launched at boot by startup/servers.lua.

  • /servers/ping-server: allows a machine to respond to a ping command.

Programs

  • router: routes messages. You need to set up a router to use all apis/net-based programs and libraries.
  • ping: pings machines using apis/net.
  • events: emits and logs computer events.
  • upgrade: upgrades the machine. Reads /trapos/manifest.json to stay on the current branch; use --beta to opt in or --stable to opt out.

Development

See DEVELOPMENT.md for development setup and workflow.