Socotra
Templates

Using templates

Reference templates from your YAML and add them with one command.


Sources

SourcePrefixExample
Built-in(none)base-entity
GitHubgithub:github:myorg/socotra-templates/audit-entity
Local path./ or absolute./my-templates/audit-entity

Reference from YAML

modules:
  - name: "Orders"
    layers:
      - name: "Domain"
        type: ClassLib
        templates:
          - "base-entity"                                 # built-in
          - "github:myorg/templates/audit-entity"         # github
          - "./company-templates/result"                  # local

Common commands

# Add an external template to your project (default scope)
socotra template add github:myorg/templates/module
socotra template add ./my-templates/my-thing

# Export a built-in template for customization
socotra template export base-entity

# List all templates (project + global + built-in)
socotra template list

# Update / remove
socotra template update my-thing
socotra template remove my-thing

Caching

ScopeRoot directoryShared via GitDefault for
Project (default).socotra/templates/Yestemplate add, template export
Global (--global)~/.socotra/registry/NoLegacy / opt-in

The environment variable SOCOTRA_REGISTRY_ROOT overrides the global root only. For details on sources, namespace tokens, and the application pipeline, see Authoring.

Schema 1.1 · CLI 1.0