2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill r2-storage- _meta.json273 B
- SKILL.md3.0 KB
Overview
This skill provides command-line tools to manage Cloudflare R2 storage using rclone for setup, upload, download, sync, listing and deletion. It streamlines credential handling, quick setup, and common rclone operations so you can treat R2 like any other S3-compatible remote. The scripts support interactive setup, environment/dashboard configuration, and raw JSON output for UI integrations.
How this skill works
The skill wraps rclone commands and a small set of helper scripts to configure an R2 remote, perform transfers, and inspect bucket contents. Credentials can be supplied via a dashboard R2_CONFIG JSON or an env file, and the named rclone remote 'r2' is used for direct rclone operations. Common actions (upload, download, sync, list, delete) are exposed as simple shell commands that call rclone with sensible defaults and flags.
When to use it
- You need an easy CLI for uploading and downloading files to Cloudflare R2.
- You want to sync local folders with R2 for backups or deployments.
- You need quick bucket inspection and management without writing rclone commands each time.
- You require scripted or interactive setup of R2 credentials for CI or developer machines.
- You want to mirror or purge bucket contents safely with one-way sync or delete commands.
Best practices
- Store R2 credentials securely in dashboard R2_CONFIG or ~/.config/r2/config.json rather than plaintext scripts.
- Create an API token with only Object Read/Write/List permissions for least privilege.
- Use r2-sync --delete only when you want destination mirrors; double-check paths before running.
- Test uploads/downloads on a small sample before bulk transfers to validate endpoint and bucket.
- Use rclone flags like -P for progress and --dry-run for previewing destructive operations.
Example use cases
- Backup a local folder nightly to R2 with r2-sync /local/backups/ r2:backups/ --delete to maintain a mirror.
- Deploy static site assets by uploading a build folder: r2-upload ./dist/ --bucket site-assets.
- Recover a lost file by running r2-ls to locate it then r2-download path/to/file /restore/.
- Purge a test bucket after CI runs using r2-purge test-bucket to remove all objects.
- Check storage usage before large uploads using rclone size r2:bucket to estimate costs.
FAQ
Create an API token in the Cloudflare dashboard R2 section. Grant Object Read, Object Write, and Object List permissions. Use your Account ID to form the endpoint: https://<account_id>.r2.cloudflarestorage.com.
How do I avoid accidental deletion when syncing?
Run r2-sync with --dry-run first or omit --delete. Confirm source and destination paths, and use -P to monitor progress when ready.