Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cupboard

> 编程语言
Open source

A framework for provisioning local environments to a desired state, using the .NET SDK.

764 stars0 likes0 views
WebsiteGitHub

About

A framework for provisioning local environments to a desired state, using the .NET SDK.

Cupboard

A framework for provisioning local environments to a desired state, using the .NET SDK.

Disclaimer

Currently in preview. Use at own risk.

Introduction

In Cupboard, you define catalogs, manifests, and resources.

  • Resources:
    A resource describes the desired state for some part of a system.
    This might be a file, directory, package, etc.
  • Manifests:
    A manifest contains one or many resources.
    Used to specify how to assemble parts that uses many resources.
  • Catalogs:
    A catalog contains one or many manifests.
    Used as a logical grouping of machines and/or platforms.

1. Create a console application

Start by creating a new console application targeting .NET 8.0.
Add a reference to the Cupboard NuGet package.

> dotnet new console
> dotnet add package Cupboard

2. Create a manifest

Let's start by creating a manifest that defines what should be run.

Note that resources don't do anything when they're declared.
They describe what WILL be done when executed.

…

3. Create a catalog

When we have a Manifest, we need to create a Catalog containing the manifest.
We'll also add a condition that excludes non-Windows environments.

csharp
public sealed class MyWindowsComputer : Catalog
{
    public override void Execute(CatalogContext context)
    {
        if (!context.Facts.IsWindows())
        {
            return;
        }

        context.UseManifest();
    }
}

4. Create the entry-point

To run the application, we need to add an application entry-point and create a CupboardHost.
We must also explicitly add the catalogs to the CupboardHostBuilder instance.

csharp
public static class Program
{
    public static int Main(string[] args)
    {
        return CupboardHost.CreateBuilder()
            .AddCatalog()
            .Run(args);
    }
}

5. Run the configuration

Now, open up a terminal in administrator mode and execute the build.

Cupboard will show you a summary of what will be changed, which you will have to approve.

…

Building

We're using Cake as a dotnet tool for building. So make sure that you've restored Cake by running the following in the repository root:

> dotnet tool restore

After that, running the build is as easy as writing:

> dotnet cake

Copyright

Copyright (c) 2021 Patrik Svensson

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言