On this page

Tigris CLI provides a simple and powerful command line interface to manage your
Tigris resources such as buckets, objects, access keys, and IAM policies.

## Setup

- Native
- Homebrew
- NPM

1. **Install**  
Download the standalone binary (no Node.js required):  
macOS / Linux

```bash
    curl -fsSL https://raw.githubusercontent.com/tigrisdata/storage/main/packages/cli/scripts/install.sh | sh
    ```

2. **Run**  
Get started by logging in:

```bash
    tigris login
    ```

3. **Update**  
Get the latest updates using:

```bash
    tigris update
    ```

1. **Install**  
Install the Tigris CLI with Homebrew:

```bash
    brew install tigrisdata/tap/tigris
    ```

2. **Run**  
Get started by logging in:

```bash
    tigris login
    ```

3. **Update**  
Get the latest updates using:

```bash
    brew upgrade tigrisdata/tap/tigris
    ```

1. **Install**  
Install the Tigris CLI with npm:

```bash
    npm install -g @tigrisdata/cli
    ```

2. **Run**  
Get started by logging in:

```bash
    tigris login
    ```

3. **Update**  
Get the latest updates using:

```bash
    tigris update
    ```

## Authentication

Tigris CLI supports multiple login methods. It allows you to login via your
browser (human-friendly) or with an access key and secret (machine-friendly).
`tigris login` allows you to select between the two methods.

### OAuth authentication

The quickest way to get started is to login via your browser (OAuth
authentication):

```bash
    tigris login oauth
    ```

This opens a browser window for OAuth authentication. Once complete, your
session is active and you can start using all commands. If you have multiple
organizations, the first organization in the list will be selected
automatically. You can select a different organization by running
`tigris organizations list`.

Sessions created with `tigris login oauth` will automatically expire in about an
hour. If you need to end such a session sooner, run `tigris logout`.

### Access key and secret authentication

To login with an access key and secret:

```bash
    tigris login credentials --access-key <your-key> --access-secret <your-secret>
    ```

Sessions created with `tigris login credentials` are also temporary and are
cleared when you run `tigris logout`.

### Saving credentials permanently

To save credentials permanently so they persist across sessions:

```bash
    tigris configure --access-key <your-key> --access-secret <your-secret>
    ```

This writes your credentials to `~/.tigris/config.json`. After configuring, all
commands use these credentials without needing to login each time.

### AWS Profiles and Environment Variables

You can use AWS profiles or environment variables with Tigris CLI.

```bash
    AWS_PROFILE=<your-profile> tigris <command> [flags]
    ```

or

```bash
    export AWS_ACCESS_KEY_ID=<your-key>
    
    export AWS_SECRET_ACCESS_KEY=<your-secret>
    
    export AWS_REGION=auto
    
    tigris <command> [flags]
    ```

### Verifying authentication status

You can verify your authentication status at any time:

```bash
    tigris whoami
    ```

### Testing credentials

To test that your credentials have access to a specific bucket:

```bash
    tigris credentials test
    
    tigris credentials test --bucket my-bucket
    ```
