Bakery
Bakery is a prototype. Interfaces, defaults, and capabilities change frequently.
bakery is the developer-side CLI for inferlets. It wraps the Cargo / npm build, talks to the Pie registry, and produces packaged WASM artifacts.
For the end-to-end workflow narrative, see Your first inferlet (build) and Deploy and publish (publish). This page is the command reference.
Install
pip install pie-bakery
This installs the bakery command from PyPI. It also installs the published
Python inferlet SDK dependency used by Python builds.
When developing Bakery itself from a Pie checkout, use an editable install and
optionally set PIE_SDK so Bakery resolves SDK files from the checkout:
pip install -e sdk/tools/bakery
export PIE_SDK=/path/to/pie/sdk
Commands
bakery [COMMAND]
create Scaffold a new inferlet project
build Build a project (Rust, Python, JS/TS) to WASM
login Authenticate with the Pie Registry (GitHub OAuth)
inferlet Manage published inferlets (search / info / publish)
bakery create
bakery create my-inferlet # Rust template (default)
bakery create my-inferlet --ts # TypeScript template
bakery create my-inferlet -o ./out # custom output directory
The template lays down Cargo.toml (or package.json), Pie.toml, and a working lib.rs / index.ts against the current SDK.
bakery build
bakery build <input> -o <output.wasm> [--debug]
| Argument | Description |
|---|---|
<input> | Path to a project directory (Rust: contains Cargo.toml; Python: contains pyproject.toml or main.py; JS/TS: contains package.json) or a single .py, .js, or .ts file. |
-o, --output <FILE> | Where to write the .wasm. Required. |
--debug | Debug build (JS/TS only): includes source maps. |
bakery build ./my-rust-inferlet -o build/my-inferlet.wasm
bakery build ./my-py-inferlet -o build/my-inferlet.wasm
bakery build ./my-ts-inferlet -o build/my-inferlet.wasm
bakery build ./index.ts -o build/single-file.wasm
The platform is auto-detected from the input. For Rust projects Bakery runs
cargo build --target wasm32-wasip2 --release under the hood. Create the
parent directory for --output before building.
bakery login
bakery login
Opens a GitHub OAuth flow. The token is stored under ~/.pie/bakery/ by
default and used by bakery inferlet publish. Override the state directory
with BAKERY_HOME.
bakery inferlet
bakery inferlet
search <query> Search published inferlets
info <name> Show metadata for a published inferlet
publish <path> Publish a built inferlet directory
bakery inferlet search agent
bakery inferlet info text-completion
bakery inferlet publish ./my-inferlet
bakery inferlet publish reads Pie.toml, locates an existing .wasm (next to the manifest, or under target/wasm32-wasip2/release/), and uploads it with the manifest to the registry. It does not build. Run bakery build . -o <name>.wasm before publish.
Requirements
| Platform | What you need |
|---|---|
| Rust inferlets | cargo, rustup target add wasm32-wasip2 |
| Python inferlets | Python 3.10+, pure-Python dependencies only |
| JS / TS inferlets | Node.js v18+, npm/npx |
Related
- Your first inferlet: build a custom inferlet.
- Deploy and publish: publish to the registry.
pie run: running a built.wasmagainst a one-shot engine.