{
  "id": "ipsw",
  "name": "ipsw",
  "homepage": "https://blacktop.github.io/ipsw/",
  "description": "A command-line tool for researching and reverse engineering Apple operating systems.",
  "executables": [
    "ipsw"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/ipsw/config.yaml",
      "~/.config/ipsw/config.yml"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false,
    "machine_lines": [
      {
        "file": "~/.config/ipsw/config.yaml",
        "match": {
          "key_path": [
            "download.ipsw.output"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "ipsw",
    "description": "Download, inspect and extract Apple firmware. Covers 'download ipsw', 'info' and 'extract'; the many other subcommands (dyld, macho, kernel, ...) are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "download",
          "ipsw"
        ],
        "label": "Download IPSWs",
        "description": "Download IPSW files (or just URLs, kernelcache or dyld cache) from ipsw.me. Filters by device, build or version.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/blacktop/ipsw/master/www/docs/cli/ipsw/download/ipsw.md",
            "revision": "master 2026-10-27",
            "evidence": "  -b, --build string             iOS BuildID (i.e. 16F203)\n  -y, --confirm                  do not prompt user for confirmation\n  -d, --device string            iOS Device (i.e. iPhone11,2)\n      --dyld                     Extract dyld_shared_cache(s) from remote IPSW\n      --kernel                   Extract kernelcache from remote IPSW\n      --latest                   Download latest IPSWs\n      --macos                    Download macOS IPSWs\n  -o, --output string            Folder to download files to\n  -u, --urls                     Dump URLs only\n  -v, --version string           iOS Version (i.e. 12.3.1)\n"
          }
        ],
        "field": [
          {
            "id": "device",
            "label": "Device",
            "description": "Product type, for example iPhone15,2.",
            "type": "string",
            "option": [
              "--device",
              "-d"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "version",
            "label": "OS version",
            "type": "string",
            "option": [
              "--version",
              "-v"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "build",
            "label": "Build ID",
            "type": "string",
            "option": [
              "--build",
              "-b"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "latest",
            "label": "Latest only",
            "type": "boolean",
            "option": [
              "--latest"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "macos",
            "label": "macOS IPSWs",
            "type": "boolean",
            "option": [
              "--macos"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "urls",
            "label": "URLs only",
            "description": "Print the download URLs instead of downloading.",
            "type": "boolean",
            "option": [
              "--urls",
              "-u"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "kernel",
            "label": "Only kernelcache",
            "description": "Extract the kernelcache from the remote IPSW.",
            "type": "boolean",
            "option": [
              "--kernel"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "dyld",
            "label": "Only dyld_shared_cache",
            "type": "boolean",
            "option": [
              "--dyld"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "confirm",
            "label": "Skip confirmation",
            "type": "boolean",
            "option": [
              "--confirm",
              "-y"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "output",
            "label": "Output folder",
            "type": "path",
            "option": [
              "--output",
              "-o"
            ],
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "latest_for_device",
            "label": "Latest IPSW for a device",
            "fields": [
              "device",
              "latest",
              "output",
              "confirm"
            ],
            "required": [
              "device"
            ],
            "set": {
              "latest": [
                true
              ]
            }
          },
          {
            "id": "list_urls",
            "label": "List download URLs",
            "fields": [
              "device",
              "version",
              "build",
              "macos",
              "urls"
            ],
            "required": [
              "device"
            ],
            "set": {
              "urls": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "device",
              "version",
              "build",
              "latest",
              "macos",
              "urls",
              "output"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "kernel",
              "dyld",
              "confirm"
            ]
          }
        ]
      },
      {
        "path": [
          "info"
        ],
        "label": "Show IPSW info",
        "description": "Display information about an IPSW or OTA file.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/blacktop/ipsw/master/www/docs/cli/ipsw/info.md",
            "revision": "master 2026-10-27",
            "evidence": "ipsw info <IPSW> [flags]\n  -j, --json           Output as JSON\n  -l, --list           List files in IPSW/OTA\n  -r, --remote         Extract from URL\n"
          }
        ],
        "field": [
          {
            "id": "ipsw",
            "label": "IPSW or OTA",
            "type": "path",
            "position": 0,
            "min": 1,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "json",
            "label": "JSON output",
            "type": "boolean",
            "option": [
              "--json",
              "-j"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "list",
            "label": "List contained files",
            "type": "boolean",
            "option": [
              "--list",
              "-l"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "info",
            "label": "Show info",
            "fields": [
              "ipsw",
              "json",
              "list"
            ],
            "required": [
              "ipsw"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "ipsw",
              "json",
              "list"
            ]
          }
        ]
      },
      {
        "path": [
          "extract"
        ],
        "label": "Extract components",
        "description": "Extract the kernelcache, dyld_shared_cache, DeviceTree or other parts from an IPSW or OTA.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/blacktop/ipsw/master/www/docs/cli/ipsw/extract.md",
            "revision": "master 2026-10-27",
            "evidence": "ipsw extract <IPSW/OTA | URL> [flags]\n      --dtree                   Extract DeviceTree\n  -d, --dyld                    Extract dyld_shared_cache\n  -a, --dyld-arch stringArray   dyld_shared_cache architecture to extract\n  -k, --kernel                  Extract kernelcache\n  -o, --output string           Folder to extract files to\n  -p, --pattern string          Extract files that match regex\n      --sep                     Extract sep-firmware\n"
          }
        ],
        "field": [
          {
            "id": "ipsw",
            "label": "IPSW or OTA",
            "type": "path",
            "position": 0,
            "min": 1,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "kernel",
            "label": "Kernelcache",
            "type": "boolean",
            "option": [
              "--kernel",
              "-k"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "dyld",
            "label": "dyld_shared_cache",
            "type": "boolean",
            "option": [
              "--dyld",
              "-d"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "dyld_arch",
            "label": "dyld architectures",
            "type": "string",
            "option": [
              "--dyld-arch",
              "-a"
            ],
            "multiple": true,
            "suggestions": [
              {
                "value": "arm64e",
                "label": "arm64e"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "dtree",
            "label": "DeviceTree",
            "type": "boolean",
            "option": [
              "--dtree"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "sep",
            "label": "SEP firmware",
            "type": "boolean",
            "option": [
              "--sep"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "pattern",
            "label": "File regex",
            "description": "Extract files from the IPSW zip whose names match this regex.",
            "type": "string",
            "option": [
              "--pattern",
              "-p"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "output",
            "label": "Output folder",
            "type": "path",
            "option": [
              "--output",
              "-o"
            ],
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "kernelcache",
            "label": "Extract kernelcache",
            "fields": [
              "ipsw",
              "kernel",
              "output"
            ],
            "required": [
              "ipsw"
            ],
            "set": {
              "kernel": [
                true
              ]
            }
          },
          {
            "id": "dyld_cache",
            "label": "Extract dyld_shared_cache",
            "fields": [
              "ipsw",
              "dyld",
              "dyld_arch",
              "output"
            ],
            "required": [
              "ipsw"
            ],
            "set": {
              "dyld": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "ipsw",
              "kernel",
              "dyld",
              "dyld_arch",
              "output"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "dtree",
              "sep",
              "pattern"
            ]
          }
        ]
      }
    ]
  }
}
