Skip to content

One click install for Scala #1130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions _posts/2020-06-29-one-click-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
layout: blog-detail
post-type: blog
by: Sébastien Doeraene
title: "One-click install for Scala"
---

Installing Scala has always been a task more challenging than necessary, with the potential to drive away beginners.
Should I install Scala itself? sbt? Some other build tools? What about a better REPL like Ammonite? Oh and before all that I need to install Java?

To solve this problem, the Scala Center contracted Alexandre Archambault in January 2020 to add a one-click install of Scala through [coursier](https://get-coursier.io/docs/cli-overview).
For example, on Linux, all we now need is:

```bash
$ curl -Lo cs https://git.io/coursier-cli-linux && chmod +x cs && ./cs setup
```

which will install all the following software, if not yet installed:

* a JDK
* the build tools [sbt](https://www.scala-sbt.org/) and [mill](https://www.lihaoyi.com/mill/)
* the [Ammonite](https://ammonite.io/) enhanced REPL
* [scalafmt](https://scalameta.org/scalafmt/), the Scala formatter
* the [coursier](https://get-coursier.io/docs/cli-overview) CLI, to install further Scala-based applications
* the `scala` and `scalac` command-line tools

With all those installed, we are ready to go!
Later, `cs update` can be used to update the installation.

For power users, [the `cs setup` command](https://get-coursier.io/docs/cli-setup) offers more configuration options, such as a non-interactive mode.

With this new simple, all-encompassing installer, we at the Scala Center hope to significantly reduce the burden of getting started with Scala.