Lightroom CLI

Japanese / 日本語
Full command-line control for Adobe Lightroom Classic — 107 commands.
Develop parameter adjustment, masking, tone curves, catalog management, selection operations, and more. Ideal for batch processing and scripted automation.
Architecture
+---------------------+ TCP Socket (JSON-RPC) +--------------+
| Lightroom Classic |<----------------------------->| Python SDK |
| (Lua Plugin) | Dual socket: send/receive | |
+---------------------+ +------+-------+
|
+---------------+---------------+
| | |
+------+-------+ +-----+------+ +------+------+
| CLI (lr) | | MCP Server | | Python SDK |
| Click app | | (lr-mcp) | | Direct |
+--------------+ +------------+ +-------------+
A Lua plugin runs inside Lightroom Classic and communicates with the Python SDK via dual TCP sockets. Three interfaces are available: the lr CLI, the MCP Server for Claude Desktop/Cowork, and the Python SDK for direct integration.
Quick Start
Prerequisites
- Python 3.10+
- Adobe Lightroom Classic (desktop version)
- macOS / Windows (Windows is supported but not yet tested on real hardware — please report issues)
Installation
pip install lightroom-cli
Then install the Lightroom plugin and restart Lightroom Classic:
lr plugin install
The plugin appears under File > Plug-in Manager as "Lightroom CLI Bridge".
Upgrading
pip install --upgrade lightroom-cli
lr plugin install
After upgrading, restart Lightroom Classic to load the updated plugin.
Choose Your Integration
Option A: Claude Code (SKILL-based)
For Claude Code users — install the Claude Code Plugin so the agent can discover and use all 107 commands via the SKILL file:
/plugin marketplace add znznzna/lightroom-cli
/plugin install lightroom-cli@lightroom-cli
To update the plugin to the latest version:
/plugin uninstall lightroom-cli@lightroom-cli
/plugin marketplace update
/plugin install lightroom-cli@lightroom-cli
The agent reads SKILL.md to understand available commands, parameters, and workflows. No manual command typing needed.
Option B: Claude Desktop / Cowork (MCP Server)
For Claude Desktop or Cowork users — register the MCP Server:
lr mcp install
Restart Claude Desktop / Cowork. All 107 commands are available as MCP tools with lr_ prefix (e.g., lr_system_ping, lr_catalog_list).
Check MCP status:
lr mcp status
lr mcp test # Test connection to Lightroom
Option C: Direct CLI / Scripting
Use the lr command directly for shell scripting and automation:
lr system ping
lr catalog list --limit 10
lr develop set Exposure 1.5
Verify Connection
- Open Lightroom Classic
- Go to File > Plugin Extras > Start CLI Bridge
- Run:
lr system ping
# -> pong
lr system status
Note: The bridge does not start automatically. You must select "Start CLI Bridge" from the menu each time you launch Lightroom.
Usage Examples
# Get currently selected photo
lr catalog get-selected
# Set develop parameters
lr develop set Exposure 1.5 Contrast 25 Clarity 30
# Apply AutoTone
lr develop auto-tone
# Apply S-curve to tone curve
lr develop curve s-curve
# Create a mask and add a brush
lr develop mask create
lr develop mask add brush
# Apply a preset
lr develop preset "Vivid Landscape"
# Rating and flag operations
lr selection set-rating 5
lr selection flag
# Search the catalog
lr catalog search "landscape" --limit 20
# Find photos with filters (v1.2.0)
lr catalog find --rating 4 --rating-op ">=" --file-format RAW
lr catalog find --capture-date-from "2024-06-01" --keyword "portrait"
# Batch develop editing
lr develop batch-set --photo-ids 123,456,789 Exposure 0.5
# Find likely exposure-bracketed groups
lr catalog find-brackets --photo-ids 123,456,789
lr catalog find-brackets --all --max-seconds-between 2
# List/search develop presets
lr catalog develop-presets --query "Portra"
# Get photos from a collection
lr catalog collection-photos 12345
# JSON output
lr -o json develop get-settings