Proposal: Add `deps.add` mix command

37 views
Skip to first unread message

Edmond Lepedus

unread,
Jan 13, 2025, 8:08:26 AMJan 13
to elixir-lang-core
Hi,

Sorry if this has been asked before, but could we have a command to add a new dependency? 

I've spent the past few month primarily using Livebook, and the S-P shortcut for searching for packages quickly became second-nature. Last week I "graduated" a project out of LIvebook into its own Phoenix project, and literally did a double-take when I remembered that I had to manually find the dependency on hex.pm and then copy the snippet into `mix.exs`.

It might seem like a small thing, but being able to say to someone new to Elixir " just install Timex -- `mix deps.add timex`" would be much easier, especially if they're already familiar with other package managers like `npm i --save` or `bundle add`.

Thanks,
Ed

Zachary Daniel

unread,
Jan 13, 2025, 12:21:56 PMJan 13
to elixir-l...@googlegroups.com, elixir-lang-core
This isn't in core elixir, but the igniter package gives you this and much more :)

`mix igniter.install timex`

If you install the archive, `mix igniter.install` even works in projects where you haven't added igniter to the deps yet :)

On Jan 13, 2025, at 3:08 AM, 'Edmond Lepedus' via elixir-lang-core <elixir-l...@googlegroups.com> wrote:

Hi,
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-lang-core/b4190580-fce3-486a-a5ae-0712b060c71bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages