Skip to content

dotnet tool execute 2dog

2dog is the command-line tool that scaffolds .NET host projects around a Godot project: your project directory becomes the solution root, and desktop, browser, test, and WinForms hosts live in nested folders Godot ignores. It never moves, renames, or deletes existing files.

The tool and the matching dotnet new template ship together in the 2dog NuGet package.

Installation

No installation needed - dnx (part of the .NET 10 SDK) downloads and runs the latest version:

bash
dnx 2dog add

Or install it as a global tool:

bash
dotnet tool install -g 2dog
2dog add

Run without a verb, 2dog prints its version info and usage. 2dog new and 2dog add are interactive when no host flags are given: they ask which hosts to add, show their plan, and wait for confirmation. Any host flag, --yes, or --non-interactive turns the prompts off for scripts and CI.

Commands

CommandEffect
2dogPrint version info and usage
2dog new [Name] [dir]Create a new Godot project with 2dog hosts
2dog add [path]Add hosts to an existing Godot project
2dog convert [path]Alias of add for a project with no hosts yet
2dog pack list <file.pck>List a .pck's contents by size (no engine involved)
2dog versionPrint the tool and referenced package versions
2dog helpShow usage

Inspecting packs

2dog pack list parses a pack's directory straight from the file - no engine, no project - and prints every entry sorted by size. Useful to answer "why is my pck 99 MiB?" or to confirm an asset (say, a fallback font) actually made it into a web publish:

bash
2dog pack list MyGame.web/AppBundle/godot.pck

Host flags

Each flag adds one host; the folder name is optional. Repeat a flag to add a second host of the same kind.

FlagEffect
--desktop [folder]Generic desktop host with your own Main()
--web [folder]Browser (WebAssembly) host
--tests [folder]xUnit test project
--winforms [folder]WinForms host (Windows-only; never part of the default set)
--no-desktop, --no-web, --no-testsLeave a host out of the default set

Options

OptionEffect
-n, --name <BaseName>Project name (new) or base-name override
-o, --output <dir>Directory for a new project
-y, --yesUse the flags and defaults without prompting
--non-interactiveSame as --yes
--dry-runPrint planned actions without changing anything
--forceOverwrite existing scaffolded files; never delete or move files
--no-restoreSkip the final dotnet restore
--verboseShow extra output
--versionSame as the version command

Versions and pinning

2dog version prints the tool version and every package a scaffold references:

text
2dog 4.7.1.65 - https://2dog.dev

tool + packages  4.7.1.65    2dog, 2dog.engine, 2dog.xunit
native binaries  4.7.1.35    2dog.win-x64, 2dog.linux-x64, 2dog.osx-arm64, 2dog.browser-wasm, 2dog.tools
Godot SDK        4.7.1       Godot.NET.Sdk, GodotSharp

--version under dnx

dnx 2dog --version never reaches the tool: --version <VERSION> is dnx's own option and selects which version of the 2dog package to download and run. Use dnx 2dog version to print versions, and dnx 2dog@4.7.1.65 (or the --version option) to run a specific tool version.

Learn more