PsDotNet.Kevlar 2.4.0

dotnet add package PsDotNet.Kevlar --version 2.4.0
                    
NuGet\Install-Package PsDotNet.Kevlar -Version 2.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PsDotNet.Kevlar" Version="2.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PsDotNet.Kevlar" Version="2.4.0" />
                    
Directory.Packages.props
<PackageReference Include="PsDotNet.Kevlar" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PsDotNet.Kevlar --version 2.4.0
                    
#r "nuget: PsDotNet.Kevlar, 2.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PsDotNet.Kevlar@2.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PsDotNet.Kevlar&version=2.4.0
                    
Install as a Cake Addin
#tool nuget:?package=PsDotNet.Kevlar&version=2.4.0
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.4.0 138 6/21/2026
2.3.0 105 6/20/2026
2.2.0 107 6/20/2026