{
  "id": "safety",
  "name": "Safety CLI",
  "homepage": "https://safetycli.com/product/safety-cli",
  "description": "Checks Python dependencies for known vulnerabilities and suggests remediations.",
  "executables": [
    "safety"
  ],
  "dotfiles": {
    "paths": [],
    "exclude": [],
    "secret": [
      "~/.safety/config.ini"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Safety CLI",
    "description": "Scan a project for vulnerable Python dependencies. The legacy check command, save-as and login-related options are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "scan"
        ],
        "label": "Scan a project",
        "description": "Scan a project directory for dependency vulnerabilities.",
        "source": [
          {
            "id": "src",
            "kind": "help",
            "url": "https://github.com/pyupio/safety/blob/main/safety/scan/constants.py",
            "revision": "2026-10-27",
            "evidence": "Example: safety scan --policy-file /path/to/policy.yml\nDefine a specific project path to scan. (default: current directory)\nExample: safety scan --target /path/to/project\nSet the output format for scan results (default: screen)\nExample: safety scan --output json\nEnable a verbose scan report for detailed insights (only for screen output)\nExample: safety scan --detailed-output\nUpdate packages listed in requirements.txt files to secure versions where possible\ntyper.Option(\"--apply-fixes\", help=SCAN_APPLY_FIXES, show_default=False)\n"
          }
        ],
        "field": [
          {
            "id": "target",
            "label": "Project folder",
            "description": "Defaults to the current directory.",
            "type": "path",
            "option": [
              "--target"
            ],
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "src"
            ]
          },
          {
            "id": "output",
            "label": "Output format",
            "type": "string",
            "option": [
              "--output"
            ],
            "suggestions": [
              {
                "value": "screen",
                "label": "Screen"
              },
              {
                "value": "json",
                "label": "JSON"
              }
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "detailed_output",
            "label": "Detailed report",
            "description": "Only for screen output.",
            "type": "boolean",
            "option": [
              "--detailed-output"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "policy_file",
            "label": "Policy file",
            "type": "path",
            "option": [
              "--policy-file"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": false
            },
            "sources": [
              "src"
            ]
          },
          {
            "id": "apply_fixes",
            "label": "Apply fixes",
            "description": "Rewrites requirements.txt files to secure versions.",
            "type": "boolean",
            "option": [
              "--apply-fixes"
            ],
            "effect": "overwrite",
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "scan",
            "label": "Scan a project",
            "fields": [
              "target",
              "detailed_output"
            ],
            "required": []
          },
          {
            "id": "scan_json",
            "label": "Scan with JSON output",
            "fields": [
              "target",
              "output"
            ],
            "required": [],
            "set": {
              "output": [
                "json"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "target",
              "output",
              "detailed_output"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "policy_file",
              "apply_fixes"
            ]
          }
        ]
      }
    ]
  }
}
