LinuxCommandLibrary

pio-pkg

Manage PlatformIO project packages

TLDR

Create a package tarball from the current directory

$ pio pkg pack [[-o|--output]] [path/to/package.tar.gz]
copy

Create and publish a package tarball from the current directory
$ pio pkg publish
copy

Publish the current directory and restrict public access to it
$ pio pkg publish --private
copy

Publish a package
$ pio pkg publish [path/to/package.tar.gz]
copy

Publish a package with a custom release date (UTC)
$ pio pkg publish [path/to/package.tar.gz] --released-at "[2021-04-08 21:15:38]"
copy

Remove all versions of a published package from the registry
$ pio pkg unpublish [package]
copy

Remove a specific version of a published package from the registry
$ pio pkg unpublish [package]@[version]
copy

Undo the removal, putting all versions or a specific version of the package back into the registry
$ pio pkg unpublish --undo [package]@[version]
copy

SYNOPSIS

pio pkg [options]

PARAMETERS

install
    Installs a package based on name or a specifier from a registry.

uninstall
    Uninstalls an existing package.

list
    Lists installed packages.

update
    Updates installed packages to the latest versions.

show
    Shows package metadata and details about the package.

--global
    Installs/uninstalls the package globally for PlatformIO.

-h, --help
    Shows help message and exit.

DESCRIPTION

The `pio pkg` command is a part of the PlatformIO Core, a professional collaborative platform for embedded development. It provides a package management system tailored for PlatformIO projects, allowing users to easily search, install, uninstall, list, and manage project dependencies, including libraries, toolchains, and frameworks.

This command simplifies the process of incorporating external resources into a PlatformIO project by automating the download, installation, and configuration steps. Users can ensure consistent and reproducible builds across different environments by explicitly managing package versions and dependencies within their `platformio.ini` configuration file.

The package manager integrates seamlessly with PlatformIO's build system, enabling automatic resolution of dependencies during compilation and linking. This eliminates the need for manual configuration and ensures that the correct versions of all required components are available. Furthermore, the `pio pkg` command offers features for verifying package integrity and security, reducing the risk of incorporating malicious or compromised software into embedded projects.

CAVEATS

The exact availability and functionality of `pio pkg` commands might depend on the specific version of PlatformIO Core being used. Refer to the official PlatformIO documentation for the most up-to-date information.

CONFIGURATION

Packages managed via `pio pkg` are generally defined within the `platformio.ini` file of a PlatformIO project. This file allows you to specify dependencies with specific version constraints. PlatformIO will use this configuration to automatically resolve and install necessary dependencies during the build process.

SEE ALSO

pio lib(1), pio project(1)

Copied to clipboard