CLI · command
socotra init
Scaffold a new socotra.yaml in the working directory.
Synopsis
socotra init [--template <name>] [--output text|json]Options
Exit codes
Behavior
- Creates
socotra.yamlin the working directory. - Defaults to the empty template — a minimal file containing only the schema version.
- The generated file includes a schema annotation so editors with the YAML Language Server (VS Code, JetBrains) give you IntelliSense and validation out of the box:
# yaml-language-server: $schema=https://essalab.github.io/Socotra.Schemas/schemas/v1/schema.json
socotra:
version: "1.0"- Use
--template modular-monolithor--template clean-architecturefor a pre-built architecture. - Prompts before overwriting an existing file.
- In JSON mode the overwrite prompt is skipped and an error is returned if the file exists.
Examples
socotra init
socotra init --template modular-monolith
socotra init --template clean-architecture
socotra init --output jsonJSON output:
{
"created": true,
"path": "D:/projects/MyApp/socotra.yaml",
"template": "empty"
}Schema 1.0 · CLI 1.0