PML 2

Command line

This document describes the PML 2 command-line mode, including unpacking and packing PMLA theme packages.

Besides the graphical interface, PML 2 also offers a command-line mode for unpacking and packing .pmla package files without opening a window — useful for scripting and automation.

.pmla is the multi-type unified package format of PML 2; components such as themes are distributed in this format. See "What is a PMLA file?" in the themes chapter.

Entering command-line mode

Pass pmla as the first launch argument to enter command-line mode:

MEFrpLauncherX pmla <subcommand> [arguments...]

The command-line branch runs before the graphical interface is initialised; once the operation finishes the process exits and no window is ever shown.

PML 2 is a single-instance application: if another PML 2 instance is already running, a newly passed pmla command only activates the existing window and exits — the unpack/pack operation is not performed. Quit the running PML 2 before using command-line mode.

Subcommands

SubcommandPurpose
unpackUnpack a .pmla package into a directory
packPack a directory into a .pmla package

Any other argument combination is treated as invalid.

Argument syntax

Every argument is passed as name=value, with no spaces around =. The following prefix styles are equivalent — the program strips -- and / prefixes automatically:

MEFrpLauncherX pmla unpack pmlaFile=MyTheme.pmla outPath=./theme-src
MEFrpLauncherX pmla unpack --pmlaFile=MyTheme.pmla --outPath=./theme-src

unpack

MEFrpLauncherX pmla unpack pmlaFile=<package> outPath=<output directory>
ArgumentAliasesRequiredDescription
pmlaFilepmla, inPmlaYesPath of the .pmla file to unpack
outPathoutputYesDestination directory for the unpacked content

Example:

MEFrpLauncherX pmla unpack pmla=MyTheme.pmla output=D:\themes\MyTheme

The console prints a banner and live progress:

==============================
PMLA Unpack Mode
Unpacking MyTheme.pmla(New Format: False) to D:\themes\MyTheme
==============================
[35%] unpacking...
Unpack completed.

New Format indicates whether the file uses the newer PMLAX package format. It is informational only: unpacking handles both the old and new formats automatically, no extra argument is needed.

pack

MEFrpLauncherX pmla pack inPath=<source directory> outPmla=<output file> [useNewFormat=true|false]
ArgumentAliasesRequiredDescription
inPathinputYesThe directory to pack
outPmlapmla, pmlaFileYesPath of the .pmla file to write
useNewFormatnewFormatNoWhether to use the newer PMLAX packing format. Defaults to true; pass false explicitly to use the legacy format

Example:

MEFrpLauncherX pmla pack inPath=./theme-src outPmla=MyTheme.pmla
MEFrpLauncherX pmla pack input=./theme-src pmla=MyTheme.pmla useNewFormat=false
This is equivalent to "Themes → Package selected" in the graphical interface. Keep the default new format unless you need compatibility with older PML 2 versions.

Exit codes

Exit codeMeaning
0Unpack/pack completed successfully
1Invalid arguments (unrecognised subcommand or argument combination)
2A required argument is missing, or a value is malformed

Additional notes:

  • Unrecognised arguments print [E] Invalid Arguments. to standard error and exit with code 1.
  • When a required argument is missing the process exits silently (returning only exit code 2), so scripts can branch on the exit code.
  • An argument name without a value after = (for example just pmlaFile=) prints Invalid pmlaFile argument. and exits with code 2.
Copyright © RYCBStudio 2026, All Rights Reserved.