Skip to main content
Creates a bazable.config.json file with your project name (from package.json) and an empty endpoints list.

Usage

Options

This command takes no options.

What it does

Looks for a package.json in the current directory and reads its name field to set the contract’s projectName. If no package.json is found, it defaults to "unknown-project". Writes a new bazable.config.json with the following structure:
The endpoints object starts empty. Populate it with bazable extract, bazable add, or bazable import.

Safety checks

If bazable.config.json already exists, the command refuses to overwrite it and prints a warning:
This prevents accidental loss of your contract.

Prerequisites

  • Your project should be a valid Node.js project with a package.json (optional, but recommended).
  • The current directory should be the root of your frontend or backend project.

Example

Follow up with bazable extract to auto-populate the contract from your existing code.