Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/artifacts/README.md
1# Cloudflare Artifacts23Store versioned file trees behind a repo-style interface that works from Workers, the REST API, and Git-compatible tooling.45## Overview67Use **Artifacts** when the thing you need to store is a versioned filesystem tree rather than a single object, key, or SQL row.89Typical Artifacts use cases:10- Git-style repositories11- Per-agent, per-session, or per-task repos12- Build outputs and deployment bundles13- Checkpoints and generated assets14- Shared file trees passed between developer tools and Workers1516Artifacts is a good fit when the same content needs to be addressable from **Workers**, the **REST API**, and **Git-compatible clients**.1718Artifacts is especially useful for agent and automation workflows where each unit of work should have its own isolated repo and token.1920**Prefer retrieval over memory** for current availability, authentication details, route shapes, limits, and pricing. Start at `https://developers.cloudflare.com/artifacts/`.2122## When to Use Artifacts2324| Need | Use | Why |25|------|-----|-----|26| Versioned file trees such as repos, build outputs, checkpoints, or generated assets | Artifacts | Artifacts stores and shares **versioned filesystem content** |27| A git-compatible workflow with `clone`, `fetch`, `pull`, or `push` | Artifacts | Artifacts exposes **git-over-HTTPS remotes** and repo-scoped tokens |28| The same artifact accessible from Workers, HTTP APIs, and developer tooling | Artifacts | Artifacts is available through a **Workers binding**, **REST API**, and **git-compatible interface** |29| Large files by object key, app config by key, or relational app data | R2, KV, or D1 | Use storage products directly when you need **objects, key-value entries, or SQL rows**, not versioned file trees |3031## Recommended Workflow3233- Create one repo per agent, session, user workspace, or task when work should stay isolated.34- Fork from a stable baseline when many repos need the same starter files or prompts.35- Use branches only when collaborators share the same lifecycle and need to work in one repo.36- Use namespaces to separate environments, teams, or high-rate workloads.3738## Quick Start3940**From a Worker:**4142```typescript43interface Env {44ARTIFACTS: Artifacts;45}4647const created = await env.ARTIFACTS.create("starter-repo");48// created.remote -> git remote URL49// created.token -> initial repo token50```5152**From the REST API:**5354Use the namespace-scoped Artifacts base URL plus a gateway JWT. For imports from existing HTTPS remotes, use the REST API rather than the Workers binding.5556## Reading Order5758| Task | Read |59|------|------|60| Decide whether Artifacts is the right product | README only |61| Create or manage repos from a Worker | README → configuration.md → api.md |62| Integrate Artifacts from an external system | README → api.md |63| Set up agent or sandbox workflows | README → configuration.md |64| Verify exact auth, routes, limits, or pricing | Live docs first: `https://developers.cloudflare.com/artifacts/` |6566## In This Reference6768- **[api.md](api.md)** - Workers binding methods, REST routes, token and repo operations69- **[configuration.md](configuration.md)** - Wrangler binding shape, Worker typing, REST configuration guidance7071## See Also7273- [Cloudflare Artifacts Docs](https://developers.cloudflare.com/artifacts/)74- [Artifacts Git Protocol Docs](https://developers.cloudflare.com/artifacts/api/git-protocol/)75- [ArtifactFS Docs](https://developers.cloudflare.com/artifacts/api/artifactfs/)76- [Cloudflare Workers Docs](https://developers.cloudflare.com/workers/)77- [Cloudflare Durable Objects Docs](https://developers.cloudflare.com/durable-objects/)78- [Cloudflare R2 Docs](https://developers.cloudflare.com/r2/)79- [Cloudflare D1 Docs](https://developers.cloudflare.com/d1/)80