pio pkg pack


pio pkg pack [<source directory, tar.gz or zip>] [OPTIONS]


Create a tarball from a package (library, Development Platforms, or tool). If no arguments are supplied, then platformio packs the current package folder.

A source of a package must contain a manifest (should be located in a root of a package) depending on a package type:


A library.json is a manifest file of a library package.


A platform.json is a manifest file of a development platform package. See Manifest File platform.json.


A package.json is a manifest file of a tool package. It is intended for toolchains, flashers, debugging servers, simulators, and other tools.

See a manifest validation scheme.


-o, --output

Specify a destination path (folder or a full path to file) where to store a tarball. The default is to create a tarball in the current working directory.

Files included in package

All files are included by default, with the following exceptions:

  • Certain files that are relevant to package installation and distribution are always included. For example, library.json, README.md, LICENSE, etc.

  • If the export field is not declared in the manifest, the next default filters will be applied

  • If the export field is not declared in the manifest and there is a .gitignore file, then ignored files in that and all child directories will be excluded from the package.

See Also