Socotra
Introduction

What is Socotra?

A Terraform-inspired CLI that manages .NET solutions as declarative state.


Socotra CLI transforms .NET project setup from a series of manual, repetitive commands into a declarative, state-driven workflow. You define the desired project structure in a single socotra.yaml file, preview the changes, and apply them with confidence.

Your socotra.yaml  →  socotra plan  →  socotra apply  →  Your .NET solution
(Desired State)        (Preview)          (Execute)          (Actual State)

The problem

Spinning up a non-trivial .NET solution today means dozens of imperative commands: dotnet new sln, dotnet new classlib per layer, dotnet sln add, dotnet add reference, dotnet add package, plus copy-pasted boilerplate for base entities, value objects, results, and DI wiring. The state of the solution lives only in the filesystem, and there is no single source of truth that a team can review, share, or version.

The solution

Socotra reads socotra.yaml, compares it with the actual filesystem, computes an execution plan, and applies that plan atomically. Plans show every step with a risk indicator before any write happens. Failures roll back automatically.

Safe by design
Socotra never overwrites user-written files. Every file it writes carries a guard header; files without that header are treated as yours and left untouched.

Key features

  • Declarative configuration — solutions, modules, layers, packages, references, and templates in one YAML file.
  • State-driven workflowplan/apply with automatic drift detection.
  • Pipeline architecture — modular components with single responsibility and no circular dependencies.
  • Extensible template system — built-in DDD templates plus GitHub and local custom templates.
  • Safe by default — non-destructive writes, automatic rollback, atomic file operations.
  • CI/CD ready--output json and --detailed-exit-codes for automation.

Design principles

  • Non-destructive by default — never overwrites user-written code.
  • Transparent — always shows what will happen before doing it.
  • Reproducible — share your architecture via a single YAML file.
  • Safe — automatic rollback on any failure.
Schema 1.1 · CLI 1.0