# Installation

Retype is a command line tool. Installation is super quick and you can be up and running within seconds.

## New install

>>> Confirm Prerequisites

Retype is installed using either [`npm`](https://www.npmjs.com/get-npm), [`yarn`](https://classic.yarnpkg.com/en/docs/install/), or the [`dotnet`](https://dotnet.microsoft.com/download/dotnet-core) CLI.

You only need one of the three package managers as a prerequisite, although all three could be installed on your computer too. It's up to you.

| Package Manager | Supported Platforms |
| --- | --- |
| [`npm`](https://www.npmjs.com/get-npm) | [!badge text="Mac" variant="light"] [!badge text="Win" variant="primary"] [!badge text="Linux" variant="dark"]
| [`yarn`](https://classic.yarnpkg.com/en/docs/install/) | [!badge text="Mac" variant="light"] [!badge text="Win" variant="primary"] [!badge text="Linux" variant="dark"]
| [`dotnet`](https://dotnet.microsoft.com/download/dotnet-core) | [!badge text="Mac" variant="light"] [!badge text="Win" variant="primary"] [!badge text="Linux" variant="dark"]

>>> Install Retype

Based on the package manager you have installed on your computer, copy and run one of the following commands. 

+++ npm
```
npm install retypeapp --global
```
+++ yarn
```
yarn global add retypeapp
```
+++ dotnet
```
dotnet tool install retypeapp --global
```
+++

>>> Verify and Start Retype

You can verify that [Retype CLI](cli.md) has been installed correctly by running the command `retype --version`.

Checking the `version` is totally optional but is also just a nice confirmation that everything is working as expected. :+1:

```
retype --version
```

To start Retype for your project, run the command `retype start`:

```
retype start
```

>>>

That's it! Your new Retype website should be up and running. :tada:

---

## Update

Update to the latest release of Retype using one of the following commands for the package manager that you initially installed Retype with. For instance, if you used `npm` to install Retype, run the `npm` update command to update Retype locally.

+++ npm
```
npm update retypeapp --global
```
+++ yarn
```
yarn global upgrade retypeapp
```
+++ dotnet
```
dotnet tool update retypeapp --global
```
+++

---

## Uninstall

Done with Retype? It's okay, we understand. :cry:

Uninstalling Retype is just as simple as installing. Use the same package manager to uninstall as you did to install. For instance, if you used `npm` to install Retype, run the `npm` uninstall command to remove.

+++ npm
```
npm uninstall retypeapp --global
```
+++ yarn
```
yarn global remove retypeapp
```
+++ dotnet
```
dotnet tool uninstall retypeapp --global
```
+++

All Retype related files and folders within your project can be deleted, such as the **retype.yml** file and the generated `.retype` folder.

---

## Version and Tag specific

When managing project dependencies, it is sometimes necessary to install a specific version or a tagged release of a software package to ensure compatibility or access to certain features.

[NPM](https://www.npmjs.com/package/retypeapp?activeTab=versions), Yarn, and [dotnet](https://www.nuget.org/packages/retypeapp/) offer their own syntax and methods for specifying which version or tag of a software package to install, enabling precise control over the dependencies of your projects.

When using NPM or Yarn, specifying the `@latest` tag will always install the latest public release. The `@latest` is optional. If no `@version` or `@tag` is provided, Retype will install the `@latest` release by default.

Using the `@next` tag will install an upcoming `-preview` release, if available.

In the following samples, replace `[version-or-tag]` with the actual version number or tag. For instance, to specifically install the version `4.5.2` release of Retype using NPM, run the command `npm install retypeapp@4.5.2 --global`.

+++ npm
```
npm install retypeapp@[version-or-tag] --global
```
+++ yarn
```
yarn global add retypeapp@[version-or-tag]
```
+++ dotnet
```
dotnet tool install retypeapp --global --version [version]
```
+++

---

## Platform specific

The default `retypapp` **NPM** package is a bundle of several platform specific packages. The installer will automatically detect and choose the correct platform package from the bundle during installation.

The bundle provides convenience although at the cost of an increased download size.

The **dotnet** package installer will automatically download the platform specific package.

!!!
If you already have the `dotnet` CLI installed on your machine, installing using `dotnet tool install retypeapp --global` will be the fastest option, but all the package maangers should install within seconds. They all produce the same result and run with exactly the same performance.
!!!

For **NPM** and **Yarn**, it is possible to install smaller platform specific packages without the bundling. Currently, three separate platforms are supported and can be installed independently from the primary `retypeapp` package.

### :icon-package: macOS

+++ npm
```
npm install retypeapp-darwin-x64 --global
```
+++ yarn
```
yarn global add retypeapp-darwin-x64
```
+++ dotnet
```
dotnet tool install retypeapp --global
```
+++

{.compact .clean}
OS                                    | Version                 | Architectures     |
--------------------------------------|-------------------------|-------------------|
[macOS][macOS]                        | 10.15+                  | x64, Arm64        |

[macOS]: https://support.apple.com/macos

### :icon-package: Windows

+++ npm
```
npm install retypeapp-win-x64 --global
# or
npm install retypeapp-win-x86 --global
```
+++ yarn
```
yarn global add retypeapp-win-x64
# or
yarn global add retypeapp-win-x86
```
+++ dotnet
```
dotnet tool install retypeapp --global
```
+++

{.compact .clean}
OS                                    | Version                 | Architectures     |
--------------------------------------|-------------------------|-------------------|
[Windows 10 Client][Windows-client]   | Version 1607+           | x64, x86, Arm64   |
[Windows 11][Windows-client]          | Version 22000+          | x64, x86, Arm64   |
[Windows Server][Windows-Server]      | 2012+                   | x64, x86          |
[Windows Server Core][Windows-Server] | 2012+                   | x64, x86          |
[Nano Server][Nano-Server]            | Version 1809+           | x64               |

[Windows-client]: https://www.microsoft.com/windows/
[Windows-lifecycle]: https://support.microsoft.com/help/13853/windows-lifecycle-fact-sheet
[win-client-docker]: https://hub.docker.com/_/microsoft-windows
[Windows-Server-lifecycle]: https://learn.microsoft.com/windows-server/get-started/windows-server-release-info
[Nano-Server]: https://learn.microsoft.com/windows-server/get-started/getting-started-with-nano-server
[Windows-Server]: https://learn.microsoft.com/windows-server/

### :icon-package: Linux

+++ npm
```
npm install retypeapp-linux-x64 --global
```
+++ yarn
```
yarn global add retypeapp-darwin-x64
```
+++ dotnet
```
dotnet tool install retypeapp --global
```
+++

{.compact .clean}
OS                                    | Version               | Architectures     |
--------------------------------------|-----------------------|-------------------|
[Alpine Linux][Alpine]                | 3.15+                 | x64, Arm64, Arm32 |
[CentOS Linux][CentOS]                | 7                     | x64               |
[CentOS Stream Linux][CentOS]         | 8                     | x64               |
[Debian][Debian]                      | 10+                   | x64, Arm64, Arm32 |
[Fedora][Fedora]                      | 36+                   | x64               |
[openSUSE][OpenSUSE]                  | 15+                   | x64               |
[Oracle Linux][Oracle-Linux]          | 7+                    | x64               |
[Red Hat Enterprise Linux][RHEL]      | 7+                    | x64, Arm64        |
[SUSE Enterprise Linux (SLES)][SLES]  | 12 SP2+               | x64               |
[Ubuntu][Ubuntu]                      | 18.04+                | x64, Arm64, Arm32 |

[Alpine]: https://alpinelinux.org/
[Alpine-lifecycle]: https://alpinelinux.org/releases/
[CentOS]: https://www.centos.org/
[CentOS-lifecycle]:https://wiki.centos.org/FAQ/General
[CentOS-docker]: https://hub.docker.com/_/centos
[CentOS-pm]: https://learn.microsoft.com/dotnet/core/install/linux-package-manager-centos8
[Debian]: https://www.debian.org/
[Debian-lifecycle]: https://wiki.debian.org/DebianReleases
[Debian-pm]: https://learn.microsoft.com/dotnet/core/install/linux-package-manager-debian10
[Fedora]: https://getfedora.org/
[Fedora-lifecycle]: https://fedoraproject.org/wiki/End_of_life
[Fedora-docker]: https://hub.docker.com/_/fedora
[Fedora-msft-pm]: https://learn.microsoft.com/dotnet/core/install/linux-package-manager-fedora32
[Fedora-pm]: https://fedoraproject.org/wiki/DotNet
[OpenSUSE]: https://opensuse.org/
[OpenSUSE-lifecycle]: https://en.opensuse.org/Lifetime
[OpenSUSE-docker]: https://hub.docker.com/r/opensuse/leap
[OpenSUSE-pm]: https://learn.microsoft.com/dotnet/core/install/linux-package-manager-opensuse15
[Oracle-Linux]: https://www.oracle.com/linux/
[Oracle-Lifecycle]: https://www.oracle.com/a/ocom/docs/elsp-lifetime-069338.pdf
[RHEL]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
[RHEL-lifecycle]: https://access.redhat.com/support/policy/updates/errata/
[RHEL-msft-pm]: https://learn.microsoft.com/dotnet/core/install/linux-package-manager-rhel8
[RHEL-pm]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/developing_.net_applications_in_rhel_8/using-net-core-on-rhel_gsg#installing-net-core_gsg
[SLES]: https://www.suse.com/products/server/
[SLES-lifecycle]: https://www.suse.com/lifecycle/
[SLES-pm]: https://learn.microsoft.com/dotnet/core/install/linux-package-manager-sles15
[Ubuntu]: https://ubuntu.com/
[Ubuntu-lifecycle]: https://wiki.ubuntu.com/Releases
[Ubuntu-pm]: https://learn.microsoft.com/dotnet/core/install/linux-package-manager-ubuntu-2004
[glibc]: https://www.gnu.org/software/libc/
[musl]: https://musl.libc.org/
