Socotra
CLI · command

socotra diff

Show raw differences between the desired YAML state and the actual filesystem state, without execution ordering.


Synopsis

socotra diff [--output text|json]

Options

OptionTypeDefaultDescription
--outputtext | jsontextOutput format

Exit codes

CodeMeaning
0Success — differences displayed or no drift
1Error

Behavior

  • Displays a table with Type, Risk, and Description columns.
  • Risk levels: Low (green +), Medium (yellow ~), High (red ).
  • Prints "No drift detected" when desired and actual state are identical.

Examples

socotra diff
socotra diff --output json
{
  "inSync": false,
  "differences": [
    {
      "type": "AddProject",
      "risk": "Low",
      "description": "Project 'MyApp.Orders.Domain' does not exist"
    },
    {
      "type": "RemovePackage",
      "risk": "High",
      "description": "Package 'Newtonsoft.Json' in MyApp.Orders.Api is not in desired state"
    }
  ],
  "driftCount": 2
}
Schema 1.1 · CLI 1.0