Skip to main content

Set up a project

Check the Zig toolchain, create a project from Eggy's template, and open its editor. The same steps work through terminal prompts or supplied arguments.

Before you start​

Have an Eggy editor installation, including its resources, and a terminal in the parent directory where you want the project. Eggy uses Zig 0.17. If you use zvm, put its bin directory first on PATH.

The commands below use eggy_editor. Replace that with the path to your installed executable when it is not on PATH.

To create a project without an editor yet, run this from the folder that should contain it:

curl -fsSL https://raw.githubusercontent.com/eggyengine/eggy/main/scripts/get-started.sh | bash

On Windows, from PowerShell:

irm https://raw.githubusercontent.com/eggyengine/eggy/main/scripts/get-started.ps1 | iex

The script asks for a title, a package name, and a directory, then writes the template and fetches Eggy. If Zig 0.17 is missing, it asks before installing zvm (when zvm is not already installed) and Zig. It stops if Zig's standard library, a template file, or a required package is missing. The directory must be absent or empty. At the end it offers to compile the project and open its editor; the first compile takes a while. Otherwise, open it later with zig build run.

Steps​

Check Zig before creating a project​

Run:

eggy_editor doctor

Doctor checks the supported Zig version, standard library, a compiler invocation, cache write access, and project dependencies when a build file is present. Read each proposed repair before approving it.

With zvm already installed, doctor can run zvm install and zvm use for the required version. Selecting it changes the active zvm version. Doctor does not install zvm, OS SDKs, drivers, or language servers.

To check without reading terminal input or approving repairs, use:

eggy_editor doctor --project . --fix=false --non-interactive

Dependency evaluation can still fetch missing required Zig packages. --fix=false declines optional prefetch and toolchain changes.

Create the project​

For prompts, run:

eggy_editor new

Enter a title, package name, and directory. The name defaults to one derived from the title; the directory defaults to that name. The destination must be absent or empty.

To supply all creation answers:

eggy_editor new --title "Space Game" --name space_game --directory ./space_game --non-interactive

Creation unpacks the bundled engine and template and builds the project's editor. It finishes in the terminal unless you add --open.

The GUI alternative is to launch eggy_editor without arguments and choose File > New Project. File > Open Project opens an existing project.

Open the project's editor​

From the generated project directory, run:

zig build run

The generated <name>_editor also opens its GUI without arguments. --project <directory> chooses a source project explicitly; otherwise the editor discovers it.

Verify​

Check that the editor's status bar names your project and that Assets shows its resources/ folder. From the project root, run eggy_editor doctor --project . to include its build configuration and dependencies in the checks.

For a first game, follow the scene-based tutorial or code-only tutorial.