2023-08-14 17:47:06 +01:00
import { Callout } from 'nextra/components'
2023-07-28 17:59:09 +01:00
2023-07-22 13:25:44 +01:00
# Installation
The preferred way of installing Lune is using [Aftman](https://github.com/lpghatguy/aftman).
2023-07-23 14:51:11 +01:00
Install Aftman, and run this command in your terminal to add `lune` to an `aftman.toml` file in the
current directory, or create one if it does not exist:
2023-07-22 13:25:44 +01:00
2023-07-23 14:51:11 +01:00
```sh copy filename="Bash"
2024-01-14 18:11:55 +00:00
aftman add lune-org/lune
2023-07-22 13:25:44 +01:00
```
2023-07-23 14:51:11 +01:00
## Other Installation Options
<details>
<summary>Using GitHub Releases</summary>
You can download pre-built binaries for most systems directly from the
2024-01-14 18:11:55 +00:00
[GitHub Releases](https://github.com/lune-org/lune/releases) page. <br /> There are many tools
2023-07-23 14:51:11 +01:00
that can install binaries directly from releases, and it is up to you to choose what tool to use
when installing here.
</details>
<details>
<summary>Community-maintained</summary>
2023-08-02 21:58:35 +01:00
### Scoop
2023-08-14 17:54:13 +01:00
Windows users can use [Scoop](https://scoop.sh) to install Lune.
2023-08-02 21:58:35 +01:00
```ps copy filename="PowerShell"
# Add the bucket
scoop bucket add lune https://github.com/CompeyDev/lune-packaging.git
# Install the package
scoop install lune
```
2023-08-07 21:34:53 +01:00
### Homebrew
2023-08-14 17:54:13 +01:00
macOS and Linux users can use [Homebrew](https://brew.sh) to install Lune.
2023-08-07 21:34:53 +01:00
```sh copy filename="Bash"
2023-08-14 17:34:18 +01:00
# Installs latest stable precompiled binary
2023-08-07 21:34:53 +01:00
brew install lune
```
***or***
```sh copy filename="Bash"
2023-08-14 17:34:18 +01:00
# Builds from latest stable source
2023-08-07 21:34:53 +01:00
brew install lune --build-from-source
```
2023-08-14 17:34:18 +01:00
### APT
2023-08-14 17:54:13 +01:00
APT is a package manager for Debian-based Linux distributions that uses `dpkg` to install packages. <br/>
Follow the instructions at the unofficial [lune-packaging](https://github.com/CompeyDev/lune-packaging#apt) repository to install Lune using APT.
2023-08-14 17:34:18 +01:00
<Callout type="warning" emoji="⚠️">
2023-08-14 17:54:13 +01:00
The APT repository is hosted by the community and is not endorsed by or affiliated with Lune.
2023-08-14 17:34:18 +01:00
</Callout>
### AppImage
2023-08-14 17:54:13 +01:00
AppImages are platform independent sandboxed binaries that work out of the box. <br/>
Go to the [GitHub Actions Page](https://github.com/CompeyDev/lune-packaging/actions/workflows/appimage.yaml), and download the artifact suitable for your architecture from the build artifacts.
### AUR (Arch User Repository)
There are a number of packages available on the AUR:
- `lune` - Builds from the latest stable release source.
- `lune-git` - Builds from the latest commit in the repo; unstable.
- `lune-bin` - Installs a precompiled binary from GitHub Release artifacts.
These can be installed with your preferred AUR package manager as such:
```sh copy filename="Bash"
paru -S [PACKAGE_NAME]
```
***or***
```sh copy filename="Bash"
yay -S [PACKAGE_NAME]
```
<Callout type="warning" emoji="⚠️">
Only one of these AUR packages must be installed at a time in order to prevent conflicts.
</Callout>
2024-07-02 12:22:28 +01:00
### Nix
macOS* and Linux users can use [Nix](https://nixos.org/) to install Lune.
<Callout type="warning" emoji="⚠️">
*the macOS build is currently broken. Help is wanted debugging [it](https://github.com/NixOS/nixpkgs/blob/36f9963ac7ea0a471c1d408e90edec093a819d83/pkgs/development/interpreters/lune/default.nix).
</Callout>
<details>
<summary>Imperatively</summary>
<br />
**NixOS**
```sh copy filename="Bash"
nix-env -iA nixos.lune
```
**Non NixOS**
```sh copy filename="Bash"
nix-env -iA nixpkgs.lune
# If you are using flakes
nix profile install nixpkgs#lune
```
</details>
<details>
<summary>Declaratively</summary>
<br />
**With [home-manager](https://github.com/nix-community/home-manager)**
```nix copy filename="nix"
home.packages = with pkgs; [
lune
];
```
**system-wide NixOS configuration**
```nix copy filename="nix"
enviroment.systemPackages = with pkgs; [
lune
];
```
</details>
<details>
<summary>Temporarily</summary>
<br />
You can temporarily use Lune in your shell. You can use this to try out Lune before deciding to permanently install it.
```sh copy filename="Bash"
nix-shell -p lune
```
</details>
2023-07-23 14:51:11 +01:00
</details>
2023-07-22 13:25:44 +01:00
2023-07-23 14:51:11 +01:00
<details>
2024-02-11 11:05:26 +00:00
<summary>crates.io</summary>
2023-07-22 13:25:44 +01:00
2024-02-11 11:05:26 +00:00
### Building from source
2023-07-22 13:25:44 +01:00
Building and installing from source requires the latest version of
[Rust & Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) to be installed on
your system. <br /> Once installed, run the following command in your terminal:
2023-07-23 14:51:11 +01:00
```sh copy filename="Bash"
2023-07-22 13:25:44 +01:00
cargo install lune --locked
```
2024-02-11 11:05:26 +00:00
### Binstall
[`cargo binstall`](https://github.com/cargo-bins/cargo-binstall) provides a simple mechanism for installing rust binaries from crates.io, without
compiling from source unlike `cargo install`. Lune is packaged in a `binstall` compatible way.
With `binstall` installed and in your path, run:
```sh copy filename="Bash"
cargo binstall lune
```
2023-07-23 14:51:11 +01:00
</details>
2023-07-22 13:25:44 +01:00
2023-07-23 14:51:11 +01:00
## Next Steps
2023-07-22 13:25:44 +01:00
Congratulations! You've installed Lune and are now ready to write your first script.
- If you want to write standalone scripts, head over to the
2023-07-23 14:45:28 +01:00
[Introduction](./2-introduction/1-hello-lune.md) section.
2023-07-22 13:25:44 +01:00
- If you want to write Lune scripts specifically for Roblox, check out the
[Roblox](../roblox/1-introduction.md) section.