{
  "id": "powershell",
  "name": "PowerShell",
  "homepage": "https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles",
  "description": "A cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework.",
  "executables": [
    "pwsh",
    "powershell"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/powershell/",
      "~/Documents/PowerShell/"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Start PowerShell",
    "description": "Start pwsh with common startup switches or run a script file or a command string. Remoting, encoded commands and apartment switches are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "revision": "pwsh -h (PowerShell 7)",
        "evidence": "-File | -f\n-Command | -c\n-NoExit | -noe\n-NoLogo | -nol\n-NonInteractive | -noni\n-NoProfile | -nop\n-WorkingDirectory | -wd\n-ExecutionPolicy | -ex | -ep\n-OutputFormat | -o | -of\nValid values are \"Text\" (text strings) or \"XML\" (serialized CLIXML format).\n-Version | -v\n-WindowStyle | -w\nValid values are Normal, Minimized, Maximized, and Hidden.\n"
      }
    ],
    "field": [
      {
        "id": "no_profile",
        "label": "Skip profiles",
        "description": "Do not load the PowerShell profiles.",
        "type": "boolean",
        "option": [
          "-NoProfile"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_logo",
        "label": "Hide banner",
        "type": "boolean",
        "option": [
          "-NoLogo"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_exit",
        "label": "Stay open after running",
        "type": "boolean",
        "option": [
          "-NoExit"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "non_interactive",
        "label": "Non-interactive",
        "description": "Fail instead of prompting for input.",
        "type": "boolean",
        "option": [
          "-NonInteractive"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "working_directory",
        "label": "Working directory",
        "type": "path",
        "option": [
          "-WorkingDirectory"
        ],
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "output_format",
        "label": "Output format",
        "type": "enum",
        "option": [
          "-OutputFormat"
        ],
        "choices": [
          {
            "value": "Text",
            "label": "Text"
          },
          {
            "value": "XML",
            "label": "XML (CLIXML)"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "command",
        "label": "Command",
        "description": "PowerShell command text to run. Must be last on the command line.",
        "type": "string",
        "option": [
          "-Command"
        ],
        "effect": "exec",
        "sources": [
          "help"
        ]
      },
      {
        "id": "file",
        "label": "Script file",
        "description": "Script to run. Must be last on the command line.",
        "type": "path",
        "option": [
          "-File"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "effect": "exec",
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "clean-session",
        "label": "Clean interactive session",
        "set": {
          "no_profile": [
            true
          ],
          "no_logo": [
            true
          ]
        },
        "fields": [
          "no_profile",
          "no_logo",
          "working_directory"
        ]
      },
      {
        "id": "run-command",
        "label": "Run a command",
        "fields": [
          "no_profile",
          "non_interactive",
          "no_exit",
          "command"
        ],
        "required": [
          "command"
        ]
      },
      {
        "id": "run-script",
        "label": "Run a script file",
        "fields": [
          "no_profile",
          "non_interactive",
          "file"
        ],
        "required": [
          "file"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "command",
          "file",
          "no_profile",
          "no_logo",
          "no_exit"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "non_interactive",
          "working_directory",
          "output_format"
        ]
      }
    ]
  }
}
