# How to quickly install elm packages?

**URL:** <https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194>\
**Category:** Learn\
**Created:** [April 30, 2018, 9:03am UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194 "2018-04-30T09:03:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Hrcek](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/jan_hrcek/32/451_2.png) [@Jan\_Hrcek](https://discourse.elm-lang.org/u/Jan_Hrcek)\
**Post date:** [April 30, 2018, 9:03am UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/1 "2018-04-30T09:03:18Z")

</div>

When setting up new projects I often find myself in situation I want to install bunch of initial packages from [package.elm-lang.org](http://package.elm-lang.org) I know I’ll need. I search for the package, click the name and copy the “username/packagename” portion of the URL, type "elm package install --yes " in terminal and press Ctrl+V.

What’s your way of doing that? Granted, you don’t need to install packages very often, and it’s just a few keystrokes, but it still annoys me a bit every time I have to do this 😀

It would find it useful if there was a button next to each package name, which when clicked would copy the command to install this package (“elm package install username/packagename”) to your OS clipboard. What do you think?

---

<div class="post-metadata">

**Author:** ![runarfu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/runarfu/32/902_2.png) [@runarfu](https://discourse.elm-lang.org/u/runarfu)\
**Post date:** [April 30, 2018, 9:36am UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/2 "2018-04-30T09:36:55Z")

</div>

Sounds like a good idea for a Chrome plugin! Meanwhile, there’s at least [https://github.com/eeue56/elm-bash-completion](https://github.com/eeue56/elm-bash-completion)

---

<div class="post-metadata">

**Author:** ![Chadtech](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/chadtech/32/609_2.png) [@Chadtech](https://discourse.elm-lang.org/u/Chadtech)\
**Post date:** [April 30, 2018, 12:22pm UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/3 "2018-04-30T12:22:15Z")

</div>

Sounds like a good feature for package.elm-lang to have, but personally I have just memorized the `author/name`s for all the packages I usually use.

---

<div class="post-metadata">

**Author:** ![bruchmann](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/bruchmann/32/3683_2.png) [@bruchmann](https://discourse.elm-lang.org/u/bruchmann)\
**Post date:** [April 30, 2018, 2:16pm UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/4 "2018-04-30T14:16:08Z")

</div>

Sounds like a job for a boilerplate repository to me.

---

<div class="post-metadata">

**Author:** ![joefiorini](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/joefiorini/32/665_2.png) [@joefiorini](https://discourse.elm-lang.org/u/joefiorini)\
**Post date:** [May 1, 2018, 4:35pm UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/5 "2018-05-01T16:35:52Z")

</div>

The Elm plugin for VSCode allows you to install packages from the command pallet. Bring it up (with Cmd+Shift+P on Mac) and search for and choose “Elm: Install packages/dependencies”. Then it will present you with the package index and you can search/install right from there. Maybe something similar is available in other editor plugins?

---

<div class="post-metadata">

**Author:** ![evancz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/evancz/32/16_2.png) [@evancz](https://discourse.elm-lang.org/u/evancz)\
**Post date:** [May 1, 2018, 4:38pm UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/6 "2018-05-01T16:38:32Z")

</div>

You could have an `elm-package.json` that you put in new projects. Copy it in, and `elm-make` will verify it and install everything in there. I feel like something fancier is overkill. Now you have to learn a fancy thing with tons of settings.

There are issues on the package website about making it easier to copy out the install command. Seems like a fine idea. Trying to get website stuff in the hands of another core team member, but we’ll add something like this eventually!

---

<div class="post-metadata">

**Author:** ![pdamoc](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pdamoc/32/36_2.png) [@pdamoc](https://discourse.elm-lang.org/u/pdamoc)\
**Post date:** [May 2, 2018, 4:41am UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/7 "2018-05-02T04:41:58Z")

</div>

> [@Jan\_Hrcek](#):
>
> It would find it useful if there was a button next to each package name, which when clicked would copy the command to install this package (“elm package install username/packagename”) to your OS clipboard. What do you think?

It is a nice feature to have in the web packages site (most packages web sites have some kind of copy-to-clipboard thing).

For starting projects however I usually just `elm-package install --yes` for simple ones. If I know it will be an SPA, I usually do what @evancz suggested above, just copy the `elm-package.json` from some other project, usually from `elm-spa-example` as that project has most libraries I will use for the beginning of the project.

You could also take a look at [elm-new](https://github.com/simonewebdesign/elm-new). Maybe it fits your new project needs.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [May 12, 2018, 4:42am UTC](https://discourse.elm-lang.org/t/how-to-quickly-install-elm-packages/1194/8 "2018-05-12T04:42:04Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
