Installing addons from cmd line

Is it possible to install Kodi addons from an ssh cmd line?

Why not install them from Kodi itself?

I’m just wondering if there is such an alternative to using Kodi…

You can just unpack zip file to /storage.kodi/addons
unzip some_addon.zip -d /storage.kodi/addons
enable addon in Kodi (service.tigervnc in this case)
curl -s -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","params":{"addonid":"service.tigervnc","enabled":true},"id":1}' http://127.0.0.1:8080/jsonrpc
enable service if this is service addon
service-addon-wrapper enable service.tigervnc /storage/.kodi/addons/service.tigervnc
and start service
systemctl start service.tigervnc

2 Likes

@vpeter there is actually a Kodi function you can call to reload the addons with kodi-send instead of using your curl method and it’s much simpler but I forget what it is. :sweat_smile:

1 Like

There’s also an add-on that Lunatixz wrote called Enable-it! you can use in Kodi to enable them after copying. It’s in his beta-repo I believe.
(although that might take away the fun of doing it through ssh ;))