r2dev

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 6 Imported by: 0

README

R2dev

A simple server for local Cloudflare wrangler R2 Files.

Installation

Option 1: With Go
go install github.com/theahmedmuneeb/r2dev@latest
Option 2: Download Binary

Go to Releases and download the binary for your OS:

  • r2dev-windows.exe
  • r2dev-linux
  • r2dev-mac
  • r2dev-mac-arm

Then make it executable (if needed) and run:

chmod +x r2dev
./r2dev --bucket <bucket-name> --db <database-name> --path <project-dir>

Usage

r2dev --bucket <bucket-name> --db <database-name> --path <project-dir> --port <port>

You can access all files in the R2 bucket by navigating to http://localhost:<port>/<key>, where <key> is the path to the file in the R2 bucket.

Flags:
  • --port → Port to run the server on (optional, default: 2005)
  • --bucket → R2 bucket name (required)
  • --db → SQLite database file name (required)
  • --path → Path to the wrangler project directory (optional, default: current directory)

Example

r2dev --port 6969 --bucket my-bucket --db 62a73800a83d71a2df06cf3b96789873e715db69cfb63c2f37970885fef54c29 --path ./backend

Notes

  • Only for local development
  • Based on Miniflare's R2 structure

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL