Appearance
Ports
Shares a running service of a ticket's worktree under a public URL.
Show a preview, such as a DDEV site, Mailpit or Storybook, to someone outside the machine.
The bakers ports commands ship with the CLI. The addon entry adds the Share tunnels message to tickets.
Enable it
Add the package to
addonswith one tunnel transport in itswith.transport, usually in~/.bakers/machine.config.js: Named Cloudflare and frp give a fixed name (https://<ticket>-<key>.<zone>), Cloudflare Quick an allocatedtrycloudflare.comURL. Named Cloudflare and frp also need their connector running on that machine.jsaddons: [ { use: '@bakers-build/addon-ports', with: { transport: { use: '@bakers-build/addon-ports-cloudflare-quick' } }, }, ],It may also go in the project's
.bakers/conductor.config.js; with both, the machinewithwins. Restart the conductor after a change.
The conductor registers the addon; a Share tunnels message then appears in the message card of every ticket it works, in the web UI and in bakers ui. Anyone who may read the ticket may send it.
Options
| Option | Meaning |
|---|---|
transport.use | The transport package. Required for bakers ports up, down, reap and the Share tunnels message. |
transport.with | The transport's own settings; see each transport's page and Shared service tunnels. |
services, all_node | Which host processes are shared; see Shared processes. |
Without a ports entry with transport.use, tunnel commands refuse with bakers ports needs '@bakers-build/addon-ports' in addons[] …; bakers ports list still works. Projects naming different transports are refused at runtime. A top-level ports key in the machine file is retired; bakers config upgrade --scope machine moves it into the entry.
Check it works
The ticket's message card offers Share tunnels. Sending it shares every eligible service not yet shared and lists each service's state.
Per CLI
sh
bakers config check --scope machine
bakers ports list # every claimed service of this worktree
bakers ports up [service-key] [--ticket <id>]
bakers ports status
bakers ports down [service-key]
bakers ports reap # machine-wide reconciliationlist shows a claimed service; up returns a public URL that serves it.
Good to know
- Only claimed services get a tunnel: DDEV services by DDEV discovery, host processes by
services. A service key comes fromlist, never a raw port;upalone shares every eligible one. - In
bakers ui, open the message card from Overview (↓/j,Enter).←/→switch addon,Entersends Share tunnels, andlcopies a link out of the answer. - Reap is no message: run
bakers ports reapor wire theafter_donehook, so a finished ticket leaves no tunnel behind. - A public URL is reachable from the internet while the tunnel lives.
Ask your AI
"Add the ports addon with a transport to my machine file's addons, then run the checks."
Source: bakers-cli/addons/ports