# Installation

> Source: https://truto.one/docs/cli/installation/

## Install script (recommended)

```bash
curl -fsSL https://cli.truto.one/install.sh | bash
```

The installer detects your OS and architecture, downloads the correct binary, and installs it to `~/.truto/bin/truto`. Add `~/.truto/bin` to your `PATH` if the installer does not do so automatically.

### Install options

```bash
# Install a specific version
TRUTO_VERSION=0.1.0 curl -fsSL https://cli.truto.one/install.sh | bash

# Install to a custom directory
TRUTO_INSTALL_DIR=/usr/local/bin curl -fsSL https://cli.truto.one/install.sh | bash
```

## Upgrading

```bash
# Check if a newer version is available
truto upgrade --check

# Upgrade to the latest version
truto upgrade

# Re-download even if already on the latest version
truto upgrade --force
```

The `upgrade` command fetches the latest release from `cli.truto.one`, downloads the platform-specific binary, and replaces the currently running binary in place.

:::callout{type="info"}
If the CLI was installed to a system directory (for example `/usr/local/bin`), you may need to run `sudo truto upgrade`.
:::

:::callout{type="tip"}
Run `truto upgrade --check` periodically to see if a new version is available without installing it.
:::

## Next steps

1. [Create an API token](/docs/guides/api-tokens/creating-api-tokens) in the dashboard (Settings → API Tokens).
2. [Authenticate](/docs/cli/authentication) with `truto login` or `truto login --token "$TRUTO_API_TOKEN"`.
3. Follow the [CLI overview](/docs/cli/overview) quick start to verify with `truto whoami` and explore your environment.
