or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

examples

edge-cases.mdreal-world-scenarios.md
index.md
tile.json

quick-start.mddocs/guides/

Quick Start Guide

Get started with r2put in minutes.

Installation

Install r2put globally or locally:

# Global installation
npm install -g r2put

# Local installation
npm install r2put --save-dev

# Or use without installation
npx r2put

Prerequisites

1. Cloudflare R2 Account

You need a Cloudflare R2 account with:

  • Account ID
  • R2 API Access Key ID
  • R2 API Secret Access Key

Create these in the Cloudflare dashboard under R2 > Manage R2 API Tokens.

2. Set Environment Variables

Set the required environment variables:

export CLOUDFLARE_ACCOUNT_ID="your-account-id"
export R2_ACCESS_KEY_ID="your-access-key-id"
export R2_SECRET_ACCESS_KEY="your-secret-access-key"

For persistent setup, add these to your shell profile (~/.bashrc, ~/.zshrc, etc.).

Your First Upload

Basic Upload

Upload a file with default object key (uses filename):

r2put --file ./data.bin --bucket production-v4

Upload with Custom Key

Specify a custom object key:

r2put --file ./local-image.png --bucket assets --key images/hero.png

Using Short Flags

Use short flag aliases:

r2put -f ./backup.tar.gz -b backups -k "backups/$(date +%Y%m%d).tar.gz"

Verify Upload

On successful upload, r2put displays:

  • Object path: bucket/objectKey
  • Presigned download URL (valid for 1 hour)

The presigned URL can be used immediately to download the file.

Next Steps

  • See Real-World Scenarios for common workflows
  • Review CLI Interface Reference for all options
  • Check Edge Cases for advanced scenarios