VTubeStudio.Client 0.1.2-dev1

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

VTubeStudio.Client

NuGet NuGet downloads Build License

Modern .NET 10 / C# 14 client library for the VTube Studio Public API. AOT-friendly, System.Text.Json source-generated, fully typed.

Install

dotnet add package VTubeStudio.Client
dotnet add package VTubeStudio.Client.DependencyInjection   # optional, only if you use Microsoft.Extensions.DependencyInjection

Packages

Package Purpose
VTubeStudio.Client Core WebSocket client, typed message records, typed event hub
VTubeStudio.Client.DependencyInjection AddVTubeStudioClient(...) for Microsoft.Extensions.DependencyInjection

Quick start

using VTubeStudio.Client;
using VTubeStudio.Client.Events;
using VTubeStudio.Client.Messages;

await using var client = new VTubeStudioClient(new VTubeStudioClientOptions
{
    PluginName = "MyPlugin",
    PluginDeveloper = "Me",
});

await client.ConnectAsync();

// First run: VTube Studio prompts the user to approve. On approval the token
// is returned; persist it so subsequent runs re-authenticate silently. If the
// stored token is later invalidated, the client re-requests automatically.
string token = await client.RequestAndAuthenticateAsync(existingToken: null);
// persist `token` to your secret store

// Resource discovery
HotkeysInCurrentModelResponse hotkeys = await client.GetHotkeysAsync();
foreach (AvailableHotkey hk in hotkeys.AvailableHotkeys)
{
    Console.WriteLine($"{hk.HotkeyId}  {hk.Name}  ({hk.Type})");
}

// Trigger by id
await client.TriggerHotkeyAsync(new HotkeyTriggerRequest { HotkeyId = hotkeys.AvailableHotkeys[0].HotkeyId });

// Subscribe to typed events. No JsonTypeInfo or event-name string needed;
// every payload type carries both via IVTubeStudioEvent<TSelf>.
client.Events.On<HotkeyTriggeredEventPayload>(
    e => Console.WriteLine($"hotkey {e.HotkeyName} triggered (by API: {e.HotkeyTriggeredByApi})"));
await client.SubscribeAsync<HotkeyTriggeredEventPayload>();

await Task.Delay(Timeout.InfiniteTimeSpan);

With dependency injection

var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddVTubeStudioClient(opt =>
{
    opt.PluginName = "MyPlugin";
    opt.PluginDeveloper = "Me";
});
var host = builder.Build();

var vts = host.Services.GetRequiredService<VTubeStudioClient>();
await vts.ConnectAsync();

What's covered

  • Session / state: APIStateRequest, StatisticsRequest, FaceFoundRequest
  • Authentication: full token-request + session-authenticate two-step flow handled by one method
  • Models: current model, available models, load, move (with native server-side interpolation)
  • Hotkeys: list, trigger by id (with item-instance scoping)
  • Expressions: state, activate / deactivate
  • Parameters: input + Live2D parameter lists, value query, custom-parameter injection
  • ArtMesh: list, color tint with the full ArtMeshMatcher semantics
  • Items: list, load, unload (single / by ids / by filename / all-by-plugin)
  • Events: subscribe / unsubscribe + typed config records, typed event hub via IVTubeStudioEvent<TSelf>

Sample

samples/VTubeStudio.Client.Sample/ is an interactive Spectre.Console app that exercises every public surface: connect, authenticate, model swap, hotkey trigger, expression cycle, item load with auto-unload, ArtMesh tint cycle, model orbit, custom parameter injection, live event tailing.

cd samples/VTubeStudio.Client.Sample
dotnet run

Contributing

See CONTRIBUTING.md and CODE_OF_CONDUCT.md.

License

MIT, see LICENSE.txt.

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on VTubeStudio.Client:

Package Downloads
VTubeStudio.Client.DependencyInjection

DI extensions for VTubeStudio.Client. Registers the client and its options in Microsoft.Extensions.DependencyInjection.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2-dev1 108 6/23/2026
0.1.1-dev1 104 6/23/2026
0.1.0 142 6/21/2026
0.1.0-dev1 185 5/20/2026