rig 1.1.0

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

rig

ci NuGet License: MIT

A convention-first .NET dev launcher, packaged as a dotnet tool. rig wraps the everyday dotnet loop — run, build, test, coverage, kill, publish — with project discovery, fuzzy matching, an interactive menu, shell completion, and per-repo custom commands. The overriding goal is less typing.

dotnet tool install --global rig
rig                 # interactive menu
rig test Archive    # run a test class (fuzzy match)
rig coverage --open # coverage + HTML report, opened

Why

The valuable, reusable part of a hand-rolled dev launcher is the ergonomics; the repo-specific lore (project names, test paths, build scripts) should be data, not code. rig is convention-first: in a vanilla single-app + single-test repo it needs zero configuration, and an optional .rig.json supplies only what can't be inferred.

Verbs

Verb Alias What
run [project] r Run a runnable project (-w watch, -c config, -f framework, --launch-profile; args after -- go to the app)
build b Build the solution (-w watch, -c config)
rebuild rb Delete in-tree bin/obj (scoped to solution projects), then build (-c; --dry-run lists)
restore res dotnet restore the solution
clean dotnet clean the solution (MSBuild-aware; lighter than rebuild)
format fmt dotnet format the solution
test [name] t Run tests; bare name → fuzzy class match; ~ = !~ != filter shorthand; --log, -w, -f, -c
coverage [name] c Tests + coverage; in-process HTML report; --full, --open, --min
add <package> Add a NuGet package to the default/sole project (--project to target; args after -- forward)
outdated od List packages with newer versions (--vulnerable, --deprecated, --transitive, --prerelease); restores first if needed
kill [project] k Terminate app processes (bare = all runnable; name one to target it; --dry-run lists what would die)
publish [project] pub Self-contained dotnet publish (-c/-r/-o/--self-contained/--single-file)
default [project] def Show or set the default run project (no run)
info i Show what rig discovered/resolved for this repo
init Scaffold a commented .rig.json
setup Interactive walkthrough — set local/global prefs without hand-editing
completion <shell> comp Print self-contained shell-completion setup (zsh/bash/pwsh)

Bare rig opens an interactive menu: the everyday verbs up top, the rest under grouped sub-menus (Watch · Maintenance · Config); run/publish/kill then surface a project picker (default marked). Any unambiguous prefix of a verb also resolves (rig cove, rig reb). Watch run/test/build either way: the option (rig test -w) or the leading modifier (rig watch run, rig w r). Global flags: --dry-run/-n (print what would run/change, don't do it) and --quiet/-q.

Configuration (.rig.json, all optional)

Auto-discovered (so they stay out of config): the solution, the test project, the coverage runsettings, the coverage collector, the kill target, and the rebuild targets. What's left is only what can't be inferred:

{
  "$schema": "https://raw.githubusercontent.com/JohnCampionJr/rig/main/rig.schema.json",
  "defaultProject": "MyApp",                                    // when several are runnable
  "test": { "envPresets": { "log": { "MYAPP_LOG": "1" } } },    // `rig test --log`
  "commands": { "deploy": "./deploy.sh" },                      // custom verbs (npm-scripts style)
  "aliases": { "coverage": "cov" },                             // override a verb's short alias
  "exclude": ["*Bench", "*.Demo", "*Spike"],                    // hide projects from the pickers
  "quiet": false                                                // suppress the `→ command` echo
}

rig init scaffolds this; rig setup walks you through the settable prefs and writes them to the repo or user-wide file for you; rig run --remember / rig default <p> write defaultProject (all comment-preserving). .env / .env.local are loaded automatically (dotenv precedence).

User-wide config (~/.rig.json)

A ~/.rig.json (override the path with $RIG_GLOBAL_CONFIG) applies to every repo. The repo's .rig.json is layered on top — repo wins per key, dictionaries (env, aliases, commands) union. Good for personal aliases and, especially, a ReportGenerator Pro license you set once and never commit:

// ~/.rig.json
{ "coverage": { "license": "your-pro-key" }, "aliases": { "coverage": "cov" } }

A repo's scaffolded blank coverage.license: "" falls through to this global key (empty strings count as unset), so the license lives in exactly one un-committed place. rig info shows the global path and merged result.

Coverage

Coverage renders in-process via the bundled ReportGenerator — no separate install. Single-file inline report by default, --full for the multi-file report, --open to open it; the headline line %·branch % prints to the console. --min <pct> gates line coverage (non-zero exit if below — handy in CI). Persist any of these as defaults in .rig.jsoncoverage.open, coverage.full, coverage.min (the matching CLI flag always wins). ReportGenerator Pro features unlock via the REPORTGENERATOR_LICENSE env var (or .rig.json coverage.license) — rig bundles only the free Apache-2.0 engine.

Completion

Self-contained — no dotnet-suggest required. Add one line for your shell; it calls rig's own [suggest] directive, so it behaves identically on macOS, Linux, and Windows:

# zsh — ~/.zshrc
eval "$(rig completion zsh)"
# bash — ~/.bashrc
eval "$(rig completion bash)"
# pwsh — $PROFILE
Invoke-Expression (& rig completion pwsh | Out-String)

Tab then completes verbs, aliases, and discovered project/test names.

Building from source

dotnet test Rig.slnx     # or: dotnet test tests/Rig.Tests/Rig.Tests.csproj

See docs/DESIGN.md for architecture and the rationale behind the key decisions, and CHANGELOG.md for release history.

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 was computed.  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.1.0 56 5/31/2026
1.0.0 51 5/31/2026
0.1.2 48 5/31/2026
0.1.0 53 5/31/2026