Skip to main content

1. Install the CLI

Verify the install:
For Postman-based testing with bazable test --newman or bazable serve --verify, optionally install Newman globally: npm install -g newman. If it’s not installed, Bazable falls back to npx newman. See Postman Integration for the full workflow.

2. Initialize a project

From the root of your app, create a bazable.config.json:
This reads your package.json for the project name and seeds an empty endpoints list. See bazable init for details.

3. Extract endpoints from your code

Scan the codebase to auto-populate the contract with real endpoints and payload schemas:
Use a preset for non-JS stacks:
Full options in bazable extract.

4. Validate code against the contract

inspect flags dead URLs, payload mismatches, and over-fetching. Run it locally, in a pre-push hook, or in CI.

5. Generate code and mocks

Backend stubs

Generate Express or Hono routes with Zod validation from your contract.

UI forms

Generate React + Tailwind form components from request schemas.

Mock server

Spin up a mock API with realistic data generation.

Local dashboard

Browse endpoints, schemas, and test your API in the browser.

6. Sync with your team

Push the contract to Bazable Cloud so teammates can pull it:
Authenticate the CLI with device code login.

What’s next