From f5e1694713f1b8a9b6e65908c0cd699a3f563902 Mon Sep 17 00:00:00 2001 From: Leothosine Date: Fri, 11 Sep 2026 07:59:48 +0100 Subject: [PATCH] docs: add CLI tools documentation --- docs/cli.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/cli.md diff --git a/docs/cli.md b/docs/cli.md new file mode 100644 index 0000000..bc070d7 --- /dev/null +++ b/docs/cli.md @@ -0,0 +1,35 @@ +# CLI Tools + +PayStream ships two binaries under `cmd/`. + +## paystream-api + +Serves the HTTP API. + +```bash +go run ./cmd/paystream-api +``` + +- Listens on `:8080` (configurable via `API_PORT`, see [configuration](configuration.md)). +- `GET /health` — liveness check, backed by `internal/health`. +- `GET /version` — returns `{"version": "0.1.0"}` as JSON. + +## paystream-worker + +Runs background jobs (Horizon polling, signing queue, webhook delivery). + +```bash +go run ./cmd/paystream-worker +``` + +- Logs a startup timestamp and blocks, processing jobs as they're wired in. +- Intended to run as a long-lived process alongside `paystream-api`. + +## Building binaries + +```bash +go build -o bin/paystream-api ./cmd/paystream-api +go build -o bin/paystream-worker ./cmd/paystream-worker +``` + +See [CONTRIBUTING.md](../CONTRIBUTING.md) for the full development workflow.