feat(cli): support unattended mode for media library commands#1502
Open
jonahsnider wants to merge 9 commits into
Open
feat(cli): support unattended mode for media library commands#1502jonahsnider wants to merge 9 commits into
jonahsnider wants to merge 9 commits into
Conversation
Contributor
📦 Bundle Stats —
|
| Metric | Value | vs main (fb5247c) |
|---|---|---|
| Internal (raw) | 2.2 KB | - |
| Internal (gzip) | 838 B | - |
| Bundled (raw) | 11.20 MB | - |
| Bundled (gzip) | 2.11 MB | - |
| Import time | 891ms | -43ms, -4.6% |
bin:sanity
| Metric | Value | vs main (fb5247c) |
|---|---|---|
| Internal (raw) | 782 B | - |
| Internal (gzip) | 423 B | - |
| Bundled (raw) | 9.90 MB | - |
| Bundled (gzip) | 1.78 MB | - |
| Import time | 2.32s | -71ms, -3.0% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against main (fb5247ca)
| Metric | Value | vs main (fb5247c) |
|---|---|---|
| Internal (raw) | 113.4 KB | - |
| Internal (gzip) | 29.0 KB | - |
| Bundled (raw) | 21.76 MB | - |
| Bundled (gzip) | 3.46 MB | - |
| Import time | 810ms | +8ms, +1.0% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-build
Compared against main (fb5247ca)
@sanity/cli-build/_internal/build
| Metric | Value | vs main (fb5247c) |
|---|---|---|
| Internal (raw) | 113.8 KB | - |
| Internal (gzip) | 28.7 KB | - |
| Bundled (raw) | 18.10 MB | - |
| Bundled (gzip) | 3.64 MB | - |
| Import time | 1.41s | +41ms, +3.0% |
@sanity/cli-build/_internal/env
| Metric | Value | vs main (fb5247c) |
|---|---|---|
| Internal (raw) | 1.8 KB | - |
| Internal (gzip) | 644 B | - |
| Bundled (raw) | 1.31 MB | - |
| Bundled (gzip) | 333.8 KB | - |
| Import time | 127ms | +2ms, +1.8% |
@sanity/cli-build/_internal/extract
| Metric | Value | vs main (fb5247c) |
|---|---|---|
| Internal (raw) | 8.6 KB | - |
| Internal (gzip) | 2.7 KB | - |
| Bundled (raw) | 155.0 KB | - |
| Bundled (gzip) | 39.5 KB | - |
| Import time | 250ms | +3ms, +1.1% |
🗺️ ./_internal/env · ./_internal/extract · @sanity/cli-build:./_internal/build treemap too large to embed · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against main (fb5247ca)
| Metric | Value | vs main (fb5247c) |
|---|---|---|
| Internal (raw) | 908 B | - |
| Internal (gzip) | 483 B | - |
| Bundled (raw) | 931 B | - |
| Bundled (gzip) | 491 B | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
Contributor
Coverage Delta
Comparing 5 changed files against main @ Overall Coverage
|
jonahsnider
pushed a commit
that referenced
this pull request
Jul 16, 2026
jonahsnider
changed the base branch from
main
to
aigro-5168/unattended-datasets-advanced
July 16, 2026 01:58
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 16, 2026 01:58
0d8eb00 to
851cc0f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 851cc0f. Configure here.
jonahsnider
pushed a commit
that referenced
this pull request
Jul 16, 2026
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 16, 2026 02:05
851cc0f to
eea8beb
Compare
shapirodaniel
previously approved these changes
Jul 16, 2026
jonahsnider
pushed a commit
that referenced
this pull request
Jul 17, 2026
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 17, 2026 00:50
eea8beb to
f1f697f
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-datasets-advanced
branch
from
July 17, 2026 00:50
1f81861 to
20e7797
Compare
jonahsnider
pushed a commit
that referenced
this pull request
Jul 17, 2026
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 17, 2026 15:34
f1f697f to
8def726
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-datasets-advanced
branch
from
July 17, 2026 15:34
20e7797 to
448dc5a
Compare
jonahsnider
pushed a commit
that referenced
this pull request
Jul 17, 2026
jonahsnider
force-pushed
the
aigro-5168/unattended-datasets-advanced
branch
from
July 17, 2026 15:54
448dc5a to
7450444
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 17, 2026 15:54
8def726 to
569bdfd
Compare
jonahsnider
pushed a commit
that referenced
this pull request
Jul 17, 2026
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 17, 2026 16:02
569bdfd to
7f5aecb
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-datasets-advanced
branch
from
July 17, 2026 16:02
7450444 to
ebb3dc3
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 17, 2026 17:51
7f5aecb to
f132d2d
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-datasets-advanced
branch
from
July 17, 2026 17:51
ebb3dc3 to
0414913
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 17, 2026 21:05
f132d2d to
84f42b2
Compare
jonahsnider
force-pushed
the
aigro-5168/unattended-datasets-advanced
branch
from
July 17, 2026 21:06
0414913 to
5f3db70
Compare
Signed-off-by: Jonah Snider <jonah@jonahsnider.com>
Signed-off-by: Jonah Snider <jonah@jonahsnider.com>
Signed-off-by: Jonah Snider <jonah@jonahsnider.com>
jonahsnider
force-pushed
the
aigro-5168/unattended-media-library
branch
from
July 17, 2026 21:24
84f42b2 to
46d3a8b
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Description
Adds unattended-mode support for media library commands.
What to review
Review the flags, prompt handling, and automated coverage.
Testing
Note
Low Risk
CLI-only behavior changes with explicit opt-in via non-interactive runs; interactive flows are largely unchanged aside from clearer errors and delete cancel exit code.
Overview
Media library CLI commands now run in unattended mode (non-TTY / CI) without hanging on prompts, by requiring explicit flags and tightening destructive flows.
media create-aspectadds--titleand--name; unattended runs must pass--title, and the aspect name defaults from the title when--nameis omitted.Deploy, import, export, and delete require
--media-library-idwhen unattended.media exportpicks a default output path ({mediaLibraryId}-export.tar.gzin the cwd) instead of prompting.media delete-aspectin unattended mode also requires--yes; declining confirmation exits withUSER_ABORT.Several validation paths now use
exitCodes.USAGE_ERRORinstead of generic failure codes, with clearer usage messages. Tests cover unattended behavior viaisInteractive: false.Reviewed by Cursor Bugbot for commit 46d3a8b. Bugbot is set up for automated code reviews on this repo. Configure here.