Socotra
CLI · command

socotra init

Scaffold a new socotra.yaml in the working directory.


Synopsis

socotra init [--template <name>] [--output text|json]

Options

OptionTypeDefaultDescription
--templatestringemptyArchitecture template. Choices: empty, modular-monolith, clean-architecture
--outputtext | jsontextOutput format

Exit codes

CodeMeaning
0socotra.yaml created successfully
1File already exists or unknown template

Behavior

  • Creates socotra.yaml in 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-monolith or --template clean-architecture for 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 json

JSON output:

{
  "created": true,
  "path": "D:/projects/MyApp/socotra.yaml",
  "template": "empty"
}
Schema 1.0 · CLI 1.0