Zynk CLI

Files, previews and timeouts

Select files safely from a script, preview a send before it happens, and set a response timeout.

Selecting files

Without --null, stdin paths are newline-separated. Invalid UTF-8 input is rejected before submission on the direct and daemon-capable Unix paths.

Find files, then send — Bash

(  file_list=$(mktemp) || exit 1  trap 'rm -f "$file_list"' EXIT  if find ./exports -type f -print0 > "$file_list"; then    zynk --json-output send --null Alice < "$file_list"  else    printf 'File search failed; nothing was sent.\n' >&2    exit 1  fi)

The temporary list is removed when this block finishes. -print0 and --null preserve spaces and newlines in filenames. Piped filenames must be UTF-8.

Pass a literal filename

$ zynk --json-output send Alice './report[final].pdf'

Shell quotes keep the brackets literal. Zynk preserves the selected path through direct and daemon execution.

Dry-run previews

Use --dry-run to inspect a proposed action without submitting it. Dry runs return JSON and bypass the daemon.

Preview a send

$ zynk --dry-run send Alice ./report.pdf

The send_preview record describes the destination and files. It does not mean a transfer happened.

Invalid arguments also return JSON errors

$ zynk --dry-run pending --since yesterday

yesterday is not a supported duration. Use --since 3d for three days. A separate --json-output flag is not needed for dry-run errors.

Response timeouts

Use --wait-timeout to limit asynchronous startup and command-response waits. The default is 30 seconds.

Durations must be greater than zero and at most 24h. Connecting to a daemon and a safe direct fallback share the same budget; fallback does not restart the timer.

An error that explicitly says nothing was submitted differs from core_response_timeout or daemon_response_timeout, where the outcome may be unknown. Keep any transfer ID and check state before retrying.

Use a ten-second response budget

$ zynk --json-output --wait-timeout 10s send Alice ./report.pdf

The timeout is not a delivery deadline

Reading input and checking files can add to total runtime. Once a receive starts, downloading may continue beyond the budget. A send never waits for recipient acceptance.