The CLI is non-interactive when it needs to be. In CI, deploy scripts, and other automation, authenticate with an environment token and drive forwarders without the terminal UI.
Authenticate with a token#
Set REPOST_TOKEN in the environment. It takes priority over any stored credentials, so the same step works on a fresh CI runner or on a developer machine.
export REPOST_TOKEN=rp_your_token_here
repost auth statusCreate a named, expiring token from the dashboard and store it as a CI secret. See Authentication for the full token model and lookup order.
Pause forwarding during a deploy#
Forwarders can be paused and resumed from the CLI. Pause a forwarder before a deploy so it stops delivering to a service that is restarting, then resume it once the deploy is healthy.
# before deploy: stop delivering to the target
repost forwarder pause --bucket stripe-prod --forwarder prod-api
# after deploy: start delivering again
repost forwarder resume --bucket stripe-prod --forwarder prod-apiWhile a forwarder is paused, the bucket keeps recording incoming requests in event history, so nothing is lost. Anything that arrived during the pause can be redelivered with history replay.
See Manage forwarders for the difference between pause, disable, and resume, the interactive selector, and how to list buckets and forwarders.
Run forwarding headless#
--headless runs repost forward without the TUI. It prints HEADLESS_READY once the listener is connected, then processes events in the background. Pass --skip-pending so startup does not block on an interactive pending-event decision.
repost forward \
--bucket stripe-prod \
--forwarder local-webhooks \
--skip-pending \
--headlessExample: GitHub Actions deploy#
Pause the production forwarder while a deploy runs, then resume it. Store the token as a repository secret named REPOST_TOKEN.
name: deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
env:
REPOST_TOKEN: ${{ secrets.REPOST_TOKEN }}
steps:
- name: Install the Repost CLI
run: curl -fsSL https://releases.repost.sh/cli/install.sh | sh
- name: Pause the production forwarder
run: repost forwarder pause --bucket stripe-prod --forwarder prod-api
- name: Deploy
run: ./scripts/deploy.sh
- name: Resume the production forwarder
if: always()
run: repost forwarder resume --bucket stripe-prod --forwarder prod-apiif: always() on the resume step re-enables the forwarder even if the deploy step fails. Pair it with history replay to redeliver anything that arrived while the forwarder was paused.
Non-interactive flags#
Environment auth. Overrides stored credentials. Required on CI runners.
Target a bucket and forwarder without prompts. Provide both, or neither.
Skip the interactive pending-event decision at startup. Required with --headless.
Run repost forward with no TUI, printing HEADLESS_READY when connected.