Skip to main content
Uploads the local contract to Bazable Cloud. Creates a cloud project on first push.

Usage

Options

This command takes no options.

Prerequisites

  • Your project must be initialized (bazable init) and contain a valid bazable.config.json with at least one endpoint.
  • You must be authenticated. If you are not logged in, the command starts the device-code flow automatically. Open the printed link, sign in with GitHub or email, and the push continues.

What it does

1

Check authentication

If no stored token exists, starts the device-code flow.
2

Create a cloud project

On the very first push, a unique project ID (bz_proj_…) is generated and saved to your bazable.config.json as cloudProjectId. The cloud API base URL is saved automatically too.
3

Upload the contract

Your entire contract (endpoints, schemas, base URLs) is sent to the cloud and stored as a new version.
4

Increment the version

Each push increments the version number. Roll back to a specific version with bazable sync --version <number>.
5

Notify via webhook

If you have set a webhook URL (bazable config --set-webhook), a notification is sent to your Slack or Discord channel.
6

Broadcast real-time update

The cloud server broadcasts a contract_updated WebSocket message to every connected bazable watch client for this project, triggering an immediate auto-fix on teammate machines.
After the first push, teammates can clone the repo and run bazable sync to pull the latest contract with no extra configuration.

Example

Requires an authenticated session. See Device Code Authentication if the CLI is not signed in.