Your first Socotra project
A five-minute walkthrough from install to a running .NET solution.
Prerequisites
- .NET SDK 10.0 or later
- Internet connection (for NuGet packages and GitHub templates)
1. Install
dotnet tool install -g EssaLab.SocotraVerify the installation:
socotra --version2. Initialize a project
mkdir MyEcommerceApp
cd MyEcommerceApp
socotra initsocotra init generates a socotra.yaml using the modular-monolith template by default. Pick a different architecture with --template:
socotra init --template clean-architecture3. Examine the config
version: "1.0"
solution:
name: MyEcommerceApp
architecture: modular-monolith
modules:
- name: MyEcommerceApp.Core
layers:
- Domain
- Application
- Infrastructure
- Presentation
- name: MyEcommerceApp.Shared
layers:
- Domain
- Application4. Validate
socotra validateSchema version : 1.0
Solution name : MyEcommerceApp
Module count : 2
Configuration : Validvalidate parses the YAML, verifies the schema version, checks for duplicate module names, and validates layer names — all without touching the filesystem.
5. Preview the plan
socotra planThe plan output displays the solution file, projects, directories, and any existing state that will be preserved. No filesystem changes are made during planning.
6. Apply
socotra applyYou'll be prompted for confirmation before any writes occur. During execution, a progress bar shows creating the solution file, adding projects, and creating directories.
7. Check status
socotra statusShows which parts of the configuration are Applied, Pending, or Drifted. For a complete pipeline comparison:
socotra status --full8. Modify and re-apply
Add a new module to socotra.yaml:
modules:
- name: MyEcommerceApp.Core
layers: [Domain, Application, Infrastructure, Presentation]
- name: MyEcommerceApp.Shared
layers: [Domain, Application]
- name: MyEcommerceApp.Reporting # new module
layers: [Domain, Infrastructure]socotra plan
socotra applySocotra detects only the new module and creates it non-destructively — existing projects are untouched.
9. Use templates
Add a built-in DDD template to a module:
socotra template export base-entityThis copies the built-in template to .socotra/templates/base-entity/. Reference it in a layer's templates list, then run socotra apply.
To add a custom template from GitHub:
socotra template add github:user/templates/path