{
  "name": "pocketbase",
  "description": "PocketBase CLI",
  "subcommands": [
    {
      "name": "help",
      "description": "Help about any command",
      "args": [
        {
          "name": "subcommand"
        }
      ]
    },
    {
      "name": "migrate",
      "description": "Executes DB migration scripts",
      "subcommands": [
        {
          "name": "collections",
          "description": "(Experimental) Creates new migration file with the most recent local collections configuration",
          "args": [
            {
              "name": "folder",
              "description": "Migrations folder",
              "template": "folders"
            }
          ]
        },
        {
          "name": "create",
          "description": "Creates new migration template file",
          "args": [
            {
              "name": "name",
              "description": "Migration file name"
            },
            {
              "name": "folder",
              "description": "Migrations folder",
              "template": "folders"
            }
          ]
        },
        {
          "name": "down",
          "description": "Reverts the last [number] applied migrations",
          "args": [
            {
              "name": "number",
              "description": "Number of applied migrations to revert"
            }
          ]
        },
        {
          "name": "up",
          "description": "Runs all available migrations"
        }
      ]
    },
    {
      "name": "serve",
      "description": "Starts the web server (default to 127.0.0.1:8090)",
      "options": [
        {
          "names": [
            "--http"
          ],
          "description": "API HTTP server address (default \"127.0.0.1:8090\")",
          "takes_arg": true,
          "arg": {
            "name": "string",
            "description": "API HTTP server address"
          }
        },
        {
          "names": [
            "--https"
          ],
          "description": "API HTTPS server address (auto TLS via Let's Encrypt). The incoming --http address traffic also will be redirected to this address",
          "takes_arg": true,
          "arg": {
            "name": "string",
            "description": "API HTTPS server address (auto TLS via Let's Encrypt)"
          }
        },
        {
          "names": [
            "--origins"
          ],
          "description": "CORS allowed domain origins list (default [*])",
          "takes_arg": true,
          "arg": {
            "name": "strings",
            "description": "CORS allowed domain origins list"
          }
        }
      ]
    }
  ],
  "options": [
    {
      "names": [
        "--debug"
      ],
      "description": "Enable debug mode, aka showing more detailed logs"
    },
    {
      "names": [
        "--dir"
      ],
      "description": "PocketBase data directory (default \"pb_data\")",
      "takes_arg": true,
      "arg": {
        "name": "dir",
        "description": "PocketBase data directory",
        "template": "folders"
      }
    },
    {
      "names": [
        "--encryptionEnv"
      ],
      "description": "Environment variable whose value of 32 chars will be used as encryption key for the app settings (default none)",
      "takes_arg": true,
      "arg": {
        "name": "env",
        "description": "Encryption environment variable name"
      }
    },
    {
      "names": [
        "-h",
        "--help"
      ],
      "description": "Show help for pocketbase"
    },
    {
      "names": [
        "-v",
        "--version"
      ],
      "description": "Show version for pocketbase"
    }
  ]
}
