Перейти к основному содержимому

Parcel CLI reference

Parcel provides a command-line tool that packages Avalonia apps for Windows, macOS, and Linux. It includes app signing and packaging capabilities to simplify distribution of ready-to-install binaries.

Prerequisites

Before using Parcel, ensure you have:

  1. Parcel .NET tool installed - Follow the Getting Started guide
  2. Valid license key - Set the PARCEL_LICENSE_KEY environment variable or use the --license-key option with a valid license key from the portal
примечание

Parcel CLI is only available with a full Accelerate license

Overview

parcel [command] [options]

Global Options

OptionDescription
-?, -h, --helpShow help and usage information
--versionShow version information
--license-keyLicense key necessary to run Parcel. If unset, falls back to the "PARCEL_LICENSE_KEY" environment variable, or existing app session
--verbositySet the verbosity level (quiet, minimal, normal, detailed, diagnostic)

Commands

pack

Builds and packs a project according to pre-defined settings and input parameters.

parcel pack <project> [options]

Arguments:

  • <project> - Parcel project file to load config from

Options:

OptionDescriptionDefault
-o, --outputOutput directory<project-dir>\bin\packages
-r, --runtimesRuntime identifiers to pack application with (can specify multiple)current platform runtime
-p, --packagesPackage formats to output: deb, dmg, nsis, zip (can specify multiple)current platform package
--no-buildSkip recompiling input projectfalse

Example:

# Pack for current platform
parcel pack MyApp.parcel.xml

# Pack for multiple platforms and formats
parcel pack MyApp.parcel.xml -r osx-x64 -r linux-x64 -p dmg -p deb

step

Runs a specific step from the packaging process. Useful for debugging or customized packaging workflows.

parcel step [command] <input> <output> [options]

Available Step Commands:

CommandDescriptionInputOutput
publishPublishes .NET project for target platform-unused-Published application directory
merge-macMerges multiple architectures into universal macOS appDirectory with arch subdirectories (osx-x64, osx-arm64)Universal app directory
bundle-macPackages macOS app into single bundleApplication directoryApp bundle (.app)
sign-macSigns macOS app bundle with credentialsApp bundle or flat directorySigned bundle
notary-macSubmits app for Apple notarizationZipped app bundle or DMGNotarized file (stapled in case of DMG)
sign-winSigns Windows executableApplication executable or installedSigned executable or installer
create-zipCreates zip archive for distributionDirectory or fileZip archive (.zip)
create-dmgCreates DMG disk image for macOSApp bundle (.app)Unsigned DMG image file
create-debCreates Debian package for LinuxApplication directoryDebian package (.deb)
create-nsisCreates Windows NSIS installerApplication directoryUnsigned NSIS installer (.exe)

Example:

While these commands don't have a strict order, and can be executed independently, standard approach is following per platform.

Any of these steps can be replaced with your scripts allowing for higher flexibility than standard "parcel pack" command.

# `parcel step publish ./ ./publish -r win-x64 -p project.parcel` can be used instead
dotnet publish -r win-x64 -o ./publish

# signing, with parameters populated from .parcel config file
parcel step sign-win ./publish ./signed -p project.parcel

# installer
parcel step create-nsis ./signed ./installer.exe -p project.parcel

# or ZIP archive
parcel step create-zip ./signed ./archive.zip -p project.parcel

Common Options:

  • -p, --project - Parcel project file to load config from
  • -w, --overwrite - Overwrite existing output files
  • -r, --runtime - Runtime identifier (for publish command)

install-tools

Downloads or updates tool dependencies required for the packaging configuration.

parcel install-tools [options]

Options:

OptionDescription
-r, --runtimesRuntime identifiers (can specify multiple)
-p, --packagesPackage formats: deb, dmg, nsis, zip (can specify multiple)

Example:

# Install dependencies for specific platforms and package formats
parcel install-tools -r win-x64 -r osx-x64 -p nsis -p dmg

This specific command will pre-download NSIS and DMG tooling required for Parcel to run.

mcp

Runs a Model Context Protocol server, allowing Parcel commands to be executed from LLM AI sessions.

parcel mcp

See Model Context Protocol for more details on usage.

Environment Variables

  • PARCEL_LICENSE_KEY - Default license key used when --license-key option is not provided

Notes

  • All packaging options, signing credentials, and visual customizations are defined in the Parcel project file (.parcel)
  • When using --no-build, ensure that publish-related settings (trimming, AOT, single-file) match between your build and Parcel configuration