PsDotNet.Kevlar
2.4.0
dotnet add package PsDotNet.Kevlar --version 2.4.0
NuGet\Install-Package PsDotNet.Kevlar -Version 2.4.0
<PackageReference Include="PsDotNet.Kevlar" Version="2.4.0" />
<PackageVersion Include="PsDotNet.Kevlar" Version="2.4.0" />
<PackageReference Include="PsDotNet.Kevlar" />
paket add PsDotNet.Kevlar --version 2.4.0
#r "nuget: PsDotNet.Kevlar, 2.4.0"
#:package PsDotNet.Kevlar@2.4.0
#addin nuget:?package=PsDotNet.Kevlar&version=2.4.0
#tool nuget:?package=PsDotNet.Kevlar&version=2.4.0
PsDotNet.Kevlar
Async .NET client for Adobe Photoshop's Remote Connection TCP protocol — run ExtendScript, fetch pixel thumbnails, and receive event notifications from any .NET 8 application on Windows.
This is a companion package to PsDotNet, not a replacement. PsDotNet automates Photoshop via COM (in-process, rich object model). Kevlar speaks the Remote Connection wire protocol over TCP — the same channel used by Adobe's own Creative Cloud extensions. The two approaches are complementary: COM for deep automation on the same machine; Kevlar for lightweight remote or cross-process scripting, thumbnail extraction, and live event feeds.
dotnet add package PsDotNet.Kevlar
Quick start
using PsDotNet.Kevlar;
// Connect to Photoshop's Remote Connection listener (default port 49494).
// Enable it in Photoshop: Edit > Preferences > Plug-Ins > Enable Remote Connections.
await using PhotoshopConnection conn =
await PhotoshopConnection.ConnectAsync("localhost", 49494, "mypassword");
// Run an ExtendScript expression and get the result back as a string.
string version = await conn.SendScriptAsync("app.version;");
Console.WriteLine($"Photoshop version: {version}");
// Fetch a bitmap thumbnail of the active document (returns a System.Drawing.Bitmap).
System.Drawing.Bitmap thumb = await conn.GetThumbnailAsync();
// Subscribe to live Photoshop events.
conn.NotificationReceived += (_, e) =>
Console.WriteLine($"[{e.Notification}] {e.Payload}");
await conn.SubscribeEventsAsync(new[]
{
PhotoshopNotification.documentChanged,
PhotoshopNotification.currentDocumentChanged,
});
// Keep the process alive while Photoshop sends events …
await Task.Delay(Timeout.Infinite);
Windows only
PsDotNet.Kevlar targets net8.0-windows. It depends on System.Drawing.Common (for Bitmap) which requires Windows. The package will not restore on non-Windows targets.
Requirements
- Windows
- .NET 8 or newer
- Adobe Photoshop with Remote Connections enabled (Edit > Preferences > Plug-Ins > Enable Remote Connections)
Security
Read before deploying outside a trusted network.
Adobe's Remote Connection protocol has several inherent cryptographic weaknesses that this library faithfully implements in order to interoperate with Photoshop:
| Weakness | Detail |
|---|---|
| 3DES-CBC encryption | Message bodies are encrypted with Triple-DES in CBC mode. 3DES is considered legacy and provides only 112 effective key bits. |
| Fixed all-zero IV | Every message uses the same initialisation vector (00 00 00 00 00 00 00 00). Reusing a static IV with CBC leaks information about identical plaintext prefixes. |
| No message authentication (MAC) | The protocol carries no HMAC or authenticated encryption tag. A network attacker with write access can tamper with ciphertext without detection. |
These weaknesses are mandated by Adobe's wire protocol — they are not design choices of this library. Kevlar cannot fix them without breaking compatibility with Photoshop.
Recommended use: localhost or isolated LAN where you fully trust all hosts. Do not expose port 49494 to the public internet or to untrusted networks.
License
MIT — see https://github.com/nodewerks/psdotnet/blob/main/LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows7.0
- System.Drawing.Common (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.