Skip to content

Latest commit

 

History

History
105 lines (78 loc) · 2.28 KB

README.md

File metadata and controls

105 lines (78 loc) · 2.28 KB

moonforge-cli

A small CLI utility that manages Moonforge-based projects.

Installation

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-derivative

Using moonforge-cli

Initialization

Use 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-derivative

You can specify various features at initialization time:

$ moonforge init \
--name=derivative \
--feature=rauc-simple \
--feature=podman \
~/Projects/meta-derivative

You 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/webapp

Building

Once 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 .

Adding a new image

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/webapp

You can specify the image when building:

$ moonforge build --image=embed .

Copyright and licensing terms

Copyright 2026 Igalia S.L.

This project is released under the terms of the MIT license. See the license file for more details.