Buggernaut 1.0.3

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

Buggernaut

.NET 10 C%23 CLI Contributions Welcome NuGet License: WTFPL v2

Buggernaut is a CLI tool that generates C# exercises with built-in bugs through an LLM provider of your choice.
The idea is simple: open a file, find the bug, run the tests, get better at programming.

The project is designed to give junior developers a practical way to train bug hunting and bug fixing, while building a stronger understanding of programming concepts without leaving their own development environment.

Inspired by ThePrimeagen's Kata-Machine. Thanks to Marcus Loof for ideas and feedback.


What is this?

You run a command. Buggernaut asks an AI for a C# exercise, writes a .cs file with an intentional bug, and adds a matching test file. Your task is to find and fix the bug until the tests are green.

No browser tabs. No sign-up. Everything happens in your editor.

Quick demo

Quick demo of Buggernaut


Contents


Prerequisites

  • .NET 10 SDK
  • An API key for any provider (for example Gemini, OpenAI, Anthropic, Mistral)

Ollama works without an API key, but requires a local server.

Want to try it without an API key first? Use --dry-run.

Dry run without an API key


Quick start

Run all commands from Buggernaut/ unless stated otherwise.

1) Install the tool

cd Buggernaut
dotnet tool restore

2) Save API key (one-time setup)

Run in tools/Buggernaut.Generator/:

cd tools/Buggernaut.Generator
dotnet user-secrets set "LLM:Gemini:ApiKey" "your-key"

The key is stored locally on your machine and is never committed to Git.

Using another provider? Just replace Gemini:

dotnet user-secrets set "LLM:OpenAI:ApiKey" "your-key"
dotnet user-secrets set "LLM:Anthropic:ApiKey" "your-key"
dotnet user-secrets set "LLM:Mistral:ApiKey" "your-key"
dotnet user-secrets set "LLM:OpenRouter:ApiKey" "your-key"

Need help finding your provider API key?

3) Generate your first exercise

cd Buggernaut
dotnet buggernaut generate

A new .cs file appears in src/Buggernaut.Exercises/. Open it, find the bug, and fix it.

Quick start with a generated exercise


Daily usage

dotnet buggernaut generate                         # generate a new exercise
dotnet buggernaut generate -c LINQ -d Hard         # choose category and difficulty
dotnet buggernaut generate --dry-run               # test without API key

dotnet test exercises.slnf                         # run your exercise tests

dotnet buggernaut hint <ClassName>                 # get a hint when stuck
dotnet buggernaut explain <ClassName>              # get explanation when tests pass

Tip: See all flags and categories with:

dotnet buggernaut --help

CLI help for the generate command


Configuration

Change LLM provider

Open tools/Buggernaut.Generator/appsettings.json and change "Provider":

{
  "LLM": {
    "Provider": "Gemini"
  }
}

Available providers: Gemini, OpenAI, Anthropic, Mistral, Ollama, OpenRouter.

Missing a provider? Open an issue and suggest it.

Want to run fully local without internet? Set up Ollama and use:

{
  "LLM": {
    "Provider": "Ollama",
    "Ollama": {
      "BaseUrl": "http://localhost:11434/v1",
      "Model": "llama3"
    }
  }
}
Optional: set model per provider
{
  "LLM": {
    "Provider": "Gemini",
    "Gemini": {
      "Model": "gemini-2.5-flash"
    },
    "OpenAI": {
      "Model": "gpt-4o-mini"
    },
    "Anthropic": {
      "Model": "claude-3-5-haiku-latest"
    },
    "Mistral": {
      "Model": "mistral-small"
    },
    "Ollama": {
      "BaseUrl": "http://localhost:11434/v1",
      "Model": "llama3"
    }
  }
}

Run tests

Command What it runs
dotnet test exercises.slnf Your exercise tests (Buggernaut.Tests)
dotnet test generator.slnf Generator's own unit tests
dotnet test All tests

Common issues

dotnet buggernaut is not found

  • Run dotnet tool restore in Buggernaut/.

API key is not found

  • Confirm user-secrets was set in tools/Buggernaut.Generator/.

Wrong provider or model is used

  • Check tools/Buggernaut.Generator/appsettings.json.

Want to contribute?

Great! Read CONTRIBUTING.md for branch, commit, and pull request guidelines. No pressure, no stress - we learn together.

Contact

Want to reach me? You can find contact details on GitHub, or send an email.

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.0.3 89 9/3/2026