# How Do I Use the Tigris CLI?

The Tigris CLI (`tigris` or `t3`) lets you manage buckets, objects, access keys, and more from the terminal. It provides Unix-like commands (`ls`, `cp`, `mv`, `rm`) and Tigris-specific features like presigned URLs, forks, and snapshots.

## Frequently Asked Questions[​](#frequently-asked-questions "Direct link to Frequently Asked Questions")

**How do I install the Tigris CLI?** Install via npm: `npm install -g @tigrisdata/cli`. The command is available as both `tigris` and `t3`.

**How do I authenticate?** Run `tigris login` for browser-based OAuth, or `tigris login credentials` to enter an access key directly. Run `tigris configure` to save credentials permanently.

**Can I use `t3://` prefixes for paths?** Yes. Both `t3://my-bucket/file.txt` and `my-bucket/file.txt` work for all commands.

**Does the CLI work in scripts and CI/CD?** Yes. Set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables, or use `tigris configure` to save credentials.

## How Do I Authenticate?[​](#how-do-i-authenticate "Direct link to How Do I Authenticate?")

```
# Browser-based OAuth login

tigris login



# Login with access key and secret

tigris login credentials



# Save credentials permanently

tigris configure



# Check who you're logged in as

tigris whoami
```

## How Do I Create Buckets?[​](#how-do-i-create-buckets "Direct link to How Do I Create Buckets?")

```
# Create a bucket

tigris mk my-bucket



# Create a public bucket

tigris mk my-public-bucket --access public



# Create with snapshots enabled

tigris mk ml-data --enable-snapshots



# Create a folder inside a bucket

tigris mk my-bucket/images/
```

## How Do I Upload and Download Files?[​](#how-do-i-upload-and-download-files "Direct link to How Do I Upload and Download Files?")

```
# Upload a file

tigris cp local-file.txt my-bucket/file.txt



# Upload a directory recursively

tigris cp ./data/ my-bucket/data/ --recursive



# Download a file

tigris cp my-bucket/file.txt ./local-file.txt



# Download a directory

tigris cp my-bucket/data/ ./local-data/ --recursive
```

## How Do I List Buckets and Objects?[​](#how-do-i-list-buckets-and-objects "Direct link to How Do I List Buckets and Objects?")

```
# List all buckets

tigris ls



# List objects in a bucket

tigris ls my-bucket



# List objects with a prefix

tigris ls my-bucket/images/
```

## How Do I Move, Rename, and Delete?[​](#how-do-i-move-rename-and-delete "Direct link to How Do I Move, Rename, and Delete?")

```
# Move/rename an object

tigris mv my-bucket/old-name.txt my-bucket/new-name.txt



# Move a directory

tigris mv my-bucket/old-folder/ my-bucket/new-folder/ --recursive



# Delete an object

tigris rm my-bucket/file.txt



# Delete a directory

tigris rm my-bucket/old-data/ --recursive --force



# Delete a bucket (must be empty)

tigris rm my-bucket
```

## How Do I Generate Presigned URLs?[​](#how-do-i-generate-presigned-urls "Direct link to How Do I Generate Presigned URLs?")

Generate temporary shareable URLs without requiring credentials:

```
# Presigned GET URL (default 1 hour expiry)

tigris presign my-bucket/file.txt



# Presigned PUT URL with 2 hour expiry

tigris presign my-bucket/upload.pdf --method put --expires-in 7200



# Output as JSON (includes url, method, expiresIn, bucket, key)

tigris presign my-bucket/image.png --format json



# Use a specific access key

tigris presign my-bucket/data.csv --access-key tid_AaBb



# Copy URL to clipboard (macOS)

tigris presign my-bucket/file.txt | pbcopy
```

## How Do I Check Stats?[​](#how-do-i-check-stats "Direct link to How Do I Check Stats?")

```
# Account-level storage stats

tigris stat



# Bucket-level info

tigris stat my-bucket



# Object metadata

tigris stat my-bucket/file.txt
```

## How Do I Manage Access Keys?[​](#how-do-i-manage-access-keys "Direct link to How Do I Manage Access Keys?")

```
# Create a new access key

tigris access-keys create my-api-key



# List all access keys

tigris access-keys list



# Assign per-bucket roles

tigris access-keys assign tid_key_id --bucket my-bucket --role Editor



# Delete an access key

tigris access-keys delete tid_key_id
```

## How Do I Use Forks and Snapshots?[​](#how-do-i-use-forks-and-snapshots "Direct link to How Do I Use Forks and Snapshots?")

```
# Take a snapshot

tigris snapshots take my-bucket pre-release



# List snapshots

tigris snapshots list my-bucket



# Create a fork

tigris buckets create experiment-fork --fork-of my-bucket



# Create a fork from a snapshot

tigris buckets create experiment-fork --fork-of my-bucket --source-snapshot pre-release



# List forks

tigris buckets list --forks-of my-bucket
```

## Learn More[​](#learn-more "Direct link to Learn More")

* [Tigris Object Storage for AI Coding Agents](/docs/ai-agents/.md)
* [Presigned URLs](/docs/ai-agents/presigned-urls/.md)
* [Bucket Forks and Snapshots](/docs/ai-agents/bucket-forks-and-snapshots/.md)
* [Bucket Configuration](/docs/ai-agents/bucket-configuration/.md)
* [Tigris CLI Documentation](/docs/cli/.md)
