AgentSpace.Avalonia.XTerm 0.0.1

dotnet add package AgentSpace.Avalonia.XTerm --version 0.0.1
                    
NuGet\Install-Package AgentSpace.Avalonia.XTerm -Version 0.0.1
                    
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="AgentSpace.Avalonia.XTerm" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AgentSpace.Avalonia.XTerm" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AgentSpace.Avalonia.XTerm" />
                    
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 AgentSpace.Avalonia.XTerm --version 0.0.1
                    
#r "nuget: AgentSpace.Avalonia.XTerm, 0.0.1"
                    
#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 AgentSpace.Avalonia.XTerm@0.0.1
                    
#: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=AgentSpace.Avalonia.XTerm&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AgentSpace.Avalonia.XTerm&version=0.0.1
                    
Install as a Cake Tool

Avalonia.XTerm

A 24-bit truecolor terminal control for Avalonia, the X11 PRIMARY clipboard companion, and two desktop tools built on both.

A Linux/Windows monorepo with two NuGet libraries and two dotnet tool apps. All four ship from the same v* tag.

<table> <tr> <td><img src="docs/screenshots/myterm.png" alt="MyTerm" width="460"></td> <td><img src="docs/screenshots/agentspace.png" alt="AgentSpace" width="460"></td> </tr> <tr> <td align="center"><sub><b>MyTerm</b> — tabbed terminal, drag tear-off / merge, tint, profiles. Here it's rendering this very README to itself.</sub></td> <td align="center"><sub><b>AgentSpace</b> — workspace launcher, SSH file tree, SQLite history. Sidebar tracks active and recent spaces.</sub></td> </tr> </table>

<details> <summary><sub>more AgentSpace shots</sub></summary> <table> <tr> <td><img src="docs/screenshots/agentspace-files.png" alt="File tree + code preview" width="460"></td> <td><img src="docs/screenshots/agentspace-agent.png" alt="Agent + terminal" width="460"></td> </tr> <tr> <td align="center"><sub>File tree with transparent AvaloniaEdit code preview, syntax-highlighted via TextMate grammars.</sub></td> <td align="center"><sub>Agent / terminal split — Avalonia.XTerm hosting an agent CLI alongside a free shell.</sub></td> </tr> </table> </details>

What's in here

What Install
Avalonia.XTerm Real 24-bit truecolor terminal with PTY. Transparent bg, OSC title, bell, color schemes, middle-click paste, auto-copy on selection. Single 96 KB DLL (VTDotNet baked in). dotnet add package Avalonia.XTerm
Avalonia.PrimarySelection X11 PRIMARY clipboard for any Avalonia app. Pure libX11 P/Invoke. 6 KB stub on Windows / macOS — zero platform metadata. dotnet add package Avalonia.PrimarySelection
MyTerm Polished tabbed terminal. Drag tear-off, drag-to-merge, bell + activity badges, aterm-style tint overlay, font zoom. dotnet tool install -g MyTerm  →  myterm
AgentSpace SSH-aware workspace/session launcher. File tree, SQLite-backed history, transparent code preview. dotnet tool install -g AgentSpace  →  agentspace

Quick start (library)

<Window xmlns:xterm="clr-namespace:Avalonia.XTerm;assembly=Avalonia.XTerm">
  <xterm:XTermControl Shell="bash" FontSize="14"
                      Background="#FF1E1E1E" Foreground="#FFCCCCCC" />
</Window>
Terminal.TitleChanged += (_, e) => Title = e.Title;
Terminal.BellEvent    += (_, _) => SystemSounds.Beep.Play();

Properties: Shell, WorkingDirectory, FontFamily, FontSize, Background, Foreground, CursorBlink, MaxScrollback, ColorScheme, BackgroundOpacity.

Events: TitleChanged, BellEvent, OutputReceived, SessionEnded.

Color schemes: ColorScheme.Default, Solarized, Dracula (swap at runtime).

Quick start (PRIMARY clipboard)

using Avalonia.PrimarySelection;

// Middle-click paste handler
var text = await PrimarySelection.GetTextAsync();

// Selection-complete handler
PrimarySelection.SetText(highlightedText);

Safe no-op on Windows / macOS / headless Linux. IsSupported tells you up front. The package ships a Windows / macOS stub plus a Linux-only X11 implementation under runtimes/linux/ — Windows binaries don't ship any libX11 metadata.

Repository layout

src/
├── Avalonia.XTerm/                  the public terminal control
├── Avalonia.PrimarySelection/       the X11 PRIMARY clipboard (stub variant)
├── Avalonia.PrimarySelection.Linux/ the X11 implementation (packed into runtimes/linux/)
├── Avalonia.AgentDebug/             Debug-only: HTTP/1.0 over named pipe so
│                                    agents can drive the running app via curl
└── VTDotNet/                        VT/ANSI parser sources, compiled INTO
                                     Avalonia.XTerm.dll — single self-contained DLL.
apps/
├── MyTerm/                          tabbed terminal app
└── AgentSpace/                      workspace launcher
samples/
└── BasicSample/                     ~10 lines — minimal embedding example
tests/
└── Avalonia.XTerm.Tests/            183 xUnit tests
scripts/
└── pack.sh                          builds ./artifacts/nuget/*.nupkg

Shared MSBuild config (authors, package metadata, SourceLink) lives in /Directory.Build.props.

Driving the apps from a shell (Debug builds only)

Avalonia.AgentDebug opens a Unix domain socket / named pipe per app and speaks HTTP/1.0. Built-in to Debug builds, completely absent from Release.

# Inspect the visual tree
curl --unix-socket /tmp/CoreFxPipe_MyTerm-debug http://_/tree

# Click a named control
curl --unix-socket /tmp/CoreFxPipe_AgentSpace-debug "http://_/click?path=NewSpaceButton"

# Save a screenshot
curl --unix-socket /tmp/CoreFxPipe_MyTerm-debug -o shot.png http://_/screenshot

# Send a key
curl --unix-socket /tmp/CoreFxPipe_AgentSpace-debug "http://_/key?path=PathBox&key=Enter"

(The screenshots at the top of this README were captured this way.)

Building / packing

dotnet build Avalonia.XTerm.slnx       # everything
dotnet test  Avalonia.XTerm.slnx       # 183 tests
scripts/pack.sh                         # all .nupkgs → artifacts/nuget/

Requirements

  • .NET 10 SDK
  • Avalonia 12.0+
  • Linux, Windows, macOS for the library; PTY apps need Linux/macOS PTY or Windows ConPTY (handled by Porta.Pty).

License

MIT — see LICENSE. VTDotNet is a derivative of VtNetCore — MIT, attribution preserved in LICENSE.VtNetCore and NOTICE.md.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos 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
0.0.1 23 5/17/2026