Skip to content

[wrangler] Add artifacts CLI commands#13670

Merged
elithrar merged 11 commits into
mainfrom
artifacts/add-artifacts-cli
May 14, 2026
Merged

[wrangler] Add artifacts CLI commands#13670
elithrar merged 11 commits into
mainfrom
artifacts/add-artifacts-cli

Conversation

@elithrar
Copy link
Copy Markdown
Contributor

@elithrar elithrar commented Apr 24, 2026

Add wrangler artifacts commands for viewing Artifacts namespaces and managing repositories from Wrangler.

Wrangler already supports Artifacts bindings in config, but it did not expose the control-plane workflows from the Artifacts API. This adds the namespace and repo command surface under Storage & databases, keeps the repo commands scoped by --namespace, and avoids persisting issued credentials through Wrangler's debug logger in human mode.

  • add artifacts namespaces list|get
  • add artifacts repos create|list|get|delete|issue-token
  • add targeted tests for help text, request payloads, JSON output, and secret-safe human output
  • add a changeset for the new Wrangler CLI surface
wrangler artifacts namespaces list
wrangler artifacts namespaces get sandbox
wrangler artifacts repos create starter-repo --namespace sandbox
wrangler artifacts repos issue-token starter-repo --namespace sandbox --scope read

A picture of a cute animal (not mandatory, but encouraged)


Open in Devin Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2026

🦋 Changeset detected

Latest commit: f617dd6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Major
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Apr 24, 2026
@workers-devprod workers-devprod requested review from a team and NuroDev and removed request for a team April 24, 2026 16:22
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 24, 2026

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/tests/artifacts.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/index.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/artifacts/client.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/artifacts/index.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/artifacts/namespaces.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/artifacts/repos.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/artifacts/types.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/core/teams.d.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/index.ts: [@cloudflare/wrangler]

@elithrar elithrar self-assigned this Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Changeset Review

✅ All changesets look good

.changeset/green-books-accept.md

Criterion Status Notes
Version Type minor is appropriate — this introduces new CLI commands
Changelog Quality Meaningful description with usage context and --json flag note
Markdown Headers No h1/h2/h3 headers present
Analytics No analytics changes mentioned
Dependabot Not a dependency update
Experimental Features Not marked as experimental; reads as stable feature release

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 24, 2026

Review posted on PR #13670. The single actionable issue is that both namespaces delete and repos delete lack interactive confirmation before performing destructive operations, diverging from the pattern used by the majority of wrangler delete commands. Inline suggestions with code sketches were provided for both.

github run

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 24, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13670

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13670

miniflare

npm i https://pkg.pr.new/miniflare@13670

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13670

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13670

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13670

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13670

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13670

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13670

wrangler

npm i https://pkg.pr.new/wrangler@13670

commit: f617dd6

Copy link
Copy Markdown
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial comments - still need to test it manually

Comment thread packages/wrangler/src/artifacts/namespaces.ts Outdated
Comment thread packages/wrangler/src/artifacts/repos.ts
Comment thread packages/wrangler/src/artifacts/repos.ts
Comment thread packages/wrangler/src/__tests__/artifacts.test.ts Outdated
Comment thread packages/wrangler/src/artifacts/namespaces.ts Outdated
Comment thread packages/wrangler/src/artifacts/namespaces.ts
Comment thread packages/wrangler/src/artifacts/repos.ts Outdated
Comment thread packages/wrangler/src/index.ts Outdated
Comment thread packages/wrangler/src/__tests__/artifacts.test.ts Outdated
Comment thread packages/wrangler/src/__tests__/artifacts.test.ts Outdated
Comment thread packages/wrangler/src/__tests__/artifacts.test.ts
Comment thread packages/wrangler/src/__tests__/artifacts.test.ts Outdated
@elithrar
Copy link
Copy Markdown
Contributor Author

  • Updated the Artifacts command metadata to private beta everywhere, including the top-level wrangler artifacts entry and its help snapshots.
  • Switched the human-mode Artifacts tests to inline snapshots so we now verify the full rendered output instead of a few substrings.
  • Tightened the focused assertions the review called out, including checking ns_default explicitly and confirming read_only renders as true.
  • Simplified the delete-cancellation tests to track whether a request was sent at all, and reran src/__tests__/artifacts.test.ts plus src/__tests__/index.test.ts successfully.

@elithrar elithrar force-pushed the artifacts/add-artifacts-cli branch from b8e92a9 to 183b2fb Compare April 28, 2026 01:32
@emily-shen emily-shen marked this pull request as draft April 28, 2026 10:50
@emily-shen
Copy link
Copy Markdown
Contributor

marking this as draft while the issue with the namespaces API endpoint is being resolved

@elithrar elithrar force-pushed the artifacts/add-artifacts-cli branch from 183b2fb to aec9736 Compare May 4, 2026 13:53
@elithrar elithrar marked this pull request as ready for review May 13, 2026 19:39
@elithrar
Copy link
Copy Markdown
Contributor Author

@emily-shen ready for final review

@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented May 13, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@elithrar elithrar force-pushed the artifacts/add-artifacts-cli branch from b44c803 to f617dd6 Compare May 13, 2026 19:41
Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk May 14, 2026
@elithrar elithrar merged commit 506aa02 into main May 14, 2026
56 of 58 checks passed
@elithrar elithrar deleted the artifacts/add-artifacts-cli branch May 14, 2026 15:37
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants