Giter VIP home page Giter VIP logo

r2's Introduction

R2 CLI

Cloudflare R2 object storage made easy

Purpose

r2 is a library and command line interface for working with Cloudflare's R2 Storage.

Cloudflare's R2 implements the S3 API, attempting to allow users and their applications to migrate easily, but importantly lacks the key, simple-to-use features provided by the AWS CLI's s3 subcommand, as opposed to the more complex and verbose API calls of the s3api subcommand. This CLI fills that gap.

Installation

To install the r2 CLI, simply run the following command:

go install github.com/erdos-one/r2@latest

For more installation options, see INSTALL.md.

Usage

To view the CLI's help message, run:

r2 help

Available Commands

  • r2 configure — Configure R2 access
  • r2 cp — Copy an object from one R2 path to another
  • r2 help — Help about any command
  • r2 ls — List either all buckets or all objects in a bucket
  • r2 mb — Create an R2 bucket
  • r2 mv — Moves a local file or R2 object to another location locally or in R2.
  • r2 presign — Generate a pre-signed URL for a Cloudflare R2 object
  • r2 rb — Remove an R2 bucket
  • r2 rm — Remove an object from an R2 bucket
  • r2 sync — Syncs directories and R2 prefixes.

To view the help message for a specific command, run:

r2 help <command>

For more usage information — including library usage — see USAGE.md.

Progress

We're working to implement all the functionality of the AWS CLI's s3 subcommand. As of v0.1.0-alpha, we have all the commands implemented, but not all the options. We're working on it, but if you'd like to lend a helping hand, we'd much appreciate your help!

To view the latest changes, see CHANGELOG.md.

Contributing

Our expected workflow is: Fork → Patch → Push → Pull Request.

Another helpful way to contribute is to report bugs or request features by opening an issue. We appreciate contributions of all kinds!

To understand the codebase, we recommend reading the ARCHITECTURE.md file.

r2's People

Contributors

williamwmarx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

r2's Issues

GetObjects doesn't paginate

Returns a max of 1000 objects and then stops without more paginating, so sync doesn't work right for larger buckets...

How to list objects i a bucket cannot find a example

r2 ls — List either all buckets or all objects in a bucket

Getting error

r2 ls --bucket test

luci: r2 ls --bucket test
Error: unknown flag: --bucket
Usage:
  r2 ls [flags]

Flags:
  -h, --help   help for ls

Global Flags:
  -p, --profile string   R2 profile to use (default "default")


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.