Guides

Eggfile

Describe a whole machine in one file, build it, and run it. An Eggfile is a build file that's allowed to talk about hardware: the familiar build lines — FROM, RUN, COPY, ENV, WORKDIR, CMD — plus a set of machine instructions, because an egg is a whole computer, not a process in a shared kernel.

# Eggfile — a GPU dev box
FROM alpine

RUN apk add build-base git
COPY . /work
WORKDIR /work

# The machine (Egg extensions)
CPUS 8
RAM 16G
DISK 40G
GPU virgl
DISPLAY 1920x1080
NETWORK restricted
SOUND true
MCP true

INSTALL sys
SNAPSHOT ready
LOGO logo.png

Read it top to bottom: what it's made from (FROM), what to do inside it (RUN, COPY, WORKDIR), what machine it is (CPUS … MCP), and how it ships (INSTALL, SNAPSHOT, LOGO).

Build and run

egg build -f Eggfile --egg devbox      # build the egg (a signed bundle in eggs/devbox.egg)
egg run devbox                         # boot it — a real machine

egg build boots a build machine from your FROM, runs your steps inside it, applies the machine lines, and writes the result as a bundle: eggs/devbox.egg/ holding the disk, egg.toml, metadata, art and the build snapshot. The bundle is signed (MANIFEST.json + MANIFEST.sig) so anyone who pulls it can verify it.

Build names an egg; a version is named when you publish it, by egg push --tag.

The directives

DirectiveWhat it does
FROM alpinethe base the machine is made from
RUN apk add build-base gita step run inside the build machine
COPY . /workcopy files from the build context into the machine
WORKDIR /workthe working directory for later steps
CPUS 8virtual CPUs
RAM 16Gguest memory
DISK 40Groot disk (G or M)
GPU virglthe 3D backend (default virgl)
DISPLAY 1920x1080the screen; or DISPLAY width=1920 height=1080 scale=2
NETWORK restrictedisolated, restricted or open
SOUND truethe sound device, if the machine needs it
MCP trueagent-ready: the egg is built for egg-mcp sessions
INSTALL sysinstall the base onto the disk — cold-boots as a real installed OS
SNAPSHOT readysnapshot after the build, so egg run restores a warm, known-good state
LOGO logo.png512×512 bundle art, shown in the app and on the hub

Next: Publish