# Install the CLI

> Install the Telesphorepo CLI from your server on Linux, macOS or Windows, and keep it up to date.

Source: https://docs.telesphorepo.com/install-cli/

Install the CLI once on each computer that publishes. Every publish runs through it.

Install it from the server you publish to. Put your server’s address in place of `https://repo.example.com`.

The web UI has the same lines with your address filled in. Open the account menu, then click **Install the CLI**.

## macOS or Linux

1. Run this in a terminal.

   ```sh
   curl -fsSL https://repo.example.com/install.sh | sh
   ```

2. If the script asks to add `~/.local/bin` to your `PATH`, press Enter.

   ```text
   Add ~/.local/bin to your PATH in ~/.zshrc? [Y/n]
   ```

3. Open a new terminal, and check the install.

   ```sh
   telesphorepo version
   ```

## Windows

1. Run this in PowerShell.

   ```powershell
   irm https://repo.example.com/install.ps1 | iex
   ```

2. Check the install in the same window.

   ```powershell
   telesphorepo version
   ```

Done when the CLI prints its version. Next, [publish from a project](/publish-from-a-project/).

## Install in CI

Add the install line as a step before `telesphorepo publish`. Outside GitHub Actions, also put the folder on the `PATH`:

```sh
curl -fsSL https://repo.example.com/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
telesphorepo publish
```

The CI files that the CLI writes hold these lines already. See [Publish from CI](/publish-from-ci/).

## Update the CLI

Run this after your server admin updates the server.

```sh
telesphorepo update
```

When a server needs a newer CLI, the CLI asks `Update now?`. Press Enter. The CLI updates, then runs your command again.

## Download by hand

Open the account menu, then click **Install the CLI**. The page lists the archive for your system, its SHA-256, and the commands to check and install it.

The archives and a `SHA256SUMS` file are also at `https://repo.example.com/cli/`.

## If something goes wrong

`telesphorepo` is not found in a new terminal

Run the install line again, and press Enter when the script asks about the `PATH`.

The script asks only on a terminal. Without one, it prints the line and the file to add it to. Add that line yourself.

On Windows, open a new terminal. The install adds its folder to your user `PATH`.

The script says that the SHA-256 differs

The script installed nothing. Run the line again.

If it fails again, a proxy may cache an old file. Ask your server admin.

The server has no CLI for your system, or no CLI downloads

The server has the CLI for Linux, macOS and Windows, on x86-64 and ARM.

If the page says the server has no CLI downloads, ask your server admin to install a release, or a build made with `go tool task build`.

`telesphorepo update` cannot write the folder

Run the install line again, or fix the rights of the folder that the CLI names.

You lost a laptop

Open **Settings** › **Devices**, and revoke that laptop.
