Topwater 0.1.0-preview.9

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

Topwater

Topwater gives an LLM agent one bash tool backed by a simulated Linux machine running inside your .NET process: a bash interpreter, an in-memory Ubuntu-like filesystem, about 140 commands (grep, sed, awk, jq, find, tar, git, ...), and your own C# methods as command-line programs.

dotnet add package Topwater --prerelease

Use

using Topwater;

var shell = new Shell();
shell.Fs.WriteAllText("/home/agent/notes.txt", "hello");

// Give your model one tool: BashTool.Name, BashTool.Description, BashTool.InputSchemaJson.
// When it calls the tool, run the command and send the text back:
string output = await BashTool.ExecuteAsync(shell, "grep -c hello notes.txt");

Register your own methods and the model finds them with help and --help, and pipes them into jq like any program:

public class Tools
{
    [Command("orders", Description = "List orders")]
    public IEnumerable<Order> Orders(string? status = null) => Db.Orders(status);
}

shell.Register(new Tools());   // agent: orders --status open | jq -r '.[].Customer'

Safe by default

Commands are interpreted in your process and only touch the in-memory filesystem. Runaway loops, slow regular expressions, oversized output, calls that run too long and runaway memory or disk use are all cut off. Nothing the agent types reaches your machine or the network unless you register a real host program, an MCP server or an HTTP API, or allow a list of web sites with AllowWeb.

More

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Topwater:

Package Downloads
Topwater.AI

Give a Microsoft.Extensions.AI chat client a Topwater shell as its one bash tool: chatOptions.Tools = [shell.AsAIFunction()].

Topwater.Mcp

Mount any MCP server as a command-line program inside a Topwater shell, so the model discovers tools with --help instead of loading every tool definition up front.

Topwater.Replay

Replay Topwater recordings as regression tests, or against real bash in an Ubuntu container (Docker) to find where the simulation differs from Linux.

Topwater.Containers

Move a Topwater machine into a real Docker container and back: a snapshot becomes a Docker build context or image, and a real container (or image) becomes a snapshot.

Topwater.Agents

Run Microsoft Agent Framework's shell tool and file tools in a Topwater shell: a ShellExecutor and an AgentFileStore over the in-process sandbox, so no command reaches the host.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.9 0 11/30/2026
0.1.0-preview.8 59 11/29/2026
0.1.0-preview.7 191 11/28/2026
0.1.0-preview.6 121 11/28/2026
0.1.0-preview.5 207 11/27/2026
0.1.0-preview.4 76 11/26/2026
0.1.0-preview.3 80 11/26/2026
0.1.0-preview.2 78 11/25/2026
0.1.0-preview.1 68 11/25/2026