Package: qgis-plugin-manager
QGIS-Plugin-ManagerMainly designed for QGIS Server plugins, but it works also for desktop.Not tested on Windows.TheCLIAPI is not stable yet.InstallationPython 3.7minimum, you can make a Python venv if needed.python3--versionpip3installqgis-plugin-manager
python3-mpipinstallqgis-plugin-managerEnvironment variablesQGIS-Plugin-Manager will take care of following variables :QGIS_PLUGIN_MANAGER_SOURCES_FILEfor storing a path to thesources.listotherwise, the current folder will be used.QGIS_PLUGIN_MANAGER_CACHE_DIRfor storing all XML files downloaded otherwise, the current folder will be used.cache_qgis_plugin_managerQGIS_PLUGIN_MANAGER_SKIP_SOURCES_FILE, boolean when we do not need asources.listfile, for instance to list plugins onlyQGIS_PLUGIN_MANAGER_RESTART_FILE, path where the file must be created if QGIS server needs to be restarted.
Readthe documentation.QGIS_PLUGINPATHfor storing plugins, fromQGIS Server documentationPYTHONPATHfor importing QGIS librariesUtilisationEitheryou need to go in the directory where you are storing plugins,oryou can use the environment variableQGIS_PLUGINPATH.
You can read thedocumentationon QGIS Server about this variable.cd/path/where/you/have/plugins# usually on a servercd/usr/lib/qgis/plugins# on unix desktop with the default QGIS profilecd/home/${USER}/.local/share/QGIS/QGIS3/profiles/default/python/plugins# orexportQGIS_PLUGINPATH=/path/where/you/have/plugins$qgis-plugin-manager--help
usage:qgis-plugin-manager[-h][-v]{init,list,remote,remove,update,upgrade,cache,search,install}...

options:-h,--helpshowthishelpmessageandexit-v,--versionshowprogram'sversionnumberandexitcommands:qgis-plugin-managercommand{init,list,remote,remove,update,upgrade,cache,search,install}initCreatethe`sources.list`withplugins.qgis.orgasremotelistListallpluginsinthedirectoryremoteListallremoteserverremoveRemoveapluginbyitsnameupdateUpdateallindexfilesupgradeUpgradeallpluginsinstalledcacheLookforaplugininthecachesearchSearchforpluginsinstallInstallapluginInitTo create the firstsources.listin the directory with at least the default repositoryhttps://plugins.qgis.org:$qgis-plugin-managerinit
$catsources.listhttps://plugins.qgis.org/plugins/plugins.xml?qgis=3.19You can have one or many servers, one on each line.ListList all plugins installed :$qgis-plugin-managerlist
QGISserverversion3.19.0
Listallpluginsin/home/etienne/dev/qgis/server_plugin

------------------------------------------------------------------------------------------------------------------------------------|Name|Version|Flags|QGISmin|QGISmax|Author|Folderowner|Action⚠|------------------------------------------------------------------------------------------------------------------------------------|Lizmap|master||3.4|3.99|3Liz|root:0o755|Unkownversion||wfsOutputExtension|1.5.3|Server|3.0||3Liz|etienne:0o755|||QuickOSM|1.14.0|Processing|3.4|3.99|EtienneTrimaille|etienne:0o755|Upgradeto1.16.0||cadastre|1.6.2|Server,Processing|3.0|3.99|3liz|www-data:0o755|||atlasprint|3.2.2|Server|3.10||3Liz|www-data:0o755||------------------------------------------------------------------------------------------------------------------Install needed plugins only, mainly on QGIS serverImportant note, installonlyplugins you needyou. On QGISdesktop, plugins can slow down your computer.
On QGISserver, plugins are likehooksinto QGIS server, they can alter input or output of QGIS server.
They can produceunexpectedresult if you don't know how the plugin works. Please refer to their respective documentation
or the application that needs QGIS server plugins (for instance,plugins for Lizmap Web Client)Remote$qgis-plugin-managerremote
Listofremotes:

https://plugins.qgis.org/plugins/plugins.xml?qgis=3.22

$catsources.listhttps://plugins.qgis.org/plugins/plugins.xml?qgis=[VERSION][VERSION]is a token in thesources.listfile to be replaced by the QGIS version, for instance3.22.
If QGIS is upgraded, the XML file will be updated as well.You don't have to set the TOKEN for all URL :https://docs.3liz.org/plugins.xmlis valid.Basic authenticationIt's possible to add a login and password in the remote URL, withusernameandpasswordin the query string :https://docs.3liz.org/private/repo.xml?username=login&password=passEvery URL is parsed, and if some credentials are found, the URL is cleaned and the request is done using the
basic authentication.UpdateTo fetch the XML files from each repository :$qgis-plugin-managerupdate
Downloadinghttps://plugins.qgis.org/plugins/plugins.xml?qgis=3.19...Ok
$ls.cache_qgis_plugin_manager/
https-plugins-qgis-org-plugins-plugins-xml-qgis-3-19.xmlCacheCheck if a plugin is available :$qgis-plugin-managercacheatlasprint
Pluginatlasprint:v3.2.2availableSearchLook for plugins according to tags and title :$qgis-plugin-managersearchdataviz
DataPlotly
QSoccerInstallPlugins are case-sensitive and might have spaces in its name :$qgis-plugin-managerinstalldataplotly
Plugindataplotlylatestnotfound.
Doyoumeanmaybe'Data Plotly'?
$qgis-plugin-managerinstall'Data Plotly'Install the latest version :$qgis-plugin-managerinstallQuickOSM
InstallationQuickOSMlatestOkQuickOSM.1.16.0.zipor a specific version :$qgis-plugin-managerinstallQuickOSM==1.14.0
InstallationQuickOSM1.14.0OkQuickOSM.1.14.0.zipYou can use--forceor-fto force the installation even if the plugin with the same version is already installed.Enable a pluginOn QGISserver, there isn't any setting to enable/disable a plugin.However, ondesktop, you still need to enable a plugin, the equivalent of the checkbox in the QGIS graphical plugin
manager.For instance, with the default profile, usually located in :/home/${USER}/.local/share/QGIS/QGIS3/profiles/default/QGIS/you need to edit theQGIS.inifile with :[PythonPlugins]nameOfThePlugin=trueUpgradeUpgrade all plugins installed :$qgis-plugin-managerupgradeYou can use--forceor-fto force the upgrade for all plugins despite their version.Note, like APT,updateis needed before to refresh the cache.Ignore plugins from the upgradeSome plugins might be installed by hand, without being installed with a remote. This command will try to upgradeall validplugins found in the directory. However, the command will fail because the plugin has been installed
without a remote.It's possible to ignore such plugin by adding a fileignorePlugins.list, in your plugins' folder,
with a list ofplugin nameon each line. Theupgradewill not try to upgrade them.RemoveIt's possible to userm -rf folder_dirbut you can also remove by the plugin name.
It will take care of theQGIS_PLUGINPATHenvironment variable.$qgis-plugin-managerremoveQuickosm
Pluginname'Quickosm'notfound
Doyoumeanmaybe'QuickOSM'?
$qgis-plugin-managerremoveQuickOSM
PluginQuickOSMremoved
Tip:DonotforgettorestartQGISServertoreloadplugins😎Notify upstream if a restart is neededWhen a plugin is installed or removed and if the environment variableQGIS_PLUGIN_MANAGER_RESTART_FILEis set,
an empty file will be created or touched. It can notify you if QGIS Server needs to be restarted for instance.Note that you must manually remove this file.Run testsexportPYTHONPATH=/home/etienne/dev/app/qgis-master/share/qgis/python/:/usr/lib/python3/dist-packages/cdtestpython3-munittest
flake8