dotnet tool execute 2dog
2dog sets up .NET host projects around a Godot project, keeps them healthy, and updates them.
"Everything at my pawtips!"
Your project directory stays the solution root; added hosts live in nested folders that Godot ignores.
Installation
dnx 2dog add # run latest from nuget
dotnet tool install -g 2dog # or install it globallydnx 2dog creates files. It also edits *.csproj, project.godot and, if necessary, the solution and Directory.Build.props in place.
Only two changes rename files. The tool asks you before it makes either change:
.sln→.slnxmigration (renames the.slnto.sln.old)--rename, which renames the .NET project, its csproj andassembly_nameto a name without spaces
The tool ships as 2dog. The matching dotnet new template ships separately as 2dog.templates.
Commands
| Command | Use it to |
|---|---|
2dog new | Create a Godot project with 2dog hosts |
2dog add | Add hosts to an existing Godot project |
2dog doctor | Check the project and this machine, fix what can be fixed, explain build failures |
2dog update | Bring the project's 2dog packages to this tool's versions |
2dog pack | List a .pck's contents |
2dog repl | Attach to a running REPL host, or run code in it from scripts and agents (--session, --timeout, --pipe) |
2dog skill | Write the REPL working guide for coding agents (--claude, --codex) |
2dog version | Print the tool and package versions |
2dog help | Show the usage, or the help for one verb |
2dog alone prints the version info and the usage. On a terminal, new, add and doctor show prompts when no flag gives the answer. Host flags skip the project wizard. Before the restore, the tool can still offer to install a missing workload (wasm-tools, android) for newly selected hosts. --yes, pipes, and CI skip these offers. To install a workload without a prompt, use --install-wasm-tools or --install-android-workload. To update workloads, use 2dog update --update-workloads.
Host flags
new and add take one flag per host. The folder is optional; a repeated flag adds a second host of the same kind. Test hosts are opt-in: choose --xunit, --gdunit or --nunit, or select a framework in the interactive picker.
| Flag | Host |
|---|---|
--generic [folder] | 2dog (generic .NET) with your own Main() |
--web [folder] | Web host |
--webxr [folder] | WebXR host |
--xunit [folder] | xUnit test project |
--repl [folder] | C# REPL host |
--gdunit [folder] | GdUnit GDScript test project |
--nunit [folder] | NUnit test project |
--winforms [folder] | WinForms host; Windows-only |
--winui [folder] | WinUI 3 host; builds only on Windows |
--avalonia [folder] | Avalonia host |
--qt [folder] | Qt Quick host; needs CMake, Ninja and a C++ toolchain |
--blazor [folder] | Blazor Web App host; needs wasm-tools |
--maui [folder] | MAUI host; Windows, Android and iOS, needs MAUI workloads |
--android [folder] | Android host; experimental, needs the android workload |
--ios [folder] | iOS host; experimental, needs the ios workload and a Mac with Xcode |
--no-generic, --no-web | Exclude a host from the default set (every kind has a --no-<host> form) |
All hosts except --generic and --web are opt-in: an unattended run never adds them.
Build options
new and add show build options after the host picker. These flags set the same options without a prompt:
| Flag | Effect |
|---|---|
--double-precision [true|false] | Use matching .double engine, bindings and native packages across the game and all hosts |
--web-threads [true|false] | Enable experimental multithreading for Web and Blazor clients |
New projects default to single precision and single-threaded web builds. If you omit these flags, add keeps the project's settings. Pass false to disable a setting. Double precision needs a matching double precision Godot editor. Threaded browser builds need cross-origin isolation headers: Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. See web multithreading for serving requirements.
Global options
These options work with every verb. You can also put them before the verb (2dog --json add).
| Option | Effect |
|---|---|
-y, --yes | Do not prompt; take the flags and defaults (also --non-interactive, --no-input) |
-h, --help | Show help; after a verb, the help for that verb |
--version | Same as 2dog version; see choosing a tool version |
Write a value after its option, with a space or =: --name Foo, --name=Foo. -- ends option parsing. If you mistype an option or a verb, the tool suggests a correction.
Output
| Option | Effect |
|---|---|
--json | One JSON document on stdout, nothing on stderr, also on failure ("ok": false); implies --yes |
-q, --quiet | Results and problems only: no header, plan, progress or next steps |
--plain | No colour, no cursor movement, ASCII markers (also TERM=dumb) |
--no-color | No colour; cursor movement stays (also NO_COLOR) |
--accessible | Numbered yes/no questions instead of lists, no spinners (also TWODOG_ACCESSIBLE=1) |
-v, --verbose | Extra detail on stderr: subprocess command lines and output, stack traces |
The report goes to stdout. Diagnostics (error:, warning:, note:, hint:, verbose:, spinners) go to stderr, so 2dog add --json | jq . and 2dog doctor 2>errors.log both work. In a pipe or a CI environment, the tool shows no prompts or animations and uses ASCII markers. If it needs an answer, it uses the default and writes a note:. See CLI environment variables for the CI indicators and colour overrides.
Exit codes
| Code | Meaning |
|---|---|
0 | Success, including --dry-run, "Nothing to do", and a declined plan |
1 | Usage error: unknown option or verb, missing value, wrong positional count; the error names the verb's --help |
2 | Tool error: project state, I/O, invalid XML, a failed subprocess, a plan that stopped half-way (the report says which steps finished), an unexpected exception (--verbose adds the stack trace) |
3 | doctor: findings remain after the fixes (errors; warnings too under --strict), or the --build failed; repl exec: a submission failed |
124 | repl exec: --timeout cancelled a submission |
130 | Cancelled with Ctrl+C |
Versions
The Version guide explains how to run a specific tool release, print its version, and keep your project's package versions fixed.