Secure, versioned file release CLI for S3-compatible storage.
Hatch uploads, manages, and distributes files in versioned release paths on S3-compatible storage (Cloudflare R2, AWS S3, MinIO, etc.), with automatic checksum generation.
Shell (Linux/macOS):
curl -fsSL https://raw.githubusercontent.com/Agora-Build/Hatch/master/install.sh | shnpm:
npm install -g @agora-build/hatchFrom source:
cargo install --git https://github.com/Agora-Build/Hatch# 1. Create a .env file with your credentials
cat > .env <<EOF
HATCH_ACCESS_KEY=your_access_key
HATCH_SECRET_KEY=your_secret_key
HATCH_BUCKET=releases
EOF
# 2. Upload a file
hatch push myapp_v1.0_build42.zip --path /release/myapp/v1
# => https://dl.agora.build/release/myapp/v1/myapp_v1.0_build42.zip
# 3. List files
hatch list --path /release/myapp/v1
# 4. Check file metadata and checksums
hatch info myapp_v1.0_build42.zip --path /release/myapp/v1
# 5. Delete a file
hatch drop myapp_v1.0_build42.zip --path /release/myapp/v1| Command | Description |
|---|---|
push |
Upload a file to a release path |
drop |
Delete a file (requires confirmation) |
list |
List files at a release path |
info |
Show metadata and checksums for a file |
push and drop require credentials. list and info work without credentials against public buckets.
Add to a .env file in your working directory, or export as environment variables:
HATCH_ACCESS_KEY=<key> # Required for: push, drop
HATCH_SECRET_KEY=<secret> # Required for: push, drop
HATCH_BUCKET=<bucket> # Required for: push, drop
HATCH_PUBLIC_URL=<url> # Public CDN URL (default: https://dl.agora.build)- Create an S3-compatible bucket (e.g. Cloudflare R2, AWS S3)
- Create an API token with Object Read & Write permissions
- Copy the Access Key ID and Secret Access Key into your
.env - Set
HATCH_BUCKETto your bucket name - Optionally set
HATCH_PUBLIC_URLto your custom CDN domain
/release/<product>/<major_version>/
File names should include full version and build info:
<name>_v<version>_<build>.zip
Example:
hatch push myapp_v1.0_build42.zip --path /release/myapp/v1
# => https://dl.agora.build/release/myapp/v1/myapp_v1.0_build42.zip
- Automatic MD5 and SHA256 checksum sidecar generation on push
- Overwrite protection (
--forceto override) - Safe delete with confirmation prompt (
--yesfor CI) - JSON output for
list(--json) - Anonymous access for
listandinfoon public buckets - Works with any S3-compatible storage
MIT