Skip to content

Commit c2c65aa

Browse files
committed
[Artifacts] finalize docs updates
1 parent 56975ac commit c2c65aa

9 files changed

Lines changed: 42 additions & 67 deletions

File tree

public/__redirects

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@
4040
/learning-paths/ /resources/ 301
4141
/markdown.zip /llms-full.txt 301
4242

43-
# artifacts
44-
/artifacts/api/artifactfs/ /artifacts/guides/artifact-fs/ 301
45-
4643
# changelog
4744
/changelog/rss.xml /changelog/rss/index.xml 301
4845
/api-shield/changelog/index.xml /changelog/rss/api-shield.xml 301

src/components/TypeScriptExample.astro

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@ const props = z
1414
playground: z.boolean().default(false),
1515
code: z.custom<ComponentProps<typeof Code>>().optional(),
1616
omitTabs: z.boolean().default(false),
17-
typescriptFirst: z.boolean().default(false),
1817
})
1918
.strict();
2019
21-
const { filename, playground, code, omitTabs, typescriptFirst } = props.parse(
22-
Astro.props,
23-
);
20+
const { filename, playground, code, omitTabs } = props.parse(Astro.props);
2421
2522
const slot = await Astro.slots.render("default");
2623
@@ -50,35 +47,16 @@ const Wrapper = omitTabs ? Fragment : Tabs;
5047
---
5148

5249
<Wrapper syncKey="workersExamples">
53-
{typescriptFirst ? (
54-
<>
55-
<TabItem label="TypeScript" icon="seti:typescript">
56-
<Code {...code} lang="ts" code={raw} title={filename} />
57-
</TabItem>
58-
<TabItem label="JavaScript" icon="seti:javascript">
59-
<Code
60-
{...code}
61-
lang="js"
62-
code={js}
63-
title={filename?.replace(".ts", ".js")}
64-
meta={playground ? "playground" : undefined}
65-
/>
66-
</TabItem>
67-
</>
68-
) : (
69-
<>
70-
<TabItem label="JavaScript" icon="seti:javascript">
71-
<Code
72-
{...code}
73-
lang="js"
74-
code={js}
75-
title={filename?.replace(".ts", ".js")}
76-
meta={playground ? "playground" : undefined}
77-
/>
78-
</TabItem>
79-
<TabItem label="TypeScript" icon="seti:typescript">
80-
<Code {...code} lang="ts" code={raw} title={filename} />
81-
</TabItem>
82-
</>
83-
)}
50+
<TabItem label="JavaScript" icon="seti:javascript">
51+
<Code
52+
{...code}
53+
lang="js"
54+
code={js}
55+
title={filename?.replace(".ts", ".js")}
56+
meta={playground ? "playground" : undefined}
57+
/>
58+
</TabItem>
59+
<TabItem label="TypeScript" icon="seti:typescript">
60+
<Code {...code} lang="ts" code={raw} title={filename} />
61+
</TabItem>
8462
</Wrapper>

src/content/changelog/artifacts/2026-04-16-artifacts-now-in-beta.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ products:
66
date: 2026-04-16
77
---
88

9-
[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.
9+
[Artifacts](/artifacts/) is now in private beta. Artifacts is Git-compatible storage built for scale: create tens of millions of repos, fork from any remote, and hand off a URL to any Git client. It provides a versioned filesystem for storing and exchanging file trees across Workers, the REST API, and any Git client, running locally or within an agent.
1010

11-
Use Artifacts to publish build outputs, sync repositories, and move files between tools without inventing a new packaging format.
11+
You can [read the announcement blog](https://blog.cloudflare.com/artifacts-git-for-agents-beta/) to learn more about what Artifacts does, how it works, and how it works.
1212

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

@@ -17,16 +17,16 @@ const created = await env.ARTIFACTS.create("starter-repo");
1717
const remote = (await created.repo.info())?.remote;
1818
```
1919

20-
You can use the REST API to create a repo inside a namespace:
20+
Or, use the REST API to create a repo inside a namespace from your agent(s) running on any platform:
2121

2222
```bash
23-
curl --request POST "https://artifacts.cloudflare.net/v1/api/namespaces/starter-namespace/repos" --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" --header "Content-Type: application/json" --data '{"name":"starter-repo"}'
23+
curl --request POST "https://artifacts.cloudflare.net/v1/api/namespaces/some-namespace/repos" --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" --header "Content-Type: application/json" --data '{"name":"agent-007"}'
2424
```
2525

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

2828
```bash
29-
git clone "$ARTIFACTS_AUTH_REMOTE"
29+
git clone https://x:${REPO_TOKEN}@artifacts.cloudflare.net/some-namespace/agent-007.git
3030
```
3131

32-
For more information, refer to [Get started](/artifacts/get-started/), [Workers binding](/artifacts/api/workers-binding/), and [Git protocol](/artifacts/api/git-protocol/).
32+
To learn more, refer to [Get started](/artifacts/get-started/), [Workers binding](/artifacts/api/workers-binding/), and [Git protocol](/artifacts/api/git-protocol/).

src/content/docs/artifacts/api/rest-api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Returned repo tokens are secrets. Do not log them or store them in long-lived re
4646

4747
## Shared types
4848

49-
<TypeScriptExample typescriptFirst={true}>
49+
<TypeScriptExample>
5050

5151
```ts
5252
export type NamespaceName = string;
@@ -206,7 +206,7 @@ Query parameters:
206206

207207
Response type:
208208

209-
<TypeScriptExample typescriptFirst={true}>
209+
<TypeScriptExample>
210210

211211
```ts
212212
export interface ListReposQuery {

src/content/docs/artifacts/api/workers-binding.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace = "default"
3737

3838
After you run `npx wrangler types`, your Worker environment looks like this:
3939

40-
<TypeScriptExample typescriptFirst={true}>
40+
<TypeScriptExample>
4141

4242
```ts
4343
export interface Env {
@@ -63,7 +63,7 @@ Use namespace methods on `env.ARTIFACTS` to create, list, inspect, or delete rep
6363
- `opts.setDefaultBranch` <Type text="string" /> <MetaInfo text="optional" />
6464
- Returns <Type text="Promise<ArtifactsCreateRepoResult & { repo: ArtifactsRepo } >" />
6565

66-
<TypeScriptExample typescriptFirst={true}>
66+
<TypeScriptExample>
6767

6868
```ts
6969
async function createRepo(artifacts: Artifacts) {
@@ -89,7 +89,7 @@ async function createRepo(artifacts: Artifacts) {
8989
- `name` <Type text="RepoName" /> <MetaInfo text="required" />
9090
- Returns <Type text="Promise<ArtifactsRepo | null>" />
9191

92-
<TypeScriptExample typescriptFirst={true}>
92+
<TypeScriptExample>
9393

9494
```ts
9595
async function getRepoHandle(artifacts: Artifacts) {
@@ -111,7 +111,7 @@ async function getRepoHandle(artifacts: Artifacts) {
111111
- `opts.cursor` <Type text="Cursor" /> <MetaInfo text="optional" />
112112
- Returns <Type text="Promise<ArtifactsRepoListResult>" />
113113

114-
<TypeScriptExample typescriptFirst={true}>
114+
<TypeScriptExample>
115115

116116
```ts
117117
async function listRepos(artifacts: Artifacts) {
@@ -131,7 +131,7 @@ async function listRepos(artifacts: Artifacts) {
131131
- `name` <Type text="RepoName" /> <MetaInfo text="required" />
132132
- Returns <Type text="Promise<boolean>" />
133133

134-
<TypeScriptExample typescriptFirst={true}>
134+
<TypeScriptExample>
135135

136136
```ts
137137
async function deleteRepo(artifacts: Artifacts) {
@@ -153,7 +153,7 @@ These examples match the current runtime binding surface. If your generated type
153153

154154
Use `info()` when you need repo metadata, including the remote URL.
155155

156-
<TypeScriptExample typescriptFirst={true}>
156+
<TypeScriptExample>
157157

158158
```ts
159159
async function getRemoteUrl(artifacts: Artifacts) {
@@ -175,7 +175,7 @@ async function getRemoteUrl(artifacts: Artifacts) {
175175
- `ttl` <Type text="number" /> <MetaInfo text="optional (seconds)" />
176176
- Returns <Type text="Promise<ArtifactsCreateTokenResult>" />
177177

178-
<TypeScriptExample typescriptFirst={true}>
178+
<TypeScriptExample>
179179

180180
```ts
181181
async function mintReadToken(artifacts: Artifacts) {
@@ -195,7 +195,7 @@ async function mintReadToken(artifacts: Artifacts) {
195195
- `token` <Type text="ArtifactToken" /> <MetaInfo text="required" />
196196
- Returns <Type text="Promise<ArtifactsTokenValidation>" />
197197

198-
<TypeScriptExample typescriptFirst={true}>
198+
<TypeScriptExample>
199199

200200
```ts
201201
async function validateToken(artifacts: Artifacts, token: string) {
@@ -214,7 +214,7 @@ async function validateToken(artifacts: Artifacts, token: string) {
214214

215215
- Returns <Type text="Promise<ArtifactsTokenListResult>" />
216216

217-
<TypeScriptExample typescriptFirst={true}>
217+
<TypeScriptExample>
218218

219219
```ts
220220
async function listRepoTokens(artifacts: Artifacts) {
@@ -238,7 +238,7 @@ async function listRepoTokens(artifacts: Artifacts) {
238238
- `tokenOrId` <Type text="string" /> <MetaInfo text="required" />
239239
- Returns <Type text="Promise<boolean>" />
240240

241-
<TypeScriptExample typescriptFirst={true}>
241+
<TypeScriptExample>
242242

243243
```ts
244244
async function revokeToken(artifacts: Artifacts, tokenOrId: string) {
@@ -261,7 +261,7 @@ async function revokeToken(artifacts: Artifacts, tokenOrId: string) {
261261
- `opts.defaultBranchOnly` <Type text="boolean" /> <MetaInfo text="optional" />
262262
- Returns <Type text="Promise<ArtifactsCreateRepoResult>" />
263263

264-
<TypeScriptExample typescriptFirst={true}>
264+
<TypeScriptExample>
265265

266266
```ts
267267
async function forkRepo(artifacts: Artifacts) {
@@ -286,7 +286,7 @@ async function forkRepo(artifacts: Artifacts) {
286286

287287
This example combines the binding methods in one Worker route.
288288

289-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
289+
<TypeScriptExample filename="src/index.ts">
290290

291291
```ts
292292
interface Env {

src/content/docs/artifacts/concepts/best-practices.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Include stable identifiers in the repo name, such as the agent name, session ID,
3636

3737
This example creates a unique repo name before creating the repo.
3838

39-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
39+
<TypeScriptExample filename="src/index.ts">
4040

4141
```ts
4242
interface Env {
@@ -65,7 +65,7 @@ This keeps your starting point consistent and makes downstream diffs easier to r
6565

6666
This example forks a reviewed baseline repo into a session-specific repo.
6767

68-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
68+
<TypeScriptExample filename="src/index.ts">
6969

7070
```ts
7171
interface Env {
@@ -105,7 +105,7 @@ This example uses the [Workers binding](/artifacts/api/workers-binding/) to mint
105105

106106
Assume the caller is already authenticated and authorized before this route returns a token.
107107

108-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
108+
<TypeScriptExample filename="src/index.ts">
109109

110110
```ts
111111
interface Env {

src/content/docs/artifacts/examples/isomorphic-git.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Use this as a reference for the end-to-end flow. In a production Worker, look up
2828
This example omits authentication so it can focus on the Git flow. In production, authorize the caller before creating repos or granting write capability.
2929
:::
3030

31-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
31+
<TypeScriptExample filename="src/index.ts">
3232

3333
```ts
3434
import git from "isomorphic-git";
@@ -102,7 +102,7 @@ export default {
102102

103103
Use this helper with `isomorphic-git` in Workers when you need a short-lived working tree in memory.
104104

105-
<TypeScriptExample filename="src/memory-fs.ts" typescriptFirst={true}>
105+
<TypeScriptExample filename="src/memory-fs.ts">
106106

107107
```ts
108108
type Entry =

src/content/docs/artifacts/examples/sandbox-sdk-artifacts.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cd repo-per-sandbox
3434

3535
The template keeps one Artifacts repo per sandbox ID:
3636

37-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
37+
<TypeScriptExample filename="src/index.ts">
3838

3939
```ts
4040
const repo = await env.ARTIFACTS.get(sandboxId);
@@ -67,7 +67,7 @@ if (repo) {
6767

6868
Use the same ID for the sandbox:
6969

70-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
70+
<TypeScriptExample filename="src/index.ts">
7171

7272
```ts
7373
import { getSandbox } from "@cloudflare/sandbox";
@@ -83,7 +83,7 @@ Convert the write token into an authenticated Git remote, then store it as an en
8383

8484
Use a short-lived token and pass it into the sandbox only after the sandbox session is authorized to push changes.
8585

86-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
86+
<TypeScriptExample filename="src/index.ts">
8787

8888
```ts
8989
function toAuthenticatedRemote(remote: string, token: string) {

src/content/docs/artifacts/get-started/workers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Wrangler adds an `Artifacts` type to your generated `worker-configuration.d.ts`
9898

9999
Replace `src/index.ts` with the following code:
100100

101-
<TypeScriptExample filename="src/index.ts" typescriptFirst={true}>
101+
<TypeScriptExample filename="src/index.ts">
102102

103103
```ts
104104
interface Env {

0 commit comments

Comments
 (0)