Skip to content

Instantly share code, notes, and snippets.

@Bilal2453
Last active August 22, 2023 16:13
Show Gist options
  • Save Bilal2453/1783fb0f979eead8ed3a079c1f9c64d4 to your computer and use it in GitHub Desktop.
Save Bilal2453/1783fb0f979eead8ed3a079c1f9c64d4 to your computer and use it in GitHub Desktop.
Installing Luvit on Linux/MacOS

Note

This guide assumes you are on a UNIX-like system, such as Linux or macOS. For Windows instructions, please follow this for downloading and this for PATH installation.

TL;DR

Read the guide first, if you have already read it and want quick step by step follow this.

Execute the following in the shell:

  1. curl -fL https://github.com/truemedian/luvit-bin/raw/main/install.sh | sh
  2. sudo chown root:root luvit luvi lit
  3. sudo chmod +x luvit luvi lit
  4. sudo mv luvit luvi lit /usr/local/bin
  5. luvit -v (validation step)

Downloading

There are two main sources of downloading Luvit:

  1. Latest release builds.
  2. Weekly builds.

The release builds are builds of the latest release but that is often behind the master branch (by quite a bit), and has less supported architectures (no ARM builds). This is also the one on the Luvit.io website.

The weekly builds (made by a Luvit organization member) are the most up to date, and supports more architectures1.

To download Luvit, execute the command of the preferred build in shell.

  • Release Build:
curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh
  • Weekly Build:
curl -fL https://github.com/truemedian/luvit-bin/raw/main/install.sh | sh

After either one of those commands, you should see three binaries: luvit, lit, luvi. (Use ls to get a list of the current directory contents from shell)

Note

If you don't see those binaries, make sure you are viewing the directory in which the command was executed. Or see if the downloading command returned an error message.

Manually downloading the pre-built binaries

You can visit this page for a list of weekly pre-built binaries if you prefer a GUI approach.

Note

Make sure to uncompress the downloaded file!

Installation

This step is often recommended for multiple reasons:

  • you no more have to cd into the directory containing luvit.
  • you can simply execute Luvit with luvit in the shell instead of ./luvit (same with lit and luvi).
  • easier to execute from a service.
  • available globally on the system (any user can use it)2.

The following steps should get you ready, note you need root access for this.

  1. sudo chown root:root luvit luvi lit ; Changes the ownership of the downloaded binaries into root.
  2. sudo chmod +x luvit luvi lit ; Allows the binaries to be executed (just in case).
  3. sudo mv luvit luvi lit /usr/local/bin ; Moves the binaries into /usr/local/bin.
  4. luvit -v ; Should print the Luvit version indicating a successful installation.

If step 4 is printing the version, you are now in the good! You can execute luvit, lit, luvi from anywhere on the system, simply with luvit.

Footnotes

  1. see https://github.com/truemedian/luvit-bin#supported-systems for supported architectures.

  2. User-only installs are possible, but they are out of the scope of this guide. This guide is mainly to get you ready to do systemd services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment