AgentSpace 0.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global AgentSpace --version 0.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local AgentSpace --version 0.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=AgentSpace&version=0.0.3
                    
nuke :add-package AgentSpace --version 0.0.3
                    

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.

This package has no dependencies.

Version Downloads Last Updated
0.1.7 54 5/18/2026
0.1.6 52 5/18/2026
0.1.5 52 5/18/2026
0.1.4 55 5/18/2026
0.1.2 63 5/18/2026
0.1.1 62 5/18/2026
0.0.3 57 5/17/2026
0.0.2 52 5/17/2026
0.0.1 59 5/17/2026