Examples
A minimal working example lives in examples/myapp/ in the repository.
Minimal project
The example shows the smallest possible project structure that appimage-build can package:
examples/myapp/
├── pyproject.toml
└── myapp/
└── __init__.py
pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "myapp"
version = "0.1.0"
description = "Minimal example project for appimage-build"
requires-python = ">=3.11"
[project.scripts]
myapp = "myapp:main"
[tool.hatch.build.targets.wheel]
packages = ["myapp"]
myapp/__init__.py
def main() -> None:
print("Hello from AppImage!")
No [tool.appimage.build] section is needed — app, entry_point, and python are all detected automatically from the [project] table.
Build the example
cd examples/myapp
python -m appimage.build
The AppImage is written to examples/myapp/dist/myapp-x86_64.AppImage.
Offline / CI build
When building in a network-restricted environment or sharing a cache across builds, point the tool to local copies of appimagetool and the Python distribution:
python -m appimage.build \
--appimagetool /opt/appimagetool-x86_64.AppImage \
--python-archive /shared/cache/python.tar.gz
The same paths can be set permanently in pyproject.toml:
[tool.appimage.build]
appimagetool = "/opt/appimagetool-x86_64.AppImage"
python_archive = "/shared/cache/python.tar.gz"
Resolution order for appimagetool:
Path from
--appimagetool/appimagetoolconfig keyappimagetoolfound onPATHCached binary in
build/appimagetool-<arch>.AppImageDownloaded from GitHub
Resolution order for the Python archive:
Path from
--python-archive/python_archiveconfig keyCached archive in
build/python.tar.gzDownloaded from python-build-standalone