|
| 1 | +--- |
| 2 | +{} |
| 3 | +--- |
| 4 | + |
| 5 | +import { Render, AnchorHeading, Type, MetaInfo } from "~/components"; |
| 6 | + |
| 7 | +## `artifacts namespaces` |
| 8 | + |
| 9 | +Manage Artifacts namespaces. |
| 10 | + |
| 11 | +<AnchorHeading title="`namespaces list`" slug="artifacts-namespaces-list" depth={3} /> |
| 12 | + |
| 13 | +List Artifacts namespaces in your account. |
| 14 | + |
| 15 | +```txt |
| 16 | +wrangler artifacts namespaces list [OPTIONS] |
| 17 | +``` |
| 18 | + |
| 19 | +- `--json` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 20 | + - Return output as JSON. |
| 21 | + - Default: false |
| 22 | + |
| 23 | +<AnchorHeading title="`namespaces get`" slug="artifacts-namespaces-get" depth={3} /> |
| 24 | + |
| 25 | +Get details for an Artifacts namespace. |
| 26 | + |
| 27 | +```txt |
| 28 | +wrangler artifacts namespaces get <NAME> [OPTIONS] |
| 29 | +``` |
| 30 | + |
| 31 | +- `NAME` <Type text="string" /> <MetaInfo text="required" /> |
| 32 | + - The name of the Artifacts namespace. |
| 33 | +- `--json` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 34 | + - Return output as JSON. |
| 35 | + - Default: false |
| 36 | + |
| 37 | +## `artifacts repos` |
| 38 | + |
| 39 | +Manage Artifacts repositories within a namespace. |
| 40 | + |
| 41 | +<AnchorHeading title="`repos create`" slug="artifacts-repos-create" depth={3} /> |
| 42 | + |
| 43 | +Create a new Artifacts repository. Returns the repo details and an initial repo-scoped token. |
| 44 | + |
| 45 | +```txt |
| 46 | +wrangler artifacts repos create <NAME> --namespace <NAMESPACE> [OPTIONS] |
| 47 | +``` |
| 48 | + |
| 49 | +- `NAME` <Type text="string" /> <MetaInfo text="required" /> |
| 50 | + - The name of the repository to create. |
| 51 | +- `--namespace` <Type text="string" /> <MetaInfo text="required" /> |
| 52 | + - The Artifacts namespace to create the repository in. |
| 53 | +- `--description` <Type text="string" /> <MetaInfo text="optional" /> |
| 54 | + - An optional description for the repository. |
| 55 | +- `--default-branch` <Type text="string" /> <MetaInfo text="optional" /> |
| 56 | + - The default branch for the repository. |
| 57 | +- `--read-only` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 58 | + - Create the repository as read-only. |
| 59 | +- `--json` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 60 | + - Return output as JSON. |
| 61 | + - Default: false |
| 62 | + |
| 63 | +For example, to create a new repository: |
| 64 | + |
| 65 | +```sh |
| 66 | +npx wrangler artifacts repos create starter-repo --namespace sandbox |
| 67 | +``` |
| 68 | + |
| 69 | +```sh output |
| 70 | +✨ Created Artifacts repo "starter-repo" in namespace "sandbox" |
| 71 | + |
| 72 | + id: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
| 73 | + name: starter-repo |
| 74 | + default_branch: main |
| 75 | + read_only: false |
| 76 | + remote: https://0123456789abcdef.artifacts.cloudflare.net/sandbox/starter-repo |
| 77 | + token: artifacts:v1:repo:... |
| 78 | +``` |
| 79 | + |
| 80 | +:::note |
| 81 | +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. |
| 82 | +::: |
| 83 | + |
| 84 | +<AnchorHeading title="`repos list`" slug="artifacts-repos-list" depth={3} /> |
| 85 | + |
| 86 | +List Artifacts repositories in a namespace. |
| 87 | + |
| 88 | +```txt |
| 89 | +wrangler artifacts repos list --namespace <NAMESPACE> [OPTIONS] |
| 90 | +``` |
| 91 | + |
| 92 | +- `--namespace` <Type text="string" /> <MetaInfo text="required" /> |
| 93 | + - The Artifacts namespace to list repositories from. |
| 94 | +- `--json` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 95 | + - Return output as JSON. |
| 96 | + - Default: false |
| 97 | + |
| 98 | +<AnchorHeading title="`repos get`" slug="artifacts-repos-get" depth={3} /> |
| 99 | + |
| 100 | +Get details for an Artifacts repository. |
| 101 | + |
| 102 | +```txt |
| 103 | +wrangler artifacts repos get <NAME> --namespace <NAMESPACE> [OPTIONS] |
| 104 | +``` |
| 105 | + |
| 106 | +- `NAME` <Type text="string" /> <MetaInfo text="required" /> |
| 107 | + - The name of the repository. |
| 108 | +- `--namespace` <Type text="string" /> <MetaInfo text="required" /> |
| 109 | + - The Artifacts namespace. |
| 110 | +- `--json` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 111 | + - Return output as JSON. |
| 112 | + - Default: false |
| 113 | + |
| 114 | +<AnchorHeading title="`repos delete`" slug="artifacts-repos-delete" depth={3} /> |
| 115 | + |
| 116 | +Delete an Artifacts repository. Prompts for confirmation unless `--force` is passed. |
| 117 | + |
| 118 | +```txt |
| 119 | +wrangler artifacts repos delete <NAME> --namespace <NAMESPACE> [OPTIONS] |
| 120 | +``` |
| 121 | + |
| 122 | +- `NAME` <Type text="string" /> <MetaInfo text="required" /> |
| 123 | + - The name of the repository to delete. |
| 124 | +- `--namespace` <Type text="string" /> <MetaInfo text="required" /> |
| 125 | + - The Artifacts namespace. |
| 126 | +- `--force, -y` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 127 | + - Skip the interactive deletion confirmation prompt. |
| 128 | + - Default: false |
| 129 | +- `--json` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 130 | + - Return output as JSON. |
| 131 | + - Default: false |
| 132 | + |
| 133 | +<AnchorHeading title="`repos issue-token`" slug="artifacts-repos-issue-token" depth={3} /> |
| 134 | + |
| 135 | +Issue a repo-scoped token for authenticating Git operations against an Artifacts repository. |
| 136 | + |
| 137 | +```txt |
| 138 | +wrangler artifacts repos issue-token <REPO> --namespace <NAMESPACE> [OPTIONS] |
| 139 | +``` |
| 140 | + |
| 141 | +- `REPO` <Type text="string" /> <MetaInfo text="required" /> |
| 142 | + - The name of the repository to issue a token for. |
| 143 | +- `--namespace` <Type text="string" /> <MetaInfo text="required" /> |
| 144 | + - The Artifacts namespace. |
| 145 | +- `--scope` <Type text="string" /> <MetaInfo text="optional" /> |
| 146 | + - The token scope. Accepted values: `read`, `write`. |
| 147 | +- `--ttl` <Type text="number" /> <MetaInfo text="optional" /> |
| 148 | + - The token time-to-live in seconds. Must be greater than 0. |
| 149 | +- `--json` <Type text="boolean" /> <MetaInfo text="optional" /> |
| 150 | + - Return output as JSON. |
| 151 | + - Default: false |
| 152 | + |
| 153 | +For example, to issue a read-scoped token: |
| 154 | + |
| 155 | +```sh |
| 156 | +npx wrangler artifacts repos issue-token starter-repo --namespace sandbox --scope read |
| 157 | +``` |
| 158 | + |
| 159 | +```sh output |
| 160 | +✨ Issued Artifacts repo token for "starter-repo" in namespace "sandbox" |
| 161 | + |
| 162 | + id: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
| 163 | + scope: read |
| 164 | + expires_at: 2026-05-15T12:00:00Z |
| 165 | + plaintext: artifacts:v1:repo:... |
| 166 | +``` |
| 167 | +
|
| 168 | +:::note |
| 169 | +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/). |
| 170 | +::: |
0 commit comments