CLI · command
socotra apply
Execute the computed plan and reconcile the filesystem with the desired state.
Synopsis
socotra apply [--auto-approve] [--output text|json] [--detailed-exit-codes]Options
Exit codes
Behavior
- Displays the plan and prompts for confirmation (unless
--auto-approve). --output jsonimplies--auto-approve.- Shows a progress bar in text mode; silent in JSON mode.
- On failure, prints recovery guidance: use
--log-file, checkdotnet --version, inspect the journal at.socotra/journal/.
Automatic rollback
If any step fails mid-execution, Socotra reverts the changes made so far and reports the error.
Examples
socotra apply
socotra apply --auto-approve
socotra apply --output json
socotra apply --log-file ./debug.logsuccess
{ "success": true, "appliedCount": 5, "errors": [] }failure
{
"success": false,
"appliedCount": 2,
"errors": [
"Failed to create project 'MyApp.Orders.Infrastructure': dotnet new returned exit code 1",
"Changes were rolled back"
]
}Schema 1.1 · CLI 1.0