For the complete documentation index, see llms.txt. This page is also available as Markdown.

pack

gumcli pack <project.gumx> [-o <path>] [--include <categories>]

Loads a .gumx project, walks its dependencies, and writes a single-file .gumpkg bundle (tar + brotli) containing the requested file categories. Use this when you want to ship a single file with your game instead of a folder of loose .gumx/.gusx/.gucx/.gutx files plus textures and fonts.

The Gum WYSIWYG editor still saves loose files. .gumpkg is purely a packaging format produced by gumcli pack — there is no "Save as bundle" option in the editor.

Options

  • <project> — Path to the .gumx project file (positional argument)

  • -o, --output <path> — Output path. Defaults to <ProjectName>.gumpkg next to the .gumx.

  • --include <categories> — Comma-separated list of file categories to include. Defaults to core,fontcache,external. Valid values:

    • core — the .gumx plus all .gusx, .gucx, .gutx, and .behx files referenced by the project

    • fontcache — generated bitmap font files under FontCache/ (.fnt + .png pages)

    • external — files referenced by the project but outside Core/FontCache, such as sprite source .png textures and custom font files outside FontCache/

Examples

Pack with default categories (everything):

gumcli pack MyProject/MyProject.gumx

Pack to a specific output path:

gumcli pack MyProject/MyProject.gumx -o build/MyProject.gumpkg

Omit the font cache (e.g. when your build pipeline regenerates bitmap fonts via gumcli fonts):

Output

The command prints per-category file counts together with uncompressed and compressed byte sizes plus the overall compression ratio, for example:

Loading a .gumpkg at runtime

In MonoGame, load the project the same way you would a loose project:

If a sibling .gumpkg is found and the loose .gumx is not present, the loader transparently switches to bundle mode and serves all element, texture, and font reads from the bundle.

Loose wins when both exist. This is intentional — during development you keep the loose files (and hot reload) working, and in a published build you ship only the .gumpkg.

Exit Codes

Code
Meaning

0

Bundle written successfully

1

One or more dependency files were missing on disk

2

Project failed to load, project file not found or unreadable, or an invalid --include value was supplied

Last updated

Was this helpful?