Local-first
WordPress tooling.
Optimize images, manage posts, audit accessibility, and generate AI metadata for your WordPress media library — all from the terminal. Syncs to any WordPress site via the REST API.
brew install gfargo/tap/localpress
See it in action
A full media manager in your terminal

Browse, inspect, and action your entire media library without leaving the terminal
Keyboard-driven overlays
Every action, one keystroke away
[o] optimize
Inline optimize settings — quality, format, replace mode
[/] search
Live search filters as you type
[c] convert
Format picker — WebP, AVIF, JPEG, PNG
[↵] details
Full metadata detail view
See it in action
Workflows, not screenshots

Every action at your fingertips — optimize, convert, resize

doctor → list → stats — the full localpress experience
What's inside
38 commands. One tool.
From a single image to your entire library — every operation is local, idempotent, and dry-run safe by default.
optimizeCompress without compromise
sharp + jSquash WASM codecs. Set a quality floor, pick a format, use named profiles, preview in the browser with --preview, or process your entire library in one pass.
remove-bgBackground removal. No cloud.
Five ONNX models including state-of-the-art BiRefNet — all running on your hardware. Preview and tweak in the browser before applying.
auditSeven health checks, one command
Unoptimized, oversized, missing alt text, display-size mismatch, duplicate images, broken refs, orphaned files — surfaced in seconds.
$ export / importMigrationBackup, migrate, bulk-load.
Export your entire library as a ZIP with metadata manifest. Import directories or ZIPs with optional optimization on upload.
$ watchAutomationDrop files. They appear in WordPress.
Watch a local directory for new or changed images — auto-optimizes and pushes to WordPress continuously.
$ editRound-tripOpen in any editor. Syncs back.
Download → GIMP, Photoshop, or Preview → save → automatically pushed to WordPress.
$ referencesDiscoveryFind every usage
Scan all posts for an attachment's URL. Rewrite them in-place after a rename or move.
Also included
initInteractive site wizardsitesManage multiple sitesdoctorCapability check + --fixconfigProfiles + scalar valueslistBrowse media libraryshowAttachment metadatastatsLibrary health dashboardcaptionAI alt-text via Ollama (multilingual)convertJPEG → WebP → AVIFresizeResize preserving ratioregenerateRebuild WP thumbnailsexportBackup as ZIP or directoryimportBulk upload with optimizepostsContent CRUD (posts/pages/CPT)a11yWCAG accessibility auditpullDownload to local diskpushUpload + replace-in-placeupdateSelf-update localpresscompletionsShell completions (bash/zsh/fish)localPress audit
Seven health checks in a single pass
--unoptimizedImages never processed by localPress--largeImages over a size threshold (default 1 MB)--missing-altImages without alt text (accessibility / SEO)--display-sizeImages larger than their biggest registered thumbnail--duplicatesPerceptually identical images via dHash--broken-refsAttachment URLs that return 404--orphansFiles on disk with no DB record (requires WP-CLI)
Vision AI
Six fields, one vision model.
Same local Ollama vision model that powers caption now generates titles, descriptions, tags, image-type classifications, and AI-renamed slugs. Each is a dedicated command — or run them all at once with vision.
localpress altAlt text
Concise single-sentence description for accessibility. Writes to alt_text.
localpress titleTitle
3-7 word noun phrase. Auto-detects machine-generated names (Screenshot-…, IMG_…) for bulk cleanup.
localpress describeDescription
2-3 sentence description for galleries and attachment-page SEO. Writes to the description field.
localpress tagTags
3-6 short tags appended to the caption as a [tags: …] block. Universal — no taxonomy plugin needed.
localpress classifyType
Detects screenshot/photo/illustration/diagram. Cached locally so optimize picks PNG vs WebP automatically.
localpress renameSlug
AI-generated permalink slug (with --smart) or explicit (--to). Honest about file URL — slug only for v1.
Or — all at once
The vision workflow
localpress vision <id> runs all five generators in one pass. Print-only by default so you can review before writing. Pair with --apply to commit everything to WordPress in a single composed update.
Classification is cached locally — subsequent optimize calls on the same attachment automatically pick PNG for screenshots and WebP for photos.
# Print all five fields for review
localpress vision 2202
# Or write them all back at once
localpress vision 2202 --apply
# Or pick a subset
localpress vision 2202 --fields alt,title --applyTime-machine
Always undoable.
Every destructive op writes a snapshot of the pre-change state before WordPress mutates. Wrong bulk optimize? Bad background removal? An agent that ran the wrong thing on 500 attachments? Walk it back with one command.
Run anything
Optimize, convert, resize, remove-bg, caption — bulk or single. Every destructive op writes a snapshot of the pre-change state to local storage before WordPress is touched.
localpress optimize --unoptimized --applyBrowse history
Every command creates a session. Inspect snapshots with `history`, or drop into the interactive TUI to walk through them.
localpress history -iUndo the bad one
Dry-run first, apply when ready. Single attachment, whole session, or step back op-by-op. Works the same when an MCP agent drives it.
localpress undo --applyBulk undos dry-run unless you pass --apply, matching the rest of the CLI.
Default 2 GB cap per site. Auto-prune on every op. Configurable via `history.maxSizeBytes`.
Skipped ops (source unchanged) don't create snapshots. Re-running unchanged ops costs nothing.
Agents get `undo`, `history_list`, `history_show`, and `history_prune` as typed tools.
Agent-native
Built for AI agents.
Drop one config block into Claude Desktop, Cursor, or any MCP client. 40+ typed tools cover every operation — from bulk optimization to accessibility audits. Same binary, new entrypoint. Agents manage your entire media library autonomously.
{
"mcpServers": {
"localpress": {
"command": "localpress",
"args": ["mcp"]
}
}
}
An AI agent finds and optimizes unoptimized images — no manual commands needed
sites_listsites_usesites_addsites_removedoctorconfig_*
listshowstatsauditreferenceswatch_status
captiongenerate_titlegenerate_descriptiontagclassifyvision
optimizeconvertresizeremove_bgupdate_metadata
pullpushdeleterenameregenerateexportimport
history_listhistory_showhistory_pruneundo
localpress://siteslocalpress://statslocalpress://capabilitieslocalpress://historyThe full picture
How localPress stacks up
Feature-by-feature against the five most popular WordPress image optimization plugins.
| Feature | localPress | EWWW | ShortPixel | Smush | Imagify |
|---|---|---|---|---|---|
| Processing location | Your laptop | WP server | Cloud | Cloud | Cloud |
| Recurring cost | $0 | $0 – $25/mo | $4 – $10/mo | $3 – $13/mo | $6 – $12/mo |
| Works on shared host | ✓ | Needs exec() | ✓ | ✓ | ✓ |
| AI background removal | ✓ local | ✗ | ✓ paid | ✗ | ✗ |
| Desktop editor round-trip | ✓ | ✗ | ✗ | ✗ | ✗ |
| AI agent skill | ✓ | ✗ | ✗ | ✗ | ✗ |
| License | MIT | GPLv3 | Proprietary | Mixed | Proprietary |
Installation
Three ways to install
brew install gfargo/tap/localpressArchive download
Pre-built tarballs for macOS (arm64, x64), Linux (arm64, x64), Windows (x64). Requires Bun ≥ 1.1.
git clone https://github.com/gfargo/localpress.gitcd localpress && bun installbun run build