localPress
v1.18.0 ·  MIT  ·  macOS / Linux / Windows

Local-first
WordPress tooling.

Compress, convert, remove backgrounds, watch directories for changes, and round-trip with your real desktop editor — then sync back to WordPress via REST. Your hardware does the work. No cloud SaaS. No credits. No plugin required.

$brew install gfargo/localpress/localpress
Get started →GitHub

What it looks like

Your media library, from the terminal

localpress list
localPress interactive media browser — browse and filter your WordPress media library from the terminal

Browse your entire media library without leaving the terminal

localpress optimize --preview
localPress image preview — see optimization results with before/after comparison in the browser

Preview optimization results before syncing back

localpress show --verbose
localPress detailed view — extended attachment information including references and processing history

Extended details with references and history

Why localPress

Four reasons the cloud can't compete

Bring your own GPU

State-of-the-art BiRefNet runs background removal on your M-series Mac in seconds. ShortPixel charges 1 credit per image. You do the math.

No host required

Works against any WordPress install via Application Passwords — even the cheapest shared host. Your laptop is the runtime.

Round-trip your real editor

Open in GIMP, Photoshop, or Preview. Save. It syncs back automatically. The workflow designers actually want.

Composes with your MCP

A companion skill teaches AI agents to drive the CLI alongside your existing WP MCP server. No new protocol code.

Command reference

24 commands built for real workflows

From a single image to your entire library — every operation is local, idempotent, and dry-run safe.

Processing
optimize

Compress 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.

$ localpress optimize --unoptimized --profile hero --apply
AI
remove-bg

Background 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.

$ localpress remove-bg 847 --model birefnet-lite --preview
Discovery
audit

Seven health checks, one command

Unoptimized, oversized, missing alt text, display-size mismatch, duplicate images, broken refs, orphaned files — surfaced in seconds.

$ localpress audit
$ export / importMigration

Backup, migrate, bulk-load.

Export your entire library as a ZIP with metadata manifest. Import directories or ZIPs with optional optimization on upload.

$ watchAutomation

Drop files. They appear in WordPress.

Watch a local directory for new or changed images — auto-optimizes and pushes to WordPress continuously.

$ editRound-trip

Open in any editor. Syncs back.

Download → GIMP, Photoshop, or Preview → save → automatically pushed to WordPress.

$ referencesDiscovery

Find every usage

Scan all posts for an attachment's URL. Rewrite them in-place after a rename or move.

Also included

initInteractive site wizard
sitesManage multiple sites
doctorCapability check + --fix
configProfiles + scalar values
listBrowse media library
showAttachment metadata
statsLibrary health dashboard
captionAI alt-text via Ollama (multilingual)
convertJPEG → WebP → AVIF
resizeResize preserving ratio
regenerateRebuild WP thumbnails
exportBackup as ZIP or directory
importBulk upload with optimize
pullDownload to local disk
pushUpload + replace-in-place
updateSelf-update localpress
completionsShell 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)
bash
$ localpress audit

Audited 847 item(s) on 'production':

  Unoptimized:              45 images
  Oversized for display:     8 images
  Missing alt text:         12 images
  Duplicates:                3 pairs
  Broken references:         2 attachments

  Total findings: 70

  → localpress optimize --unoptimized --apply

Competitive positioning

No one else runs on your machine

FeaturelocalPressEWWWShortPixelSmushImagify
Processing locationYour laptopWP serverCloudCloudCloud
Recurring cost$0$0 – $25/mo$4 – $10/mo$3 – $13/mo$6 – $12/mo
Works on shared hostNeeds exec()
AI background removal✓ local✓ paid
Desktop editor round-trip
AI agent skill
LicenseMITGPLv3ProprietaryMixedProprietary

New in v1.18 · 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.

What it generates
localpress alt

Alt text

Concise single-sentence description for accessibility. Writes to alt_text.

localpress title

Title

3-7 word noun phrase. Auto-detects machine-generated names (Screenshot-…, IMG_…) for bulk cleanup.

localpress describe

Description

2-3 sentence description for galleries and attachment-page SEO. Writes to the description field.

localpress tag

Tags

3-6 short tags appended to the caption as a [tags: …] block. Universal — no taxonomy plugin needed.

localpress classify

Type

Detects screenshot/photo/illustration/diagram. Cached locally so optimize picks PNG vs WebP automatically.

localpress rename

Slug

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 --apply

New in v1.15 · Time-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.

How it works

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 --apply

Browse history

Every command creates a session. Inspect snapshots with `history`, or drop into the interactive TUI to walk through them.

localpress history -i

Undo 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 --apply
Safe by default

Bulk undos dry-run unless you pass --apply, matching the rest of the CLI.

Bounded disk

Default 2 GB cap per site. Auto-prune on every op. Configurable via `history.maxSizeBytes`.

Idempotent-aware

Skipped ops (source unchanged) don't create snapshots. Re-running unchanged ops costs nothing.

MCP-first

Agents get `undo`, `history_list`, `history_show`, and `history_prune` as typed tools.

New in v1.14 · MCP server

Now an MCP server.

Drop one config block into Claude Desktop, Cursor, or Claude Code. Get 33 typed tools and 4 resources — every feature of the CLI, with structured schemas. Same binary, new entrypoint. No daemon, no hosting, no separate config.

claude_desktop_config.json
{
  "mcpServers": {
    "localpress": {
      "command": "localpress",
      "args": ["mcp"]
    }
  }
}
33 tools · 4 resources
Setup
  • sites_list
  • sites_use
  • sites_add
  • sites_remove
  • doctor
  • config_*
Discovery
  • list
  • show
  • stats
  • audit
  • references
  • watch_status
Vision AI
  • caption
  • generate_title
  • generate_description
  • tag
  • classify
  • vision
Processing
  • optimize
  • convert
  • resize
  • remove_bg
  • update_metadata
Library
  • pull
  • push
  • delete
  • rename
  • regenerate
  • export
  • import
Time-machine
  • history_list
  • history_show
  • history_prune
  • undo
Resources
localpress://siteslocalpress://statslocalpress://capabilitieslocalpress://history

Or — the markdown path

Composes with your WordPress MCP.

If your agent already speaks to a WordPress MCP server, localPress ships a markdown skill that teaches it the three-step pattern: discover via WP MCP, process via localPress, verify via WP MCP. Works in any agent that can run a shell.

Three-step composition

Discover via MCP

Your AI agent uses its connected WordPress MCP server to find attachments that need work.

wp_list_media --filter='unoptimized'

Process via localPress

The agent runs localPress commands locally — compress, convert, or remove backgrounds using your CPU/GPU.

localpress optimize 123 124 125 --json

Verify via MCP

The agent uses the WP MCP again to confirm changes landed and references are intact.

wp_get_media 123 --fields=size_bytes,alt_text

Compatible WordPress MCP servers

mcp-adapter
WordPress.org (official)
Bridges WordPress Abilities API to MCP. Ships in WP 6.9+ core.
GitHub ↗
mcp-wordpress
docdyhr
59 tools across 10 categories including media upload/list/update/delete.
GitHub ↗

Get the skill

The skill lives in the repo. AI agents can read it directly via a file reference or URL. Point Claude Desktop, Cursor, or any MCP client at it.

"Remove backgrounds from the last 5 product photos in my WordPress library"
View skill/SKILL.md ↗

Installation

Three ways to install

Homebrew — recommended
View tap ↗
$brew install gfargo/localpress/localpress

Archive download

Pre-built tarballs for macOS (arm64, x64), Linux (arm64, x64), Windows (x64). Requires Bun ≥ 1.1.

Releases ↗
From source — requires Bun ≥ 1.1
1git clone https://github.com/gfargo/localpress.git
2cd localpress && bun install
3bun run build