Skip to main content
Subscribes an agent to events on specific branches or files. When a matching event occurs — a push to a watched branch, or a change to a watched file — the agent receives it. You can subscribe to a branch, one or more files, or both at once. Each --file flag adds a separate file subscription.

Synopsis

On a VM, the slug is optional — omitting it subscribes the current agent.

Arguments

Examples

Subscribe to a branch

The agent fix-auth now receives events whenever commits are pushed to main.

Subscribe to specific files

Subscribe with an explicit repo URL

Use --repo when you are not inside the repository’s working tree, or when you want to subscribe to events in a different repository.

Self-subscribe on a VM

When running on an agent VM, omit the slug to subscribe the current agent:

Errors