bazable watch opens a real-time WebSocket connection to Bazable Cloud and reacts instantly to contract_updated events. If the WebSocket cannot connect, drops, or is disabled with --no-ws, it automatically falls back to HTTP polling.
Usage
Options
number
default:60
Polling interval in seconds. Only used when WebSocket is disabled or fails.
boolean
Show changes without applying them.
boolean
Automatically apply all changes.
boolean
Disable WebSocket real-time sync and use polling instead.
Examples
How real-time sync works
bazable watchreadscloudProjectIdandcloud.apiBaseUrlfrombazable.config.json.- It derives the WebSocket URL by swapping
httpforws(orhttpsforwss) and appending/ws?projectId=[projectId]. - When
bazable pushuploads a new contract version, the server broadcasts: - On receipt,
bazable watchimmediately runsbazable inspect --fix— no waiting for the next poll interval. - If the socket closes or errors, the client falls back to polling at
--intervalseconds.
Real-time sync requires a linked cloud project. Run
bazable push once to link the project and populate cloudProjectId. Use --no-ws in environments where outbound WebSocket connections are blocked (some corporate proxies, restricted CI runners).