-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Artifacts] Add Wrangler commands documentation #30827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dinasaur404
wants to merge
4
commits into
production
Choose a base branch
from
artifacts-wrangler-commands
base: production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c326d80
[Artifacts] Add Wrangler commands documentation and changelog
dinasaur404 fca5ddf
Update 2026-05-15-wrangler-support.mdx
dinasaur404 58351bd
Bump wrangler to 4.92.0, switch to WranglerNamespace
dinasaur404 eed7c59
Switch workers commands page to WranglerNamespace, drop partial
dinasaur404 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/content/changelog/artifacts/2026-05-15-wrangler-support.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| title: Wrangler support for Artifacts | ||
| description: Manage Artifacts namespaces, repositories, and repo-scoped tokens from the command line using Wrangler. | ||
| products: | ||
| - artifacts | ||
| date: 2026-05-15 | ||
| --- | ||
|
|
||
| You can now manage [Artifacts](/artifacts/) namespaces, repositories, and repo-scoped tokens directly from Wrangler. | ||
|
|
||
| Available commands: | ||
|
|
||
| - `wrangler artifacts namespaces list` — List Artifacts namespaces in your account. | ||
| - `wrangler artifacts namespaces get` — Get metadata for a namespace. | ||
| - `wrangler artifacts repos create` — Create a repo in a namespace. | ||
| - `wrangler artifacts repos list` — List repos in a namespace. | ||
| - `wrangler artifacts repos get` — Get metadata for a repo. | ||
| - `wrangler artifacts repos delete` — Delete a repo. | ||
| - `wrangler artifacts repos issue-token` — Issue a repo-scoped token for Git access. | ||
|
|
||
| To get started, refer to the [Wrangler Artifacts commands documentation](/workers/wrangler/commands/artifacts/). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| pcx_content_type: reference | ||
| title: Wrangler commands | ||
| sidebar: | ||
| order: 3 | ||
| description: Manage Artifacts namespaces, repositories, and repo tokens from the command line using Wrangler. | ||
| products: | ||
| - artifacts | ||
| --- | ||
|
|
||
| import { Render } from "~/components"; | ||
|
|
||
| Use `wrangler artifacts` commands to manage Artifacts namespaces, repositories, and repo-scoped tokens from the command line. | ||
|
dinasaur404 marked this conversation as resolved.
|
||
|
|
||
| <Render file="wrangler-commands/artifacts" product="workers" /> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| pcx_content_type: reference | ||
| title: Artifacts | ||
| description: Manage Artifacts namespaces, repositories, and repo-scoped tokens using Wrangler. | ||
| products: | ||
| - workers | ||
| --- | ||
|
|
||
| import { Render, InlineBadge } from "~/components"; | ||
|
|
||
| Manage [Artifacts](/artifacts/) namespaces, repositories, and repo-scoped tokens using Wrangler. <InlineBadge text="Private beta" variant="caution" /> | ||
|
|
||
| :::note | ||
| Requires Wrangler version `4.91.0` or later. | ||
| ::: | ||
|
|
||
| All `artifacts` commands support `--json` for machine-readable output. Commands that return tokens use a secret-safe output path so credentials are not persisted to Wrangler debug logs. | ||
|
|
||
| <Render file="wrangler-commands/artifacts" product="workers" /> |
170 changes: 170 additions & 0 deletions
170
src/content/partials/workers/wrangler-commands/artifacts.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| --- | ||
| {} | ||
| --- | ||
|
|
||
| import { AnchorHeading, Type, MetaInfo } from "~/components"; | ||
|
|
||
| ## `artifacts namespaces` | ||
|
|
||
| Manage Artifacts namespaces. | ||
|
|
||
| <AnchorHeading title="`namespaces list`" slug="artifacts-namespaces-list" depth={3} /> | ||
|
|
||
| List Artifacts namespaces in your account. | ||
|
|
||
| ```txt | ||
| wrangler artifacts namespaces list [OPTIONS] | ||
| ``` | ||
|
|
||
| - `--json` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Return output as JSON. | ||
| - Default: false | ||
|
|
||
| <AnchorHeading title="`namespaces get`" slug="artifacts-namespaces-get" depth={3} /> | ||
|
|
||
| Get details for an Artifacts namespace. | ||
|
|
||
| ```txt | ||
| wrangler artifacts namespaces get <NAME> [OPTIONS] | ||
| ``` | ||
|
|
||
| - `NAME` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The name of the Artifacts namespace. | ||
| - `--json` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Return output as JSON. | ||
| - Default: false | ||
|
|
||
| ## `artifacts repos` | ||
|
|
||
| Manage Artifacts repositories within a namespace. | ||
|
|
||
| <AnchorHeading title="`repos create`" slug="artifacts-repos-create" depth={3} /> | ||
|
|
||
| Create a new Artifacts repository. Returns the repo details and an initial repo-scoped token. | ||
|
|
||
| ```txt | ||
| wrangler artifacts repos create <NAME> --namespace <NAMESPACE> [OPTIONS] | ||
| ``` | ||
|
|
||
| - `NAME` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The name of the repository to create. | ||
| - `--namespace` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The Artifacts namespace to create the repository in. | ||
| - `--description` <Type text="string" /> <MetaInfo text="optional" /> | ||
| - An optional description for the repository. | ||
| - `--default-branch` <Type text="string" /> <MetaInfo text="optional" /> | ||
| - The default branch for the repository. | ||
| - `--read-only` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Create the repository as read-only. | ||
| - `--json` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Return output as JSON. | ||
| - Default: false | ||
|
|
||
| For example, to create a new repository: | ||
|
|
||
| ```sh | ||
| npx wrangler artifacts repos create starter-repo --namespace sandbox | ||
| ``` | ||
|
|
||
| ```sh output | ||
| ✨ Created Artifacts repo "starter-repo" in namespace "sandbox" | ||
|
|
||
| id: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | ||
| name: starter-repo | ||
| default_branch: main | ||
| read_only: false | ||
| remote: https://0123456789abcdef.artifacts.cloudflare.net/sandbox/starter-repo | ||
| token: artifacts:v1:repo:... | ||
| ``` | ||
|
|
||
| :::note | ||
| The returned `token` is a secret. Wrangler uses a secret-safe output path for this value so it is not persisted to debug logs. Store it securely. | ||
| ::: | ||
|
|
||
| <AnchorHeading title="`repos list`" slug="artifacts-repos-list" depth={3} /> | ||
|
|
||
| List Artifacts repositories in a namespace. | ||
|
|
||
| ```txt | ||
| wrangler artifacts repos list --namespace <NAMESPACE> [OPTIONS] | ||
| ``` | ||
|
|
||
| - `--namespace` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The Artifacts namespace to list repositories from. | ||
| - `--json` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Return output as JSON. | ||
| - Default: false | ||
|
|
||
| <AnchorHeading title="`repos get`" slug="artifacts-repos-get" depth={3} /> | ||
|
|
||
| Get details for an Artifacts repository. | ||
|
|
||
| ```txt | ||
| wrangler artifacts repos get <NAME> --namespace <NAMESPACE> [OPTIONS] | ||
| ``` | ||
|
|
||
| - `NAME` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The name of the repository. | ||
| - `--namespace` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The Artifacts namespace. | ||
| - `--json` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Return output as JSON. | ||
| - Default: false | ||
|
|
||
| <AnchorHeading title="`repos delete`" slug="artifacts-repos-delete" depth={3} /> | ||
|
|
||
| Delete an Artifacts repository. Prompts for confirmation unless `--force` is passed. | ||
|
|
||
| ```txt | ||
| wrangler artifacts repos delete <NAME> --namespace <NAMESPACE> [OPTIONS] | ||
| ``` | ||
|
|
||
| - `NAME` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The name of the repository to delete. | ||
| - `--namespace` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The Artifacts namespace. | ||
| - `--force, -y` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Skip the interactive deletion confirmation prompt. | ||
| - Default: false | ||
| - `--json` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Return output as JSON. | ||
| - Default: false | ||
|
|
||
| <AnchorHeading title="`repos issue-token`" slug="artifacts-repos-issue-token" depth={3} /> | ||
|
|
||
| Issue a repo-scoped token for authenticating Git operations against an Artifacts repository. | ||
|
|
||
| ```txt | ||
| wrangler artifacts repos issue-token <REPO> --namespace <NAMESPACE> [OPTIONS] | ||
| ``` | ||
|
|
||
| - `REPO` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The name of the repository to issue a token for. | ||
| - `--namespace` <Type text="string" /> <MetaInfo text="required" /> | ||
| - The Artifacts namespace. | ||
| - `--scope` <Type text="string" /> <MetaInfo text="optional" /> | ||
| - The token scope. Accepted values: `read`, `write`. | ||
| - `--ttl` <Type text="number" /> <MetaInfo text="optional" /> | ||
| - The token time-to-live in seconds. Must be greater than 0. | ||
| - `--json` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
| - Return output as JSON. | ||
| - Default: false | ||
|
|
||
| For example, to issue a read-scoped token: | ||
|
|
||
| ```sh | ||
| npx wrangler artifacts repos issue-token starter-repo --namespace sandbox --scope read | ||
| ``` | ||
|
|
||
| ```sh output | ||
| ✨ Issued Artifacts repo token for "starter-repo" in namespace "sandbox" | ||
|
|
||
| id: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | ||
| scope: read | ||
| expires_at: 2026-05-15T12:00:00Z | ||
| plaintext: artifacts:v1:repo:... | ||
| ``` | ||
|
|
||
| :::note | ||
| The returned `plaintext` token is a secret. Use it as the password when authenticating Git operations against the repo `remote`. For more information, refer to [Authentication](/artifacts/guides/authentication/). | ||
| ::: |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is wrangler