Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA: install plugins from command line

Tags:

Does IDEA provide a command line executable to edit some settings, install/uninstall plugins, etc without actually starting the IDE and clicking around?

For example, it is possible to install new plugins for Eclipse with:

eclipse -application org.eclipse.equinox.p2.director -noSplash -repository #{repo} -installIUs #{plugins}

Any equivalent for IntelliJ?

like image 664
vptheron Avatar asked Jun 04 '14 18:06

vptheron


2 Answers

This is the workaround I found. To be clear: this is not what I was looking for, just the closest solution I found so far.

It is possible to download plugins for IntelliJ IDEA from the repository here: http://plugins.jetbrains.com/?idea_ce For example, here is the Scala plugin: http://plugins.jetbrains.com/plugin/1347?pr=idea_ce . Each version has a direct link.

Once downloaded, extract the zip file in ~/.IdeaIC13/config/plugins (dependent on the platform and the version of IntelliJ you are running of course).

That's it. With a shaky combination of wget and unzip it is possible to install a plugin via the command line. Clearly not a great solution: for my use case (ie provisioning a workstation via Chef) I need to know in advance the URL to a specific plugin and I need to know the version of IntelliJ (to identify the config folder in the user's home).

like image 100
vptheron Avatar answered Sep 17 '22 09:09

vptheron


Here is a one-liner to download/extract the latest version of a given plugin provided that you have jq, bsdtar, wget and curl in your PATH:

wget -qO-  https://plugins.jetbrains.com/files/$(curl https://plugins.jetbrains.com/api/plugins/4415/updates | jq -r '.[0].file') | bsdtar -xvf- -C ~/.PhpStorm2018.3/config/plugins

Replace the numeric plugin ID and output directory as needed. Restarting the IDE will show downloaded plugin(s) as being installed.

like image 36
Jeff Avatar answered Sep 21 '22 09:09

Jeff