How to manually push a new version to the Platformio registry manager?

Hi , @ivankravets

How to manually push a new version to the Platformio registry manager?
I updated XPowersLib to version V0.1.6 some time ago, and I still found v0.1.5 when searching the platformio registry, but I cannot push the new version through pio.

Please tell me how I can update the version in registry by pio command.

I have tried to update using the pio pkg publish command before, but I got an error, whether it is win or ubuntu

lewis@lewis-virtual-machine:~/Documents$ ls
lewis@lewis-virtual-machine:~/Documents$ pio pkg publish --type library  ./XPowersLib/
Preparing a package...
Error: Traceback (most recent call last):
  File "/home/lewis/.local/lib/python3.10/site-packages/platformio/", line 102, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/home/lewis/.local/lib/python3.10/site-packages/click/", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/lewis/.local/lib/python3.10/site-packages/click/", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/lewis/.local/lib/python3.10/site-packages/platformio/", line 70, in invoke
    return super().invoke(ctx)
  File "/home/lewis/.local/lib/python3.10/site-packages/click/", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/lewis/.local/lib/python3.10/site-packages/click/", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/lewis/.local/lib/python3.10/site-packages/click/", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/lewis/.local/lib/python3.10/site-packages/click/", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/lewis/.local/lib/python3.10/site-packages/platformio/package/commands/", line 104, in package_publish_cmd
    archive_path = p.pack()
  File "/home/lewis/.local/lib/python3.10/site-packages/platformio/package/", line 161, in pack
    with FileUnpacker(src) as fu:
  File "/home/lewis/.local/lib/python3.10/site-packages/platformio/package/", line 138, in __enter__
    self._archiver = self.new_archiver(self.path)
  File "/home/lewis/.local/lib/python3.10/site-packages/platformio/package/", line 153, in new_archiver
    with open(path, "rb") as fp:
FileNotFoundError: [Errno 2] No such file or directory: './XPowersLib/'


An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section

* Report this problem to the developers



Can you cd XPowersLib and then pio pkg publish --type library . ?

Tried various methods. Nothing works.

What was the error when you used the above commands?

Are you running the latest PIO core version? pio upgrade --dev if in doubt.

lewis@lewis-virtual-machine:~/Documents$ cd XPowersLib/
lewis@lewis-virtual-machine:~/Documents/XPowersLib$ pio pkg publish --type library  .
Preparing a package...
Error: Unknown manifest file type in . directory
lewis@lewis-virtual-machine:~/Documents/XPowersLib$ pio upgrade --dev
Please wait while upgrading PlatformIO Core ...
PlatformIO has been successfully upgraded to 6.1.8a1
Release notes:

So the XPowersLib folder has no library.json or where is it?

lewis@lewis-virtual-machine:~/Documents/XPowersLib$ ls
CMakeLists.txt  examples  keywords.txt  Micropython
datasheet       Kconfig   library.json  LICENSE             platformio.ini  src
lewis@lewis-virtual-machine:~/Documents/XPowersLib$ cat library.json 
  "name": "XPowersLib",
  "version": "0.1.7",
  "description": "Arduino,CircuitPython,Micropython library for x-powers power management series",
  "keywords": "AXP192 AXP202 AXP2101 x-powers",
  "authors": [
      "name": "LewisHe",
      "url": "",
      "maintainer": true
  "repository": {
    "type": "git",
    "url": ""
  "homepage": "",
  "export": {
    "include": [
  "frameworks": ["arduino", "espidf"],
  "platforms": "esp32",
  "headers": "XPowersLib.h"

What happens if you just pio pkg publish --type library in that directory?

1 Like

Okay, there’s no need to pass in any parameters, just publish it. Thank you for your help