# Install the CLI

The `fuzzy` command uploads, shares and manages files from a terminal. It is a single binary with no dependencies, served by the FuzzyShare server itself.

## Install

```sh {tab="macOS and Linux"}
curl -fsSL https://fuzzyshare.com/install.sh | sh
```

```powershell {tab="Windows"}
irm https://fuzzyshare.com/install.ps1 | iex
```

The script:

1. Detects your system (`linux` or `darwin`, `amd64` or `arm64`; Windows is `amd64`).
2. Downloads the matching binary and `checksums.txt` from `https://fuzzyshare.com/dl/`.
3. Verifies the SHA-256 checksum and refuses to install on a mismatch.
4. Installs into `$FUZZY_INSTALL_DIR`; otherwise `/usr/local/bin` if you can write there; otherwise `~/.local/bin` (and tells you to add it to your `PATH`).
5. Prints the version and the next step.

It never uses `sudo` itself, and it is safe to run again: running it again installs the version the server offers. On Windows the binary goes to `%LOCALAPPDATA%\fuzzyshare\bin`, which is added to your user `PATH`.

Read the script before you run it: open `https://fuzzyshare.com/install.sh` in a browser or run `curl -fsSL https://fuzzyshare.com/install.sh | less`.

### Choose the install directory

```sh
curl -fsSL https://fuzzyshare.com/install.sh | FUZZY_INSTALL_DIR="$HOME/bin" sh
```

### Other ways

Build from source with Go 1.24 or newer:

```sh
go install github.com/mahmoud-emad/fuzzyshare/cmd/fuzzy@latest
```

Or download a file yourself from `https://fuzzyshare.com/dl/`: `fuzzy-linux-amd64`, `fuzzy-linux-arm64`, `fuzzy-darwin-amd64`, `fuzzy-darwin-arm64`, `fuzzy-windows-amd64.exe`. Check it against `https://fuzzyshare.com/dl/checksums.txt` with `sha256sum` or `shasum -a 256`.

## Sign in

```sh
fuzzy login
```

The installer remembers the server it came from, so `fuzzy login` only asks for your access key (hidden), checks it against that server and saves it. New here? Create an account instead:

```sh
fuzzy register --name "Ada Lovelace" --email ada@example.com
```

Installed some other way, or using more than one server? Tell the CLI which one once with `fuzzy server https://fuzzyshare.com`, or pass `--url` to a single command. See [`fuzzy server`](cli-reference.md#server).

Confirm with `fuzzy whoami`. Settings and where they are saved are on [Configuration](cli-config.md).

## Check the version

```sh
fuzzy version
```

It prints the version, the commit and the operating system and architecture.

## Update

```sh
fuzzy update --check     # only report whether a newer version exists
fuzzy update             # download, verify and replace the binary
```

`fuzzy update` asks the server from your saved login (or from `--url`) for the newest build, downloads the one for your system, verifies its checksum, and replaces the running binary in one atomic step. A failed or partial download never touches the installed binary.

## Shell completion

```sh {tab="bash"}
fuzzy completion bash > ~/.local/share/bash-completion/completions/fuzzy
```

```sh {tab="zsh"}
fuzzy completion zsh > "${fpath[1]}/_fuzzy"
```

```sh {tab="fish"}
fuzzy completion fish > ~/.config/fish/completions/fuzzy.fish
```

```powershell {tab="PowerShell"}
fuzzy completion powershell | Out-String | Invoke-Expression
```

## Uninstall

Delete the binary (`command -v fuzzy` shows where it is) and, if you want, the saved login at `~/.config/fuzzyshare/config.json`.

## Troubleshooting

See [Troubleshooting](troubleshooting.md) if `fuzzy` is not found after installing or a checksum fails.
