Skip to content
On this page

lip pkg pack

Pack a directory into a ZIP archive.

Synopsis

shell
lip pkg pack [DIR] -o <FILE>

Arguments

ArgumentDescription
[DIR]The directory whose files go into the archive. Defaults to the current directory.

Options

OptionDescription
-o, --output <FILE>The ZIP archive to write. Required.

Description

Writes to <FILE>, replacing any existing file, a ZIP archive holding every regular file below DIR at its path relative to DIR. <FILE> itself, and everything in .git/ and .lip/ at the root of DIR, are left out. The files are packed as they are: lip pkg pack does not read or check lip.toml or manifest.json. If DIR is not an existing directory, the command fails and writes nothing.

A ZIP archive cannot hold a \ in a name, so on Linux and macOS lip pkg pack fails, without writing <FILE>, if the name of a file to pack, or of a directory above it, contains \. Rename it first.

Use it to build:

  • the archive of an mcmod asset, from a directory with the LeviLamina manifest.json of the mod at its root, e.g. the output directory of your build. Attach it to the release and list its URL in the urls of the asset. See A Mod.
  • a package as a single ZIP file, from a directory with a lip.toml at its root, to install it with lip install or to publish it at a URL.

Examples

Pack the files of build/ as the mcmod archive of a mod:

shell
lip pkg pack build/ -o MyMod-server-win-x64.zip

Pack the package in the current directory:

shell
lip pkg pack -o MyTool.zip