A small CLI utility that manages Moonforge-based projects.
You should set up a virtualenv and use pip to install from the cloned repository:
$ cd moonforge-cli
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -e .You can also run moonforge-cli uninstalled from the cloned repository, using the
moonforge.py wrapper, e.g.
$ Project/moonforge-cli/moonforge.py init --name=derivative ~/Projects/meta-derivativeUse moonforge init to initialize a new Moonforge project. The command
below will initialize a "derivative" project under the meta-derivative
directory, using the default machine:
$ moonforge init --name=derivative ~/Projects/meta-derivativeYou can specify various features at initialization time:
$ moonforge init \
--name=derivative \
--feature=rauc-simple \
--feature=podman \
~/Projects/meta-derivativeYou can also set layer-specific variables at initialization time:
$ moonforge init \
--name=webapp \
--feature=graphics-wpe \
--variable WAYLAND_COG_LAUNCH_URL=https://moonforgelinux.org \
~/Projects/webappOnce a Moonforge has been initialized, you can build it using the build
command:
$ mkdir workspace
$ cd workspace
$ mkdir cache
$ moonforge init --name=test meta-test
$ cd meta-test
$ moonforge config set container.engine podman
$ moonforge config set build.download_dir $PWD/../cache/downloads
$ moonforge config set build.sstate_dir $PWD/../cache/sstate-cache
$ moonforge build .You can use the shell command to enter an interactive shell in the build
environment:
$ moonforge shell .Projects can have multiple images, each with different target machines,
features, and layer-specific variables. You can add a new machine after
initialization by using the image command:
$ moonforge image add \
--name=embed \
--machine=raspberrypi5
~/Projects/webappYou can specify the image when building:
$ moonforge build --image=embed .
Copyright 2026 Igalia S.L.
This project is released under the terms of the MIT license. See the license file for more details.