Lib manager for private libs management

while i was “crying” :slight_smile: about my complication oddities, i thought, maybe there is a way to use the lib manager to put libraries into the private directory?
something like :
pio lib global install lib_one
pio lib local/private install lib_one

First scenario - current functionality; second - the lib will be installed in the project only…

i’m sure Ivan thought of that and implemented or it is in some request … :slight_smile:

Sure, it is a part of platformio library installation. The feature already exists. :slight_smile:

When you install the libraries using the library manager, they ask whether you want to install the library for global use or project local use. You can choose so there.

1 Like

http://docs.platformio.org/en/latest/librarymanager/ldf.html

@krishna_chaitanya
oh, i see.
well in Core3.4.0a8 all i get is :

  pio lib
Usage: pio lib [OPTIONS] COMMAND [ARGS]...

Options:
  -g, --global                 Manage global PlatformIO library storage
                               `/home/az/.platformio/lib`
  -d, --storage-dir DIRECTORY  Manage custom library storage
  -h, --help                   Show this message and exit.

the lib_dir parameter states that the (default “lib” ) is for private libraries
the “libdep_dirs” is (default to .piolibdeps in the root of the project) where lib manager will put all the required libraries.

i wonder why was the design decision made to separate these two? ( as opposite to put all libs into a single “lib_dir” ).

moved updates to a better suited thread.

Because Project’s lib_dir is intended for private/custom libraries.


PlatformIO Core proposes powerful control on your library dependencies. You decide which libraries are common per project and which aren’t. If you prefer “Arduino style”, you can install all libraries to global storage. PIO will look for libraries here automatically for each your project.

So the keyword here is “custom”.
Well the hidden directory makes the examination of the libraries somewhat inconvenient.