fork of guillaumearm/cc-libs github repo
Go to file
2026-06-11 20:53:58 +02:00
.opencode feat(ai): add atm10 expert agent 2026-06-11 18:34:32 +02:00
.plans/archived chore(plans): archive completed notes 2026-06-11 05:43:30 +02:00
apis fix(ai): extend opencode timeouts 2026-06-11 20:53:58 +02:00
docs fix(ai): extend opencode timeouts 2026-06-11 20:53:58 +02:00
just chore(agents): adopt agents guidance 2026-06-11 19:35:23 +02:00
packages fix(ai): extend opencode timeouts 2026-06-11 20:53:58 +02:00
programs fix(ai): extend opencode timeouts 2026-06-11 20:53:58 +02:00
servers feat(mcp): add computer daemon 2026-06-11 06:07:53 +02:00
startup fix(boot): default shell exit to shutdown 2026-06-10 01:17:43 +02:00
tests fix(ai): extend opencode timeouts 2026-06-11 20:53:58 +02:00
tools/mcp-bridge feat(mcp): add write-file tool 2026-06-11 16:14:00 +02:00
.env.test feat(opencode): add serve and attach recipes 2026-06-09 06:08:29 +02:00
.gitignore feat(mcp): add computercraft bridge tool 2026-06-10 20:49:29 +02:00
.luacheckrc feat: add goo v1 2026-05-31 01:37:19 +02:00
AGENTS.md chore(agents): adopt agents guidance 2026-06-11 19:35:23 +02:00
ATM_EXPERT_AGENT_PLAN.md feat(ai): add atm10 expert agent 2026-06-11 18:34:32 +02:00
DEVELOPMENT.md chore(mcp): clean bridge build caches 2026-06-10 23:41:52 +02:00
install-ccpm.lua feat(ccpm): default registry to gitea 2026-06-11 06:41:22 +02:00
Justfile chore(just): split recipes by concern 2026-06-11 06:07:30 +02:00
lychee.toml chore(dev): validate markdown links 2026-06-09 02:34:40 +02:00
manifest.json fix(ai): extend opencode timeouts 2026-06-11 20:53:58 +02:00
README.md feat(ccpm): default registry to gitea 2026-06-11 06:41:22 +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

Install ccpm first. This is the only step that needs wget with a URL:

wget run https://git.trapcloud.fr/guillaumearm/cc-libs/raw/branch/master/install-ccpm.lua

Then sync the default registry (guillaumearm/cc-libs) and install TrapOS:

ccpm update
ccpm install trapos

Install individual packages instead if you want to cherry-pick:

> ccpm install trapos-net
> ccpm install trapos-ui

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

wget run https://git.trapcloud.fr/guillaumearm/cc-libs/raw/branch/next/install-ccpm.lua --beta

Once ccpm is installed from beta, the default registry tracks next; ccpm update and ccpm upgrade keep using that branch.

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

Packages

TrapOS is split into packages, each described by a packages/<name>/ccpm.json:

  • trapos-core: the package manager (ccpm), event loop, upgrade, events.
  • trapos-test: the test framework (libtest) and suite runner (runtest).
  • trapos-boot: the startup MOTD and autostart server launcher.
  • trapos-net: routed modem networking (net, router, ping, ping-server).
  • trapos-ui: the terminal UI toolkit (libtui, tuidemo).
  • trapos-ai: the AI client for opencode serve.
  • trapos: full TrapOS meta-package (trapos-boot, trapos-net, trapos-ui, trapos-test, and trapos-ai during beta).

The trapos meta-package is the user-facing full install. Package descriptors list files and autostart servers; installed state is tracked under /trapos.

ccpm

ccpm is the TrapOS package manager. install-ccpm.lua installs it by installing the required trapos-core package and configures the default registry (guillaumearm/cc-libs).

ccpm install <package>     ccpm reinstall <package>   ccpm uninstall <package>
ccpm update                ccpm upgrade
ccpm ls                    ccpm available [term]      ccpm search [term]
ccpm info <package>
ccpm registry ls           ccpm registry add <name> [--branch <b>] [--type gitea|github|http]
ccpm registry rm <name>

ccpm update fetches registry package indexes into /trapos/ccpm.cache.json. ccpm available lists cached packages and marks installed packages as up-to-date or updatable. ccpm upgrade upgrades installed packages based on that cache.

Registries default to GitHub (owner/repo); http/https base URLs are also supported. State lives in /trapos/ccpm.json (registries), /trapos/ccpm.lock.json (installed packages), and /trapos/ccpm.cache.json (available packages). See ADR-0010.

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: alias for ccpm upgrade.

Development

See DEVELOPMENT.md for local development installation.