@wpbevel/upload
v1.0.1
Published
Send files to a Bevel MCP upload link from a shell: globs, SHA-256 receipts, retries. No dependencies.
Maintainers
Readme
@wpbevel/upload
Send files to a Bevel MCP upload link from a shell. For assistants that can run commands (Claude Code, Codex, Cowork) and for anyone with a terminal: the bytes go straight from the disk to the site, never through the conversation.
npx @wpbevel/upload "https://example.com/wp-json/bevel-mcp/v1/upload/<ticket>" ./brand/logo.png ./brand/logo-white.png
npx @wpbevel/upload "<link>" "./fonts/Aeonik-*.woff2" --family "Aeonik"The link is the one the assistant gets from upload_media {request_upload_url:true} or upload_font {request_upload_url:true, family}. It accepts images and fonts alike: an image lands in the media library, a font in Bevel Kit's Custom Fonts as one face of the family (weight and style are read from the file name, or passed with --weight and --style).
What it does for you:
- expands
~,*,**and{a,b}patterns; - hashes every file first, so a retry after a lost answer returns the same asset instead of a duplicate;
- retries a busy link three times with backoff;
- prints one line per file with the id, URL and tone hint (dark or light artwork), or the family, weight and format for a font;
--jsonprints the full result for a script to read; exit code 1 when any file failed.
Node 18.17 or newer. No dependencies.
