My Dev.to CLI Got Its First Community PR. Image Uploads From Terminal.
Description and use
devpub now lets users upload images to Dev.to directly from the terminal, eliminating the need to use the web editor.
Problem
The Forem API V1 has no image upload endpoint, so devpub could not provide a terminal command to upload images for Dev.to articles.
Outcome
The PR by Harish added a robust image upload module, comprehensive tests, and user guidance for session credentials, enabling devpub users to upload images from the terminal and simplifying their workflow.
Workflow
- 1. Install devpub v0.3 via pip
- 2. Add
DEVPUB_SESSION_COOKIEandDEVPUB_CSRF_TOKENto.devpub/.env - 3. Run
devpub upload <image>to upload a single image - 4. Run
devpub upload *.png --markdownto get Markdown tags for multiple images - 5. (Optional) Use
--dry-runto validate files before uploading
Evidence
The Forem API V1 has no image upload endpoint, so devpub could not provide a terminal command to upload images for Dev.to articles.
devpub upload needs your browser session (not API key).
devpub upload cover.png now gives you this: ... Uploaded Images table
- Record date: 2026-10-01T12:55:49.978Z