Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9c01815
[Artifacts] add docs scaffold
elithrar Apr 7, 2026
4030603
[Artifacts] add get-started guides
elithrar Apr 7, 2026
7588077
[Artifacts] add API references and pricing
elithrar Apr 13, 2026
e95664d
[Artifacts] add CODEOWNERS entry
elithrar Apr 13, 2026
f4625ef
[Artifacts] fix pricing copy
elithrar Apr 13, 2026
8874f4f
[Artifacts] expand beta changelog entry
elithrar Apr 13, 2026
5fb0e7a
[Artifacts] align binding and git docs
elithrar Apr 13, 2026
961bb19
[Artifacts] correct REST and git endpoints
elithrar Apr 13, 2026
fa17331
[Artifacts] fix workers remote example
elithrar Apr 13, 2026
3c6e9fc
[Artifacts] clarify import URL behavior
elithrar Apr 13, 2026
9f6d38f
[Artifacts] remove authenticated remotes page
elithrar Apr 13, 2026
8e5daa0
[Artifacts] expand metrics and limits docs
elithrar Apr 13, 2026
528a622
[Artifacts] expand git and platform docs
elithrar Apr 14, 2026
97c7694
[Artifacts] clarify Git protocol docs
elithrar Apr 14, 2026
351a852
[Artifacts] refresh ArtifactFS and examples
elithrar Apr 15, 2026
2350b19
[Artifacts] update pricing and limits docs
elithrar Apr 15, 2026
02dc697
[Artifacts] flesh out Sandbox SDK example
elithrar Apr 15, 2026
9ea0a33
[Artifacts] align docs to updated schema
elithrar Apr 15, 2026
bff1f17
[Artifacts] clarify Sandbox SDK intro
elithrar Apr 15, 2026
a9954c2
[Artifacts] trim Sandbox SDK example
elithrar Apr 15, 2026
62b7a98
[Artifacts] strengthen overview
elithrar Apr 15, 2026
b230e03
[Artifacts] fix binding docs
elithrar Apr 15, 2026
e13b475
update
elithrar Apr 15, 2026
5605a1c
[Artifacts] align docs with current runtime
elithrar Apr 15, 2026
af22809
[Artifacts] tighten docs examples
elithrar Apr 16, 2026
0abf27a
[Artifacts] clarify REST API auth
elithrar Apr 16, 2026
f30a7a3
[Artifacts] improve get started guides
elithrar Apr 16, 2026
0e01728
[Artifacts] address review nits
elithrar Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ package.json @cloudflare/content-engineering

# Developer Platform

/src/content/docs/artifacts/ @elithrar @dmmulroy @mattzcarey @whoiskatrin @cloudflare/pcx-technical-writing @cloudflare/product-owners
/src/content/docs/containers/ @mikenomitch @th0m @cloudflare/pcx-technical-writing @cloudflare/product-owners @cloudflare/cloudchamber
/src/content/partials/containers/ @mikenomitch @th0m @cloudflare/pcx-technical-writing @cloudflare/product-owners @cloudflare/cloudchamber
/src/content/docs/d1/ @elithrar @rozenmd @vy-ton @joshthoward @oxyjun @harshil1712 @cloudflare/pcx-technical-writing @cloudflare/product-owners
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 35 additions & 13 deletions src/components/TypeScriptExample.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ const props = z
playground: z.boolean().default(false),
code: z.custom<ComponentProps<typeof Code>>().optional(),
omitTabs: z.boolean().default(false),
typescriptFirst: z.boolean().default(false),
})
.strict();

const { filename, playground, code, omitTabs } = props.parse(Astro.props);
const { filename, playground, code, omitTabs, typescriptFirst } = props.parse(
Astro.props,
);

const slot = await Astro.slots.render("default");

Expand Down Expand Up @@ -47,16 +50,35 @@ const Wrapper = omitTabs ? Fragment : Tabs;
---

<Wrapper syncKey="workersExamples">
<TabItem label="JavaScript" icon="seti:javascript">
<Code
{...code}
lang="js"
code={js}
title={filename?.replace(".ts", ".js")}
meta={playground ? "playground" : undefined}
/>
</TabItem>
<TabItem label="TypeScript" icon="seti:typescript">
<Code {...code} lang="ts" code={raw} title={filename} />
</TabItem>
{typescriptFirst ? (
<>
<TabItem label="TypeScript" icon="seti:typescript">
<Code {...code} lang="ts" code={raw} title={filename} />
</TabItem>
<TabItem label="JavaScript" icon="seti:javascript">
<Code
{...code}
lang="js"
code={js}
title={filename?.replace(".ts", ".js")}
meta={playground ? "playground" : undefined}
/>
</TabItem>
</>
) : (
<>
<TabItem label="JavaScript" icon="seti:javascript">
<Code
{...code}
lang="js"
code={js}
title={filename?.replace(".ts", ".js")}
meta={playground ? "playground" : undefined}
/>
</TabItem>
<TabItem label="TypeScript" icon="seti:typescript">
<Code {...code} lang="ts" code={raw} title={filename} />
</TabItem>
</>
)}
</Wrapper>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "Artifacts now in beta: versioned filesystem that can speak git"
description: Artifacts is now available in beta as a versioned filesystem for Workers, APIs, and git-compatible workflows.
products:
- artifacts
date: 2026-04-16
---

[Artifacts](/artifacts/) is now in beta. It provides a versioned filesystem for storing and exchanging file trees across Workers, the REST API, and git-compatible clients.

Use Artifacts to publish build outputs, sync repositories, and move files between tools without inventing a new packaging format.

You can use the Workers binding to create a repo and read back its remote URL:

```ts
const created = await env.ARTIFACTS.create("starter-repo");
const remote = (await created.repo.info())?.remote;
```

You can use the REST API to create a namespace, then create a repo inside it:

```bash
curl "https://api.cloudflare.com/client/v4/accounts/${ARTIFACTS_ACCOUNT_ID}/artifacts/namespaces" --header "Authorization: Bearer $ARTIFACTS_JWT" --header "Content-Type: application/json" --data '{"name":"starter-namespace"}'
curl "https://api.cloudflare.com/client/v4/accounts/${ARTIFACTS_ACCOUNT_ID}/artifacts/namespaces/starter-namespace/repos" --header "Authorization: Bearer $ARTIFACTS_JWT" --header "Content-Type: application/json" --data '{"name":"starter-repo"}'
```

Any Git client that speaks smart HTTP can use the returned remote URL:

```bash
git clone "$ARTIFACTS_AUTH_REMOTE"
```

For more information, refer to [Get started](/artifacts/get-started/), [Workers binding](/artifacts/api/workers-binding/), and [Git protocol](/artifacts/api/git-protocol/).
12 changes: 12 additions & 0 deletions src/content/directory/artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
id: a9X2kP
name: Artifacts

entry:
title: Artifacts
url: /artifacts/
group: Developer platform

meta:
title: Cloudflare Artifacts docs
description: Store, version, and share filesystem artifacts across Workers, APIs, and git-compatible tools
author: "@cloudflare"
63 changes: 63 additions & 0 deletions src/content/docs/artifacts/api/artifactfs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: ArtifactFS
description: Mount large repos without full clones.
pcx_content_type: reference
sidebar:
order: 4
---

ArtifactFS mounts a Git repository as a local filesystem without waiting for a full clone.

It exposes the full tree quickly, then hydrates file contents on demand and in the background as tools read them. This reduces startup time for large repositories.

ArtifactFS works with [Artifacts Git remotes](/artifacts/api/git-protocol/) and other Git repositories.

## When to use

Use ArtifactFS when startup time matters more than a complete local clone. It is most useful for large, multi-gigabyte repos in sandboxes, containers, and virtual machines.

For smaller repos below about `1 GB`, use a regular `git clone`. It is simpler and usually fast enough without a FUSE mount.

ArtifactFS becomes more useful as repos get larger or contain very large object counts.

## How it works

ArtifactFS starts with a blobless clone. It fetches commits, trees, and refs, but does not download file contents up front.

The daemon then mounts the repo through FUSE and exposes the full tree almost immediately. File contents hydrate asynchronously in the background as tools or agents read them.

Reads only block when a requested blob is not hydrated yet. Once hydrated, ArtifactFS serves that file from its local blob cache.

## File hydration algorithm

ArtifactFS prioritizes files that unblock agents first. That includes package and dependency manifests such as `package.json`, `go.mod`, `go.sum`, `Cargo.toml`, `pyproject.toml`, and `pnpm-lock.yaml`.

It also boosts common bootstrap files such as `README.md`, `LICENSE`, `Makefile`, and `.gitignore`, then code and structured text files such as `.ts`, `.js`, `.py`, `.go`, `.json`, `.yaml`, and `.md`.

Large binary assets such as images, archives, videos, and PDFs are deprioritized. When a tool opens a directory, ArtifactFS can also prefetch nearby sibling files using the same priority rules.

These heuristics are intentionally simple. They focus on getting likely-to-be-read text and code in front of agents before large binary blobs.

## Example

The following example installs ArtifactFS, registers a public repo, starts the daemon, and reads files from the mounted working tree.

```sh
go install github.com/cloudflare/artifact-fs/cmd/artifact-fs@latest

export ARTIFACT_FS_ROOT=/tmp/artifact-fs-test

artifact-fs add-repo \
--name workers-sdk \
--remote https://github.com/cloudflare/workers-sdk.git \
--branch main \
--mount-root /tmp

artifact-fs daemon --root /tmp &

ls /tmp/workers-sdk/
cat /tmp/workers-sdk/README.md
git -C /tmp/workers-sdk log --oneline -5
```

This example assumes you already have a working FUSE implementation on the host. For Artifacts-backed repos, replace the GitHub remote with your Artifacts remote URL.
75 changes: 75 additions & 0 deletions src/content/docs/artifacts/api/git-protocol.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Git protocol
description: Use Artifacts with standard git-over-HTTPS clients.
pcx_content_type: reference
sidebar:
order: 3
---

Artifacts exposes Git access for every Artifacts repository.

Each repo has a standard Git smart HTTP remote at `https://{accountId}.artifacts.cloudflare.net/git/{namespace}/{repo}.git`.

Use the returned repo `remote` with a regular Git client for `clone`, `fetch`, `pull`, and `push`.

## Authentication

Git routes accept repo access tokens in two forms:

| Format | Details | Example |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Bearer token in `http.extraHeader` | Recommended for local workflows. Use the full token string returned by the control plane and keep credentials out of the remote URL. | `git -c http.extraHeader="Authorization: Bearer $ARTIFACTS_TOKEN" clone "$ARTIFACTS_REMOTE" artifacts-clone` |
| HTTP Basic auth in the remote URL | Use for short-lived, one-off commands when you need a self-contained remote. Put the token secret in the password slot. | `https://x:<token-secret>@<accountId>.artifacts.cloudflare.net/git/<namespace>/<repo>.git` |

### Token format

Repo tokens are issued in the control-plane response format `art_v1_<40 hex>?expires=<unix_seconds>`.

### Git `extraHeader` parameter

Git's [`http.extraHeader`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpextraHeader) setting lets you attach an HTTP header to git requests.

If you want to use the full token string returned by the API, pass it as a Bearer token:

```sh
git -c http.extraHeader="Authorization: Bearer $ARTIFACTS_TOKEN" clone "$ARTIFACTS_REMOTE" artifacts-clone
```

### HTTPS remote with Basic auth

For the URL form, use the token secret in the password slot. Artifacts ignores the Basic auth username.

Use this form only when you need a self-contained remote URL for a short-lived command.

```sh
export ARTIFACTS_TOKEN_SECRET="${ARTIFACTS_TOKEN%%\?expires=*}"
export ARTIFACTS_AUTH_REMOTE="https://x:${ARTIFACTS_TOKEN_SECRET}@${ARTIFACTS_REMOTE#https://}"
```

```sh
git clone "$ARTIFACTS_AUTH_REMOTE" artifacts-clone
```

```sh
git push "$ARTIFACTS_AUTH_REMOTE" HEAD:main
```

Use any non-empty username in the URL. Artifacts accepts that username but does not otherwise use or log it, so `x` is just a placeholder.

## Protocol support

Artifacts supports Git protocol v1 and v2 for clone and fetch. Git clients negotiate the protocol automatically.

| Operation | Git service | Protocol support | Notes |
| --------------------------------- | ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Clone and fetch | `git-upload-pack` | v1 and v2 | Protocol v2 supports `ls-refs` and `fetch`. Protocol v1 supports normal fetch flows, including shallow and deepen fetches. |
| Push | `git-receive-pack` | v1 | Push uses the standard v1 receive-pack flow. |
| Push over protocol v2 | `git-receive-pack` | Not supported | Artifacts does not support v2 receive-pack. |
| Optional protocol v1 capabilities | `git-upload-pack` | Partial | Some optional v1 capabilities, such as `filter` and `include-tag`, are not supported. |

## Token scopes

| Scope | Commands | Notes |
| ------- | ------------------------------------------------ | ------------------------------------------------------- |
| `read` | `git clone`, `git fetch`, `git pull` | Use for read-only access. |
| `write` | `git clone`, `git fetch`, `git pull`, `git push` | `git push` mutates the repo and requires a write token. |
15 changes: 15 additions & 0 deletions src/content/docs/artifacts/api/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: API
description: Reference the Artifacts Workers binding, REST API, and filesystem interfaces.
pcx_content_type: navigation
sidebar:
order: 4
group:
hideIndex: true
---

import { DirectoryListing } from "~/components";

Use the Artifacts API reference to understand the interfaces exposed across Workers, HTTP, git-compatible workflows, and filesystem access.

<DirectoryListing />
Loading
Loading