bake CLI
The command-line tool for working with bit.recipes. Validate, simulate, and deploy Backproto pipelines.
Installation
npm install -g @backproto/bake
Quickstart
# Fork a recipe
bake fork llm-ensemble-router
# Run a chaos simulation
bake sim --chaos
# Deploy to Base Sepolia
bake deploy
Commands
bake init <template>Scaffold a new recipe from a named template or blank. Generates the YAML file, a README, and a basic test harness.
bake validateValidate a recipe YAML against the JSON Schema. Reports errors with line numbers and suggestions.
bake testRun the recipe against a local simulator with synthetic load. Spins up mock providers, generates requests, and outputs metrics.
bake sim --chaosSame as test but with fault injection: randomly kill providers, spike load, degrade capacity. Prints a comparison of Backproto routing vs naive round-robin.
bake deployDeploy the recipe to Base Sepolia. Registers providers in CapacityRegistry, configures PricingCurve parameters, funds the EscrowBuffer.
bake fork <recipe-name>Clone an existing recipe from the bit.recipes registry into a local directory. Prompts for customization of provider endpoints and pricing parameters.
bake serveRun a deployed recipe as a live service. Starts an HTTP gateway that routes requests via the configured Backproto pipeline.
bake publishPublish a recipe to the bit.recipes public registry. Requires GitHub auth.
All commands accept a --json flag for programmatic use.