Repository navigation
feat: pixelvault generate (AI image generation) + credits in usage — 0.10.0 - #23
Merged
Merged
Conversation
….10.0 - `pixelvault generate <prompt>` -> POST /v1/images/generate. stdout is just the hosted URL (or --json for the full response, --optimized for the WebP/AVIF URL); the credits used/left go to stderr so scripts and agents can capture the URL cleanly. Flags: --model/-m, --folder, --private (+ --expires for the signed link, fails closed if the server doesn't confirm private), --delete-after (auto-delete the image). Unquoted multi-word prompts work. - Durations are validated before the request, so a bad value never spends a credit. - `pixelvault usage` shows AI generation credits when the API reports them. - parseExpires takes the flag name so --delete-after errors name the right flag. - Version 0.10.0, README. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019sMZVurbKqZ6zsbUYCsLJn
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
Adds
pixelvault generate <prompt>(API:POST /v1/images/generate, live since 2026-10-30) and shows generation credits inusage. Release 0.10.0.--jsonfull response,--optimizedthe WebP/AVIF URL); the credits used/left go to stderr, so scripts and agents capture the URL cleanly (same contract asupload).--model/-m,--folder,--private(+--expiresfor the signed link; fails closed if the server doesn't confirm private),--delete-after(auto-delete the image). Unquoted multi-word prompts work.parseExpiresnow takes the flag name so--delete-aftererrors name the right flag.pixelvault usageprintsAI images: N credits used / limit / remainingwhen the API reports it.Verification
typecheck, 92 tests (13 new for
generate, 2 forusage), build. Exercised the built binary against production: a free-plan premium-model request exits 1 with the API message; a real generation exited 0 with only the URL on stdout, the credit line on stderr, the CDN serving the image (HTTP 200 image/jpeg), andusageshowing the credits. The test image was deleted afterwards.Release
Tag-triggered (
v0.10.0->npm publish --provenance). Not tagged yet; the skill doc will reference this command, so it ships after the publish.🤖 Generated with Claude Code
https://claude.ai/code/session_019sMZVurbKqZ6zsbUYCsLJn