pio-package
Manage PlatformIO packages and dependencies
TLDR
Create a package tarball from the current directory
Create and publish a package tarball from the current directory
Publish the current directory and restrict public access to it
Publish a package
Publish a package with a custom release date (UTC)
Remove all versions of a published package from the registry
Remove a specific version of a published package from the registry
Undo the removal, putting all versions or a specific version of the package back into the registry
SYNOPSIS
pio package {install|uninstall|update|list|search|publish|show|unpublish} [OPTIONS] [ARGS]
PARAMETERS
install [<name>]
Install a package by name or URL (global with -g)
uninstall [-g|--global] <name>
Uninstall a specific package
update [-g|--global] [<name>]
Update all or specific package(s)
list [-g|--global]
List installed packages
search <query>
Search packages by keywords
publish
Publish current directory as a package (requires auth)
show <name>
Display detailed package information
unpublish <name>
Unpublish a package (requires auth)
-g, --global
Operate on global packages
-v, --verbose
Enable verbose output
-f, --force
Force operation, skip confirmations
-c, --only-check
Only check for updates without applying
DESCRIPTION
The pio package command is part of PlatformIO Core, an open-source ecosystem for IoT and embedded systems development. It manages packages including libraries, platforms, frameworks, and tools hosted on the PlatformIO Registry.
Users can install dependencies for projects supporting microcontrollers like ESP32, STM32, AVR (Arduino), and more. Packages can be installed globally (-g) or per-project. Key operations include searching by keywords, listing installed packages, updating to latest versions, and publishing custom packages.
This tool streamlines dependency management, avoiding manual downloads. It's invoked via the pio CLI after installing PlatformIO Core via pip or system package managers. Ideal for firmware developers needing reproducible builds across IDEs like VSCode, CLion, or command-line.
Authentication with PlatformIO account is required for publishing/unpublishing.
CAVEATS
Requires PlatformIO Core installed (pip install platformio). Publishing needs pio account login. Global installs affect all projects; use project-local for isolation. Network access required for registry operations.
EXAMPLES
pio package install "ArduinoJson@6"
pio package search esp32
pio package list -g
pio package update
REGISTRY
Packages hosted at registry.platformio.org. Supports semantic versioning and dependencies.
HISTORY
Introduced in PlatformIO Core 2.0.0 (2016). PlatformIO founded in 2014 by Ivan Kravets; package management evolved with registry launch in 2015 for community sharing.


