npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@maydotinc/s3-syncer

v0.1.7

Published

Full-featured CLI to sync local directories to S3-compatible buckets via GitHub Actions or locally. You may also pull files from a remote target.

Readme

@maydotinc/s3-syncer

Sync local folders to S3-compatible storage such as AWS S3, Cloudflare R2, and MinIO.

s3-syncer is designed for real app repos and monorepos:

  • reusable s3-syncer.json config
  • interactive setup and one-off sync flows
  • dry runs and validation before mutating remote state
  • streaming uploads and hashing for large asset sets
  • bounded concurrency and retries for production reliability
  • pull support with incremental diffing and dry-run previews

Quick Start

Most teams can start with:

npx @maydotinc/s3-syncer sync

If s3-syncer.json is missing, the CLI offers to:

  • create a reusable config, or
  • run a one-time sync without writing config

If credentials are missing, it can:

  • load them from .env or --env-file, or
  • prompt for them interactively

Requirements

  • Node.js 20+
  • S3-compatible credentials with:
    • ListObjectsV2
    • PutObject
    • GetObject for pull
    • optionally DeleteObject when delete: true

Common Commands

# Interactive setup
npx @maydotinc/s3-syncer init --config-only

# Validate config, env placeholders, credentials, and read access
npx @maydotinc/s3-syncer validate --env

# Preview uploads/deletes without mutating remote state
npx @maydotinc/s3-syncer sync --dry-run --env

# Run an actual sync
npx @maydotinc/s3-syncer sync --env

# Watch local files and rerun sync on changes
npx @maydotinc/s3-syncer sync --watch --env

# Preview a pull without downloading files
npx @maydotinc/s3-syncer pull --dry-run -o ./pulled --env

# Pull only changed/new files
npx @maydotinc/s3-syncer pull -o ./pulled --env

Core Features

Sync

  • fingerprints local files
  • lists remote objects
  • compares local hashes to remote ETags
  • uploads changed/new files
  • optionally deletes stale remote files
  • retries transient failures
  • ends with a summary instead of aborting on the first bad file

Pull

  • lists remote objects under a target/prefix
  • compares remote files against local files in the output directory
  • downloads only new or changed files
  • skips unchanged files
  • supports --dry-run
  • honors target exclude rules

Production controls

Each target can define:

  • exclude (glob patterns, extension shorthands like .mp4, contains:lqip, re:^drafts/, or object form { extension } / { contains } / { regex } / { glob })
  • concurrency
  • retry
  • maxFileSize
  • watch
  • envFile
  • ${ENV_VAR} placeholders for bucket, endpoint, and credentials

Guides

Start here for the level of depth you need:

Agent Skills

This repo includes portable Agent Skills under skills/:

  • s3-syncer-integration
  • shared-cdn-assets
  • s3-syncer-troubleshooting

They package the integration, architecture, and troubleshooting workflows that agents tend to get wrong when they only see a generic README.

Minimal Config Example

{
  "targets": [
    {
      "directory": "public",
      "bucket": "my-assets",
      "region": "auto",
      "endpoint": "https://<account>.r2.cloudflarestorage.com",
      "prefix": "",
      "delete": false,
      "exclude": [
        "**/*.map",
        ".next/cache/**",
        ".mp4",
        "contains:lqip",
        { "extension": "webm" },
        { "regex": "\\.tmp$" }
      ],
      "concurrency": {
        "fingerprint": 8,
        "upload": 4,
        "delete": 8
      },
      "retry": {
        "maxAttempts": 3,
        "baseDelayMs": 250,
        "maxDelayMs": 4000
      },
      "maxFileSize": {
        "warnBytes": 25000000,
        "errorBytes": 100000000
      },
      "watch": {
        "debounceMs": 500
      }
    }
  ],
  "branch": "main",
  "notifications": {
    "slack": false,
    "discord": false
  }
}

Environment Variables

Required for normal sync/pull usage unless target-level credential placeholders are used:

AWS_S3_ACCESS_KEY_ID=your_access_key
AWS_S3_SECRET_ACCESS_KEY=your_secret_key
AWS_S3_ENDPOINT=

Optional:

  • SLACK_WEBHOOK_URL
  • DISCORD_WEBHOOK_URL

Notes

  • sync and pull both use MD5 vs remote ETag for change detection today.
  • If remote objects were uploaded outside s3-syncer with multipart uploads or provider-specific ETag behavior, some unchanged files may still be treated as changed.
  • Hashing and uploads are streamed, so large files are not fully buffered in memory.

License

MIT