Use Artifacts in a real application path
Artifacts bindings let Workers create and manage Git-compatible repos and repo tokens.
A compact Artifacts recipe with config and worker usage in one application path.
Use this as the copyable starter before threading the feature into a larger application.
- Config focus
- bindings.artifacts
- Runtime shape
- Best use
- Worker-managed repo metadata, temporary tokens, and artifact namespace workflows
Start by wiring the binding clearly in config
Smallest Artifacts config
Build the application flow around the binding
Treat this as the app-level Artifacts path: the route, event handler, or service module receives a real request and uses the binding to do useful work.
Keep product limits, remote ownership, and fallback behavior visible in the code around the binding instead of hiding everything behind a vague utility too early.
- Keep the first example short enough to paste into a new Worker.
- Cloudflare owns real Git protocol, durable namespace storage, permissions, and remote URLs.
Create one Artifacts repository
Keep production boundaries visible
- Config focus: bindings.artifacts.
- Runtime shape: .
- Best use: Worker-managed repo metadata, temporary tokens, and artifact namespace workflows.
Thread this into the next recipe
Once this smallest path works, add routing, generated types, and feature-specific abstraction in that order.
Previous
Testing Artifacts
Test Artifacts by choosing the local harness that matches the product boundary instead of reaching for Cloudflare by default.
Next
Containers
Add the Containers config, call Container class config plus a Durable Object container binding from worker code, and start with the local test path Devflare supports.