github.com/cli-tools/postmany

No description declared in shard.yml.

3 stars
0 dependents
License: UNLICENSE

Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  Postmany:
    github: cli-tools/postmany
    version: ~> 0.1.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.1.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

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

  • Stream filenames from stdin
  • Upload with POST or PUT
  • Download with GET
  • Multiple worker fibers (-w) for concurrent transfers
  • Static request headers (-H) for APIs like Azure Blob

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

OptionDescription
-w, --workers=WORKERSNumber of workers (default: 1, minimum: 1)
-s, --silentDisable per-file stdout output
--no-progressDisable progress messages
-X, --request=METHODHTTP method: POST, PUT, GET (default: POST)
-H, --header=HEADERStatic HTTP header (key:value)
-h, --helpShow help
--versionShow version

Positional argument:

  • ENDPOINT (required): target URL.

Engineering Docs

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

License

UNLICENSE.