# 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="/files/od7AIHRMRnqfGDzXWrOM" alt="" width="375"><figcaption></figcaption></figure>

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

<figure><img src="/files/XNkdkNHIJvdNCIsHbjPn" 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](/changelog.md). 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`

```
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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tessl.io/introduction-to-tessl/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
