cli-anything-photoshop

Automates Adobe Photoshop via Windows COM with CLI commands for layers, selections, text, and export.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/HalseyYang/Skills-HY --skill cli-anything-photoshop-halseyyang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-anything-photoshop
Source: https://github.com/HalseyYang/Skills-HY/tree/main/cli-anything-photoshop
Command: npx skills add https://github.com/HalseyYang/Skills-HY --skill cli-anything-photoshop-halseyyang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pywin32.

What problem does it solve? Manually performing repetitive Photoshop edits—creating documents, managing layers, adjusting selections, adding text, and exporting files—is slow and cannot be scripted by AI agents. This Skill exposes Photoshop's COM automation interface as a structured CLI with JSON output, enabling both humans and AI agents to drive Photoshop programmatically. ## Core Features & Use Cases - Full Project & Document Control: Create, open, save, resize, crop, rotate, and change color modes of PSD files from the command line. - Layer, Selection & Text Operations: Add, duplicate, reorder, merge, and blend layers; manage selections with feather/expand/contract; add and edit text layers with font, size, and color control. - Agent-Friendly JSON Mode & REPL: The --json flag returns structured output for AI parsing, --dry-run previews changes without saving, and an interactive REPL reduces Photoshop startup overhead. - Use Case: An AI agent receives a request to generate a poster: it creates an 800x600 PSD, adds a red 48pt Arial title layer, lists layers to verify, and exports the result as a PNG—all through sequential CLI calls. ## Quick Start Ask the AI to create a new 800x600 PSD named poster.psd, add a text layer saying "Hello World" in red Arial 48pt, and export it as a PNG using the cli-anything-photoshop command with JSON output.

Frequently Asked Questions about cli-anything-photoshop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Photoshop from the command line?

Install the harness with pip install -e . from the agent-harness directory, then run cli-anything-photoshop commands for project, document, layer, selection, text, and export operations. Use the --json flag for structured output suitable for scripts and AI agents.

How do I add a text layer to a PSD file programmatically?

Run cli-anything-photoshop --project file.psd text add with options -t for content, -f for font, -s for size, and -c for color. The command creates the text layer through Photoshop's COM interface and reports the result.

Does Photoshop COM automation work on macOS?

No. Although the upstream README mentions macOS AppleScript/JXA support, the current code depends directly on win32com.client and Windows COM. It requires Windows 10/11 with Photoshop 2023 or later and the pywin32 package.

Can AI agents use this Photoshop CLI safely without saving changes?

Yes. The --dry-run flag executes commands without saving to disk, letting agents preview operations first. The --json flag returns structured output and errors, and non-zero exit codes signal failures with JSON error objects on stderr.

What image formats can I export from Photoshop via CLI?

The export save command accepts a -f format option along with -q quality and -w/-h dimensions, supporting formats such as PNG. The export runs through Photoshop's own engine, so formats registered with the installed Photoshop version are available.