Socotra
.NET 10 · public betav1.0.0-beta1

State-driven .NET project management.

Define your solution in one socotra.yaml. Preview every change with plan. Apply with confidence. Inspired by Terraform, built for .NET developers.

.NET 10 MIT licensed CI/CD ready Cross-platform
socotra.yaml
socotra:
  version: "1.1"
  solution:
    name: "EcommerceApp"
    dotnetVersion: "net9.0"
  modules:
    - name: "Orders"
      layers:
        - name: "Domain"
          type: ClassLib
          templates: ["base-entity", "aggregate-root"]
        - name: "Application"
          references: ["Orders.Domain"]
        - name: "Api"
          type: WebApi
terminal
$ socotra plan

  + Create solution 'EcommerceApp.sln'
  + Add project   'Orders.Domain'    (ClassLib)
  + Add project   'Orders.Application'
  + Add project   'Orders.Api'       (WebApi)
  + Apply template 'base-entity' to Orders.Domain
  + Apply template 'aggregate-root' to Orders.Domain

Plan: 6 to add, 0 to modify, 0 to destroy.

Install

One command. Requires the .NET SDK 10.0 or later.

dotnet tool install -g EssaLab.Socotra
What is Socotra?

A declarative workflow for .NET project setup.

Socotra CLI transforms .NET project setup from a series of manual dotnet new, dotnet add and dotnet sln commands into a single declarative workflow. You describe the solution you want — modules, layers, packages, references, templates — and Socotra reconciles the filesystem to match.

  • Non-destructive by default — never overwrites your code.
  • Transparent — always shows what will happen before it happens.
  • Reproducible — share your architecture in one YAML file.
  • Safe — automatic rollback on any failure.
The flow
1socotra.yamlDesired state
2socotra planPreview
3socotra applyExecute
4.NET solutionActual state
Features

Everything you need to manage .NET solutions at scale.

Declarative configuration

Solutions, modules, layers, packages, references, and templates — all in one YAML file.

State-driven workflow

plan / apply cycle with automatic drift detection between desired and actual state.

Pipeline architecture

Modular components with single responsibility and no circular dependencies.

Extensible templates

11 built-in DDD templates (base-entity, value-object, aggregate-root, …) plus GitHub and local custom templates.

Safe by default

Non-destructive writes, automatic rollback on failure, atomic file operations, pre-existing file protection.

CI/CD ready

--output json for machine-readable output and --detailed-exit-codes for automation pipelines.

Developer workflow

Four steps from intent to running solution.

01

Define

Author socotra.yaml: solution, modules, layers, packages, templates.

socotra init
02

Validate

Verify schema, namespaces, references, and architecture constraints.

socotra validate
03

Plan

Colour-coded preview of every add, modify, and destroy. No writes.

socotra plan
04

Apply

Atomic execution with automatic rollback on failure.

socotra apply
Plan & Apply

See every change before it happens.

Socotra’s execution plan shows every step with a risk indicator: low adds, medium updates, and high removals. Use --output json for machine-readable output and --detailed-exit-codes to gate downstream CI steps.

socotra plan --output json
{
  "summary": { "toAdd": 3, "toModify": 1, "toDestroy": 0 },
  "steps": [
    {
      "type": "AddProject",
      "risk": "Low",
      "description": "Create project 'MyApp.Orders.Domain' as ClassLib"
    },
    {
      "type": "AddPackage",
      "risk": "Low",
      "description": "Add FluentValidation v11.9.2 to MyApp.Orders.Application"
    },
    {
      "type": "UpdateTargetFramework",
      "risk": "Medium",
      "description": "Change net8.0 → net9.0 in MyApp.Orders.Api"
    }
  ]
}
Architecture

A clean, unidirectional pipeline.

Each stage is an independent .NET project with a single responsibility and no circular dependencies. Data flows through the Result<T> monad.

Stage 1
Parser
YAML → typed model
Stage 2
StateReader
Scan filesystem
Stage 3
DiffEngine
Detect drift
Stage 4
PlanEngine
Order steps
Stage 5
Executor
Apply with rollback

Ready to declare your next solution?

Install the tool and ship your first state-managed .NET solution in five minutes.