Team collaboration on Hex packages

Kevin Disneur
1 min readJun 17, 2016

--

Hex.pm give us the ability to publish packages available for all the elixir community.

We can release our code, new versions, but also documentation. That’s a really great tool, easy to use: we can sign up using the command line, execute an hex.publish command and we’re done. Our package is live, and ready to be downloaded by anyone.

That works well but what happen if we want another person to collaborate with us on a project? Is it possible to give multiple developers the right to publish on the same package? Should we share a common email address?

The question has been asked by @tgautier on Elixir’s slack and he got a response from the creator of Hex: @ericmj. The response seemed obvious but because some other people were wondering if possible, I guess that’s probably a good idea to explain it here.

Hex already has this functionality built-in through the owners tasks.

Add an owner

mix hex.owner add name@domain.com my-package-name

That’s it, it will add the person in the list of owners, allowing the new developer to publish new versions.

Remove an owner

Obviously, we can also remove a owner, if someone left the team for example, by executing:

mix hex.owner remove name@domain.com my-package-name

Find all owners

And finally we can list all the package owners by invoking:

mix hex.owner list my-package-name

All these commands are present in the Hex.pm tasks documentation.

Originally published at kevin.disneur.me on June 17, 2016.

--

--