Install, check, update and uninstall the ysra CLI on macOS, Linux or Windows.

On this page

The Ysra CLI is a single program, ysra, installed for your user only; nothing runs as root. Install it to work with Ysra in a terminal on your computer, or on a server or edge device. This page covers the installers, the manual download, updating and uninstalling; to start working, see the CLI quickstart.

Current version: CLI 1.20.0. Check yours with ysra --version.

One program, two ways to sign in#

Where Sign in Then
Your computer (macOS, Linux, Windows) ysra login ysra in a folder
A server or edge device ysra login --device ysra serve --folder <path>, or ysra in a folder there. See Install on a server or edge device

Install on macOS or Linux#

curl -fsSL https://ysra.ai/install.sh | sh
The installer Detail
Picks the build Apple silicon or Intel Mac, Linux x64 or arm64
Downloads it Over HTTPS
Checks it Against the release’s published SHA-256 checksum; stops if they differ
Installs it In ~/.local/bin, and says if that folder isn’t on your PATH yet

The installer finishing in a terminal

The installer checks the download before installing it

Then sign in with ysra login.

Options#

Pass options after -s --:

curl -fsSL https://ysra.ai/install.sh | sh -s -- --version 1.20.0
Option What it does
--version X Install version X instead of the latest
--dir D Install into folder D instead of ~/.local/bin (or set YSRA_INSTALL_DIR)
--device For a server or edge device: also lists what the device needs and how to sign it in. See Install on a server or edge device
--allow-root Install even when run as root. Not recommended: Ysra is meant to run as you
--uninstall Remove Ysra instead; with --purge or --keep-data as for ysra uninstall

Install on Windows#

In PowerShell:

irm https://ysra.ai/install.ps1 | iex

No administrator rights are needed. The download is checked against its published checksum, installed into %LOCALAPPDATA%\Ysra\bin, and added to PATH. Open a new terminal, then run ysra login. Commands ask before each one unless WSL is used; see Ysra CLI on Windows.

Manual download#

To avoid piping a script into the shell, download the file and check it. Releases are at https://downloads.ysra.ai/cli/<version>/; cli/latest/VERSION names the newest.

Computer File
Mac, Apple silicon ysra-macos-arm64
Mac, Intel ysra-macos-x64
Linux, x64 ysra-linux-x64
Linux, arm64 (Jetson, Raspberry Pi) ysra-linux-arm64
Windows, 64-bit ysra-windows-x64.exe
# 1. Download the build for your computer and the checksum list
curl -fsSLO https://downloads.ysra.ai/cli/1.20.0/ysra-macos-arm64
curl -fsSLO https://downloads.ysra.ai/cli/1.20.0/SHA256SUMS

# 2. Check it. This must print "ysra-macos-arm64: OK"
shasum -a 256 --ignore-missing -c SHA256SUMS     # Linux: sha256sum --ignore-missing -c SHA256SUMS

# 3. Install it
mkdir -p ~/.local/bin
install -m 755 ysra-macos-arm64 ~/.local/bin/ysra

If the check doesn’t print OK, don’t run the file; download it again.

On Windows, download ysra-windows-x64.exe and SHA256SUMS, then compare the hash with the line for ysra-windows-x64.exe:

(Get-FileHash .\ysra-windows-x64.exe -Algorithm SHA256).Hash.ToLower()

If they match, rename the file to ysra.exe and put it in a folder on PATH.

A second install

A second install with its own YSRA_HOME has its own sign-in, device identity and saved state, separate from the first.

Check the version#

ysra --version
ysra 1.20.0 (build …)

ysra doctor checks the rest of the computer, including whether a newer version is out. See ysra doctor.

Update#

ysra update
Rule Value
Check The new build is checked against the published checksum, then swapped in one step. If the check fails, the current copy stays
Automatic updates None. When a newer version is out, one dim line shows as ysra opens: Ysra 1.7.4 is available — run ysra update
How often it looks At most once a day; silent when offline
Turn the check off YSRA_NO_UPDATE_CHECK=1

Uninstall#

ysra uninstall

If ysra isn’t on PATH:

curl -fsSL https://ysra.ai/install.sh | sh -s -- --uninstall

It removes:

  • the ysra program;
  • the stored sign-ins on this computer;
  • the background service, if one was installed;
  • on a device, the device from your account. If the account can’t be reached, Ysra says to remove it under Settings → Devices.

Then it asks about ~/.ysra: Also delete Ysra’s local data (~/.ysra: snapshots for undo, logs, installed tools, your machine list)? [y/N]. The default is to keep it.

Option What it does
--purge Delete ~/.ysra without asking
--keep-data Keep ~/.ysra without asking

Keep a copy of ~/.ysra/targets.json to get your machines back later. Ysra never touches your project folders or ~/.ssh.

If it doesn’t work#

Symptom What to do
ysra: command not found Add ~/.local/bin to PATH (the installer said so), or open a new terminal on Windows
The installer stops on a checksum mismatch Run it again; if it repeats, check any proxy that rewrites downloads
The installer refuses to run as root Run it as your user, or pass --allow-root for a container
Linux says the program can’t start The build needs glibc 2.25 or newer; Alpine (musl) isn’t covered
YsraDocs