bachs --help to see the command list. Commands that take flags, such as bachs listen, support --help. For grouped commands such as events, sessions, and endpoints, run the group without a subcommand to see its operations, then add --help after the operation (for example, bachs events list --help). Run a resource name on its own to see its API operations.
Every command accepts --api-key to override your stored credentials for that invocation. It is left out of the tables below to keep them readable.
login
Pairs this machine with your account through the browser. See Log in for the full flow.Connect this machine
logout
Removes the credential stored on this machine. It does not affect a key supplied throughBACHS_API_KEY or --api-key.
Forget the stored credential
Logging out removes the local credential but does not revoke the paired key. Revoke it from the developer portal if it should stop working immediately; otherwise it expires on its normal schedule.
whoami
Shows which environment your stored credentials target. Useful before running anything that changes data.Check the active environment
Response
listen
Forwards live events to a port on your machine. The connection is opened outbound, so there is no public URL and no tunnel. See Test webhooks locally for the full guide.Forward every event
The target accepts the shapes people actually type.
localhost:3000/webhooks, :3000/webhooks, and a full URL all work.
Forward two event types
--events or --all, not both. The CLI refuses rather than silently preferring one, so a filter you passed never does nothing without telling you.
sessions
Lists forwarding sessions that are currently connected to your account and closes sessions you no longer need. This is useful when events are reaching another machine or a terminal you left running.sessions list
List live forwarding sessions
sessions close
Close one forwarding session
trigger
Emits a sample event so you can exercise a handler without making a real payment. The event goes through the ordinary delivery path, so it fans out to whatever is subscribed, records delivery attempts, and is signed like any other event.Emit a sample event
events
Lists past events and redelivers them. Replay is a plain API call, so it needs no forwarding session and works against your registered destinations in production too.events list
Recent events and how they went
--undelivered is the one to reach for when an event seems to have vanished. It shows events that matched no destination at all, which usually means the endpoint filter does not include that type.
events replay
Redeliver one event
events replay-failed
Redelivers events whose delivery failed, which saves replaying them one at a time after an outage on your side.See what would be replayed
endpoints
Manages the webhook destinations Bachs delivers to. These are the same destinations shown in the Developer Portal.Your webhook destinations
Register a destination
Remove a destination
Resource commands
Every API operation is also a command, grouped by resource. Run a resource name on its own to see its operations:See what you can do with customers
Operations
accountsbalancescheckout-sessionsconnected-accountsconversionscustomer-sessionscustomersdisputesmediamiscpaymentspayoutspersonsplatform-feesproduct-groupsproductsreferencerefundssubscriptionstransferswebhooksRetrieve one customer
List with a filter
Create a customer
true and false become booleans, whole numbers become integers, and anything containing a decimal point is left as a string, so an amount like 29.00 stays exact rather than being rounded through a float.
Responses print as formatted JSON, which pipes cleanly into jq:
Pull one field out of the response
Exit codes
Scripts should check for a non-zero exit rather than parsing output, which is formatted for people and may change.

