alepha@docs:~/docs/packages/alepha$
cat containers.md | pretty1 min read
Last commit:
#Alepha - Containers
#Installation
Part of the alepha package. Import from alepha/containers.
npm install alepha
#Overview
Type-safe RPC clients for ephemeral containerized Alepha apps.
Features:
$container<T>()directive returns a typed Proxy onto a remote Alepha controller's$actionendpoints — the wire format is the samePOST /api/<method>shape served by every Alepha server.- Pluggable transport: Node (plain
fetchagainst a configured URL), Mock (in-process call viaLinkProvider.followfor tests), Cloudflare workerd (getContainer().fetch()through the Containers binding — seealepha/containersworkerd entry). - Build-time integration:
BuildCloudflareTask.enhanceContainersemits the matching wrangler bindings and Durable Object class declarations.
The Node binding is the "temporary, not perfect" path documented in
the spec — apps need to provide an explicit url per primitive
until a target=docker adapter ships.
#API Reference
#Primitives
$container—$container— typed RPC client to a containerized Alepha app.
#Providers
CloudflareContainerProvider— Cloudflare Workers (workerd) container provider.MockContainerProvider— In-process test provider.NodeContainerProvider— Node (dev / test / non-Cloudflare) container provider.