Adds --screenshots argument to pebble publish --non-interactive command#50
Merged
ericmigi merged 3 commits intocoredevices:mainfrom Apr 13, 2026
Merged
Conversation
In --non-interactive mode, screenshots can only come from the emulator. This adds a --screenshots flag that accepts local file paths, allowing CI/CD pipelines and scripted workflows to supply pre-existing screenshots or GIFs without needing a running emulator. Filenames must start with the platform name (e.g. emery_screenshot.png) so the upload can infer the target platform, matching the convention already used by the auto-capture path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
--screenshots argument to pebble publish --non-interactive command
ericmigi
reviewed
Apr 10, 2026
ericmigi
left a comment
There was a problem hiding this comment.
Nice addition! One small suggestion: the interactive path in _prompt_local_screenshot_files checks os.path.exists(path) before accepting each file, which gives the user a clear early error. The new --screenshots path skips that, so a typo in a filename won't surface until _append_capture_files tries to open() it during upload — by which point the error message is less obvious.
Maybe worth adding a quick existence check before the split:
local_files = getattr(args, "screenshots", None) or []
if local_files:
for p in local_files:
if not os.path.exists(p):
raise ToolError("Screenshot file not found: {}".format(p))
gif_paths = [p for p in local_files if p.lower().endswith(".gif")]
screenshot_paths = [p for p in local_files if not p.lower().endswith(".gif")]|
thanks! |
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.
Summary
--screenshots FILE [FILE ...]argument topebble publish--non-interactivemode, accepts local screenshot/GIF files instead of requiring a runningemulator
emery_screenshot.png) to match the existing uploadconvention
Usage
pebble publish --non-interactive \ --description "My watchface" \ --no-gif-all-platforms \ --screenshots emery_screenshot.png basalt_screenshot.png emery_preview.gif