{
  "id": "phpbrew",
  "name": "PHPBrew",
  "homepage": "https://phpbrew.github.io/phpbrew",
  "description": "Brew & manage PHP versions in pure PHP at HOME",
  "executables": [
    "phpbrew"
  ],
  "dotfiles": {
    "paths": [
      "~/.phpbrew/config.yaml",
      "~/.phpbrew/bashrc",
      "~/.phpbrew/phpbrew.fish"
    ],
    "secret": [],
    "machine_lines": [
      {
        "file": "~/.phpbrew/bashrc",
        "match": {
          "prefix": [
            "export PHPBREW_HOME"
          ]
        },
        "scope": "backup"
      },
      {
        "file": "~/.phpbrew/phpbrew.fish",
        "match": {
          "prefix": [
            "set -gx PHPBREW_HOME"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Install a PHP version",
    "description": "Build and install one PHP version with variants. Custom configure options after -- and the other phpbrew subcommands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "readme",
        "kind": "manual",
        "url": "https://raw.githubusercontent.com/phpbrew/phpbrew/HEAD/README.md",
        "revision": "HEAD 2026-10-27",
        "evidence": "$ phpbrew install 5.4.0 +default\n$ phpbrew install -j $(nproc) 5.4.0 +default\n$ phpbrew install --test 5.4.0\n$ phpbrew install --old 5.2.13\n$ phpbrew install 5.3.10 +mysql +sqlite +cgi\n$ phpbrew install 5.6"
      }
    ],
    "field": [
      {
        "id": "subcommand",
        "label": "Subcommand",
        "fixed": [
          "install"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "version",
        "label": "PHP version",
        "description": "For example 8.3.0 or 5.6.",
        "type": "string",
        "position": 0,
        "sources": [
          "readme"
        ]
      },
      {
        "id": "variants",
        "label": "Variants",
        "description": "Variant sets such as +default, +mysql, +sqlite. Run phpbrew variants to list them.",
        "type": "string",
        "position": 1,
        "multiple": true,
        "suggestions": [
          {
            "value": "+default",
            "label": "default"
          },
          {
            "value": "+mysql",
            "label": "mysql"
          },
          {
            "value": "+sqlite",
            "label": "sqlite"
          },
          {
            "value": "+cgi",
            "label": "cgi"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "jobs",
        "label": "Parallel jobs",
        "type": "integer",
        "option": [
          "-j"
        ],
        "min": 1,
        "sources": [
          "readme"
        ]
      },
      {
        "id": "test",
        "label": "Run tests after build",
        "type": "boolean",
        "option": [
          "--test"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "old",
        "label": "Old release",
        "description": "Install from the archive of old releases.",
        "type": "boolean",
        "option": [
          "--old"
        ],
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "install",
        "label": "Install with default variants",
        "set": {
          "variants": [
            "+default"
          ]
        },
        "fields": [
          "subcommand",
          "version",
          "variants",
          "jobs"
        ],
        "required": [
          "version"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "subcommand",
          "version",
          "variants",
          "jobs"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "test",
          "old"
        ]
      }
    ]
  }
}
