-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
5 minutes from zero to running your first target.
- A supported .NET SDK installed: .NET 8, 9, or 10. Tamp's first-party packages multi-target all three; pick whichever is on your dev machine. (See ADR 0015 for why.)
-
git(for repository discovery — Tamp walks up looking for.gitto find the project root).
Two flavors. Pick one based on how you'd rather invoke Tamp:
# Bare command — type `tamp ci` (NUKE-style)
dotnet tool install -g Tamp.Cli
# dotnet-verb command — type `dotnet tamp ci` (Cake-style)
dotnet tool install -g dotnet-tampBoth ship the same code; only the on-PATH command name differs. You can install both if you want both.
Tamp builds are regular .NET console projects. The convention is to put yours under build/ at the repo root:
mkdir -p build
cd build
dotnet new console -n Build -o .Edit build/Build.csproj to reference Tamp:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Tamp.Core" Version="0.0.1-alpha" />
<PackageReference Include="Tamp.NetCli.V10" Version="0.0.1-alpha" />
</ItemGroup>
</Project>Note on versions:
0.0.1-alphais the current pre-launch placeholder. The first stable release will use a real version; check the changelog for what to pin.
Replace the contents of build/Program.cs with a minimal Build.cs:
using Tamp;
using Tamp.NetCli.V10;
class Build : TampBuild
{
public static int Main(string[] args) => Execute<Build>(args);
[Parameter("Build configuration")]
Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
Target Compile => _ => _
.TopLevel()
.Description("Restore + build the solution")
.Executes(() => DotNet.Build(s => s
.SetConfiguration(Configuration)));
Target Default => _ => _
.DependsOn(nameof(Compile));
}That's a complete build script. Five elements doing the work:
-
class Build : TampBuild— your build inherits the framework's entry point and statics. -
Execute<Build>(args)— the framework'sMainshim. Reflects over your class, builds the target graph, parses args, dispatches. -
[Parameter]onConfiguration— auto-bound from--configuration <value>on the CLI or theCONFIGURATIONenvironment variable, withIsLocalBuild ? Debug : Releaseas the default. -
Targetproperties — declarative target definitions.TopLevel()marksCompileas a primary entry point (visible in--list);Defaultis the implicit fallback when no target is named. -
DotNet.Build(...)— typed wrapper that returns aCommandPlanthe runner dispatches.
From the repository root:
tamp # runs Default → Compile (Debug locally, Release on CI)
tamp Compile # explicitly named target
tamp Compile --configuration Release # override the parameter
tamp Compile --dry-run # print the dotnet build command, execute nothing
tamp --list # show top-level targetsThe output ends with a build summary table:
─── Build Summary ───
Target Status Duration
Compile ✓ Done 1.4 s
─────
Total 1.4 s
- Build Script Authoring — the full DSL surface: dependencies, ordering, triggers, conditionals, failure handlers.
-
Parameter & Secret Injection —
[Solution],[GitRepository],[NuGetPackage],[Secret]. - Module Catalog — every wrapper Tamp ships and how its surface is shaped.
Start here
Modules
- Module Catalog (canonical list, 50+ satellites)
- .NET toolchain
- Containers
- JS toolchain
- Supply-chain security
Analyzers
Tooling
Execution
CI integration
Editor integration
Migration
Reference
Project