# Installation<no value>

// <!-- Required for asciidoctor -->
:toc:
// Set toclevels to be at least your hugo [markup.tableOfContents.endLevel] config key
:toclevels: 4

== Packages

Updatecli is a standalone binary available at https://github.com/updatecli/updatecli/releases/latest[GitHub] with packages for Windows, Linux and OSX.

== macOS via Homebrew

link:https://brew.sh/[Homebrew] is the easiest way to install `updatecli` on macOS.
See the link:https://brew.sh/[Homebrew documentation] for installation and usage explanations.

First configure the `updatecli` third-party repository (called a link:https://docs.brew.sh/Taps["tap"]) with:

[source,shell]
----
brew tap updatecli/updatecli
----

Then proceed with the actual installation with:

[source,shell]
----
brew install updatecli
----

To check for newer versions, use `brew outdated updatecli`.
To upgrade to the latest version, use `brew upgrade updatecli`.

== Linux

**Opensuse**
[source,shell]
```
# amd64
sudo zypper install https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_amd64.rpm
# arm64
sudo zypper install https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_arm64.rpm
# armv6
sudo zypper install https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_armv6.rpm
```

**Debian/Ubuntu**
[source,shell]
```
# amd64
curl -sL -o/var/cache/apt/archives/updatecli_amd64.deb https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_amd64.deb
# arm64
curl -sL -o/var/cache/apt/archives/updatecli_amd64.deb https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_arm64.deb
# armv6
curl -sL -o/var/cache/apt/archives/updatecli_amd64.deb https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_armv6.deb
```

**Fedora/Centos/RedHat**
[source,shell]
```
# amd64
dnf install https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_amd64.rpm
# arm64
dnf install https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_arm64.rpm
# armv6
dnf install https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_armv6.rpm
```

**Arch Linux (AUR)**
[source,shell]
```
yay -S updatecli-bin
```

**Tgz**
[source,shell]
```
# amd64
curl -sL -o/tmp/updatecli_amd64.tgz https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_Linux_x86_64.tar.gz

# arm64
curl -sL -o/tmp/updatecli_arm64.tgz https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_Linux_arm64.tar.gz

# armv6
curl -sL -o/tmp/updatecli_arm.tgz https://github.com/updatecli/updatecli/releases/download/v0.119.0/updatecli_Linux_arm.tar.gz

```

== Docker
A docker image is also available at:

* https://github.com/users/updatecli/packages/container/package/updatecli[ghcr.io/updatecli/updatecli]
* https://hub.docker.com/r/updatecli/updatecli[updatecli/updatecli]

Remark: Because of limitations on a DockerHub free account, it's better to use the ghcr.io image.

=== Usage

```
 docker run -i -t -v "$PWD/updateCli.yaml":/updatecli/updateCli.yaml:ro ghcr.io/updatecli/updatecli:latest diff --config /updatecli/updateCli.yaml

 docker run -i -t -v "$PWD/updateCli.yaml":/updatecli/updateCli.yaml:ro ghcr.io/updatecli/updatecli:latest apply --config /updatecli/updateCli.yaml

 docker run -i -t ghcr.io/updatecli/updatecli:latest help
```

== asdf

link:https://asdf-vm.com/[asdf] is a multi-platform tool version manager.
Review the link:https://asdf-vm.com/guide/getting-started.html[Getting Started documentation] for installation and usage explanations.

First add the updatecli asdf plugin:

[source,shell]
----
asdf plugin add updatecli
----

Then, install updatecli latest version with:

[source,shell]
----
asdf install updatecli latest
----

or an specific version with:

[source,shell]
----
asdf install updatecli $version
----

You can list all available versions with:

[source,shell]
----
asdf list-all updatecli
----

Once `updatecli` is installed, do not forget to set the version you want to use with:

[source,shell]
----
asdf global updatecli latest
----

or

[source,shell]
----
asdf global updatecli $version
----
