VTubeStudio.Client
0.1.2-dev1
dotnet add package VTubeStudio.Client --version 0.1.2-dev1
NuGet\Install-Package VTubeStudio.Client -Version 0.1.2-dev1
<PackageReference Include="VTubeStudio.Client" Version="0.1.2-dev1" />
<PackageVersion Include="VTubeStudio.Client" Version="0.1.2-dev1" />
<PackageReference Include="VTubeStudio.Client" />
paket add VTubeStudio.Client --version 0.1.2-dev1
#r "nuget: VTubeStudio.Client, 0.1.2-dev1"
#:package VTubeStudio.Client@0.1.2-dev1
#addin nuget:?package=VTubeStudio.Client&version=0.1.2-dev1&prerelease
#tool nuget:?package=VTubeStudio.Client&version=0.1.2-dev1&prerelease
VTubeStudio.Client
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
ArtMeshMatchersemantics - 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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
-
net11.0
- No dependencies.
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 |