crystal workflow

Postmany

Postmany reads filenames from stdin and transfers file content to/from an HTTP(S) endpoint.

It is designed for event-driven pipelines where a list of files is produced by one tool and streamed to another system.

Features

Installation

Build from source

shards install
shards --production build --release --static

The compiled binary is written to bin/postmany.

Docker development image

Use compose.yml with crystallang/crystal:1.19.1-alpine:

docker compose run --rm dev shards install
docker compose run --rm dev crystal spec

Usage

POST upload

URL="https://example.test/webhook"
find files -name '*.json' | postmany "$URL"

PUT upload (Azure Blob style)

SAS="?sv=2020-10-02&..."
STORAGE_ACCOUNT="mystorageaccount"
CONTAINER="mycontainer"
find images -name '*.png' | \
  postmany -X PUT -H x-ms-blob-type:BlockBlob \
  "https://${STORAGE_ACCOUNT}.blob.core.windows.net/${CONTAINER}${SAS}"

GET download

printf "docs/a.json\ndocs/b.json\n" | postmany -X GET "https://example.test/files"

CLI Reference

| Option | Description | |---|---| | -w, --workers=WORKERS | Number of workers (default: 1, minimum: 1) | | -s, --silent | Disable per-file stdout output | | --no-progress | Disable progress messages | | -X, --request=METHOD | HTTP method: POST, PUT, GET (default: POST) | | -H, --header=HEADER | Static HTTP header (key:value) | | -h, --help | Show help | | --version | Show version |

Positional argument:

Engineering Docs

Contributor workflows, architecture, and CI/CD details live in CONTRIBUTING.md.

License

UNLICENSE.