BunDotNet.Cli 1.3.0

dotnet tool install --global BunDotNet.Cli --version 1.3.0
                    
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 BunDotNet.Cli --version 1.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=BunDotNet.Cli&version=1.3.0
                    
nuke :add-package BunDotNet.Cli --version 1.3.0
                    

GitHub NuGet NuGet

BunDotNet

Tools that help integrate Bun, A fast all-in-one JavaScript runtime, into your .NET projects.

Library

Install the NuGet package:

dotnet add package BunDotNet

Use it like this:

using BunDotNet;

// install the latest version of Bun
var runtime = await BunInstaller.InstallAsync();

// or install a specific version
var runtime = await BunInstaller.InstallAsync(version: BunVersion.Parse("1.3.6"));

// then use the bun cli to run a script
await runtime.RunAsync(args: ["run", "script.ts"], workingDirectory: Environment.CurrentDirectory);

// or list the installed versions
var versions = await BunInstaller.ListVersionsAsync();

CLI Tool Usage

This is a .NET CLI tool that wraps the Bun CLI. It automatically sets up the Bun for you. The only requirement is .NET 10.

Run a TypeScript or JavaScript file using Bun from the command line:

dotnet tool exec BunDotNet.Cli -- wrapper -- run script.ts

Do you need a specific version of Bun? No problem:

dotnet tool exec BunDotNet.Cli -- wrapper --version 1.3.6 -- run script.ts

More commands and options can be found by running:

dotnet tool exec BunDotNet.Cli -- --help

You can also install the CLI tool in your project:

dotnet tool install BunDotNet.Cli

Then run it like this:

dotnet bun wrapper -- run script.ts

Contributing

Pull requests are welcome. Please use Conventional Commits to keep commit messages consistent.

Acknowledgements

  • Bun is an amazing project. This would not be possible without it.

License

Distributed under the MIT License. See LICENSE for more information.

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
1.3.0 2,569 2/26/2026
1.2.0 4,475 1/20/2026
1.1.0 156 1/18/2026
1.0.4 99 1/18/2026
1.0.0 89 1/17/2026