Opinions on a `hex install <package-name>`?

With npm, I can do npm install --save superagent, and it’ll do the equivalent of adding that package with a version number to my package.json and fetching and installing it.

WIth hex, I have to go on Github / Hexdocs, find the latest version (which sometimes package authors forget to update in the readme, but remember to update the rest of the docs), add it to my mix.exs, and run mix deps.get.

Why isn’t there / couldn’t there be a hex install or a mix install that did all of that for me?

It is more like the rails way to do. Add an entry into package file, then install it with a command. If I do remember well, it is because mix.exs is far less structured than a package.json, so it is more difficult to parse it.

BTW

npm install --save

is much longer than

yarn add