# Install


LINE CLI is a single executable for macOS, Linux, and Windows, on amd64 and
arm64. The installers below pick the right build for you.

## macOS and Linux

```sh
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/kongesque/line-cli/main/scripts/install-release.sh | sh
```

The installer picks the right release, verifies its checksum, puts `line` in
`~/.local/bin`, and adds it to `PATH` for common shells. Reopen your terminal if
it asks you to, or run `export PATH="$HOME/.local/bin:$PATH"` to use `line` in
the current shell.

On macOS you can use Homebrew instead:

```sh
brew install kongesque/tap/line-cli
```

## Windows

Run this in PowerShell:

```powershell
irm https://raw.githubusercontent.com/kongesque/line-cli/main/scripts/install-release.ps1 | iex
```

It installs `line.exe` in `%LOCALAPPDATA%\line-cli\bin` and adds that folder to
your user `PATH`. Reopen PowerShell if needed.

If Windows reports "An Application Control policy has blocked this file", Smart
App Control is rejecting the unsigned `line.exe`. Turn it off (this is permanent
for that Windows install) or [build from source](https://kongesque.github.io/line-cli/reference/build/).

## Check the install

```sh
line version
line help
```

Release binaries are not signed or notarized yet. You can inspect them on
[GitHub Releases](https://github.com/kongesque/line-cli/releases/latest).

## Linux desktop keyring

On a Linux desktop, the CLI keeps its storage key in the desktop keyring. On
Debian or Ubuntu, install:

```sh
sudo apt install libsecret-tools gnome-keyring
```

The keyring must be running and unlocked in the same D-Bus session as `line`.
Servers and SSH hosts without one use `line login --headless`; see
[Linux servers](https://kongesque.github.io/line-cli/guides/linux-servers/).

## Install to another folder

Both installers read `LINE_CLI_INSTALL_DIR`:

```sh
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/kongesque/line-cli/main/scripts/install-release.sh | LINE_CLI_INSTALL_DIR="$HOME/bin" sh
```

```powershell
$env:LINE_CLI_INSTALL_DIR = "$HOME\Tools\line"
irm https://raw.githubusercontent.com/kongesque/line-cli/main/scripts/install-release.ps1 | iex
```

With a custom folder, the macOS and Linux installer leaves your shell profile
alone. If the folder isn't on `PATH` yet, it prints the `export PATH` line to
add yourself. The Windows installer adds the folder to your user `PATH` as
usual. `line update` keeps using the folder you chose.

## Download a release yourself

Each [release](https://github.com/kongesque/line-cli/releases/latest) has one
archive per system, named `line-OS-ARCH.tar.gz` (OS is `darwin`, `linux`, or
`windows`; ARCH is `amd64` or `arm64`), and a `SHA256SUMS.txt` file. On Linux,
for example:

```sh
curl -fLO https://github.com/kongesque/line-cli/releases/latest/download/line-linux-amd64.tar.gz
curl -fLO https://github.com/kongesque/line-cli/releases/latest/download/SHA256SUMS.txt
grep ' line-linux-amd64.tar.gz$' SHA256SUMS.txt | sha256sum -c   # macOS: shasum -a 256 -c
tar -xzf line-linux-amd64.tar.gz
```

Move `line` into a folder on your `PATH`. On Windows, compare
`Get-FileHash line-windows-amd64.tar.gz` with the matching line in
`SHA256SUMS.txt`, then extract `line.exe` with `tar -xzf`. If macOS blocks a
copy downloaded in a browser, download it with `curl` as above, or use the
installer or Homebrew.

A copy installed this way has no `.line-cli-install` receipt, so `line update`
shows the release page instead of replacing it. Run the installer to switch to
self-update.

## Uninstall

Sign out first, while `line` is still installed. This revokes this device's
session and deletes your saved credentials:

```sh
line logout
```

Then remove the executable the way you installed it:

| Installed with | Remove it with |
| --- | --- |
| Homebrew | `brew uninstall line-cli` |
| Installer on macOS or Linux | `rm ~/.local/bin/line ~/.local/bin/.line-cli-install` |
| Installer on Windows | `Remove-Item -Recurse "$env:LOCALAPPDATA\line-cli"` |

On Windows, also remove `%LOCALAPPDATA%\line-cli\bin` from your user `PATH`
(search for "Edit environment variables for your account"). On macOS and Linux,
the installer may have added an `export PATH` line under
`# Added by the LINE CLI installer` in your shell profile; delete both lines if
nothing else uses `~/.local/bin`.

Logout keeps a small `line-cli` folder with lock files: `~/.config/line-cli` on
Linux and `~/Library/Caches/line-cli` on macOS. Delete it once you no longer use
LINE CLI.


---
Source: https://kongesque.github.io/line-cli/start/install/
