# Installation

## Install

{% stepper %}
{% step %}
**Download the CLI**

The CLI can be installed using Curl (native), Homebrew or npm (deprecated).

{% tabs %}
{% tab title="Native" %}

```
curl -fsSL https://get.tessl.io | sh
```

{% endtab %}

{% tab title="Homebrew" %}

```
brew install tesslio/tap/tessl
```

{% endtab %}

{% tab title="npm (deprecated)" %}

```
npm install -g @tessl/cli
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}
**Test the CLI**

Run the following command to check that everything is working.

```shell-session
tessl --help
```

{% endstep %}

{% step %}
**Authenticate with Tessl \[optional]**

Log in to Tessl to access all CLI functionality.

```shell-session
tessl login
```

* This will display a verification code and URL

```
Please log in at the URL below (if your browser didn't open automatically):

  https://auth.tessl.io/device

Then confirm the following code:

  XYZA-BCDE

⠏ Waiting for confirmation…
```

* Open the URL in your browser and login to Tessl with either your GitHub or Google account.

<figure><img src="https://1171143958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbWzspFdXV0HNujz6gJ9%2Fuploads%2Fgit-blob-45c365a2cf49eea7f87e0b6c2ae6c4b390e87af7%2Fimage%20(4)%20(1).png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

* Once authenticated, you can enter the device code in your browser window.

<figure><img src="https://1171143958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbWzspFdXV0HNujz6gJ9%2Fuploads%2Fgit-blob-f3cfeaeb158ccaefd38ee97030e82663709e10ce%2Fimage%20(5)%20(1).png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

You can now verify your authentication status with:

```shell-session
tessl whoami
```

To log out when needed:

```shell-session
tessl logout
```

{% endstep %}
{% endstepper %}

## Automatic Updates

The Tessl CLI automatically checks for updates and installs them in the background. Updates run silently without interrupting your workflow.

* Updates check every 3 hours by default
* Updates only occur when you run CLI commands; they might briefly delay command exit
* To disable automatic updates, set `TESSL_AUTO_UPDATE_INTERVAL_MINUTES=0`
* Update logs are saved to `~/.tessl/auto-update.log` for troubleshooting

{% hint style="info" %}
Automatic updates are disabled in CI environments
{% endhint %}

## Manual Update

To manually update your CLI to the latest version:

{% tabs %}
{% tab title="Native" %}

```shell-session
tessl cli update
```

This command will update your CLI to the latest version for your current release channel.
{% endtab %}

{% tab title="Homebrew" %}

```shell-session
tessl cli update
```

This command will update your CLI to the latest version for your current release channel.
{% endtab %}

{% tab title="npm (deprecated)" %}

```shell-session
npm update -g @tessl/cli
```

{% endtab %}
{% endtabs %}

## Update to Specific Version

You can find all releases in the [changelog](https://docs.tessl.io/changelog). To install/upgrade to a specific version:

{% tabs %}
{% tab title="Native" %}
Example to update to a specific version:

```shell-session
tessl cli update --target 0.63.4
```

{% endtab %}

{% tab title="Homebrew" %}
Example to update to a specific version:

```shell-session
tessl cli update --target 0.63.4
```

{% endtab %}

{% tab title="npm (deprecated)" %}
Example to install a specific version:

```shell-session
npm install -g @tessl/cli@0.63.4
```

{% endtab %}
{% endtabs %}

Installing a specific version is not supported in `brew` .

## Uninstall

{% tabs %}
{% tab title="Native" %}

```
rm -rf ~/.local/bin/tessl ~/.local/share/tessl
```

To remove Tessl config files, delete the `~/.tessl` directory
{% endtab %}

{% tab title="Homebrew" %}

```
brew uninstall tessl
rm -rf ~/.local/bin/tessl ~/.local/share/tessl
```

To remove Tessl config files, delete the `~/.tessl` directory
{% endtab %}

{% tab title="npm (deprecated)" %}
Determine which `npm` Tessl package you have:

```
npm ls -g | grep tessl
```

To uninstall `@tessl/cli`

```
npm uninstall -g @tessl/cli
```

To uninstall `tessl`&#x20;

```
npm uninstall -g tessl
```

Remove the native binaries:

```
rm -rf ~/.local/bin/tessl ~/.local/share/tessl
```

To remove Tessl config files, delete the `~/.tessl` directory
{% endtab %}
{% endtabs %}
