{
  "id": "radare2",
  "name": "radare2",
  "homepage": "https://radare.org/",
  "description": "A reverse-engineering framework and command-line toolset.",
  "executables": [
    "r2"
  ],
  "dotfiles": {
    "paths": [
      "~/.radare2rc",
      "[configHome]/radare2/rc"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Open a file in radare2",
    "description": "Open a binary or file in radare2, optionally analysing it, running commands first, or quitting right after. Debugger, project and plugin-listing options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/radare2/radare2.1.en.html",
        "revision": "6.1.8+ds-1",
        "evidence": "-A run 'aaa' command before prompt or patch to analyze all referenced code.\n-a arch force asm.arch (x86, ppc, arm, mips, bf, java, ...)\n-b bits force asm.bits (16, 32, 64)\n-B baddr Specify the base address to be used when loading a new binary.\n-c cmd Execute the given command before giving prompt\n-e k=v Set configuration eval variable key=value. For example -e scr.color=false.\n-i file Run script, lang program or radare2 plugin file. After the file is loaded\n-n Do not perform any analysis (r_bin). Just load the raw file\n-q Quiet mode (no prompt) and quit after running the commands specified with -i or -c\n-s addr Start seeking at this address\n-w Open in write mode\n-d Start in debugger mode\n"
      }
    ],
    "field": [
      {
        "id": "file",
        "label": "File",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "position": 0,
        "sources": [
          "man"
        ]
      },
      {
        "id": "analyze",
        "label": "Analyze all code (aaa)",
        "type": "boolean",
        "option": [
          "-A"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "arch",
        "label": "Architecture",
        "description": "Forces asm.arch.",
        "type": "string",
        "option": [
          "-a"
        ],
        "suggestions": [
          {
            "value": "x86",
            "label": "x86"
          },
          {
            "value": "arm",
            "label": "ARM"
          },
          {
            "value": "mips",
            "label": "MIPS"
          },
          {
            "value": "ppc",
            "label": "PowerPC"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "bits",
        "label": "Bits",
        "type": "enum",
        "option": [
          "-b"
        ],
        "choices": [
          {
            "value": "16",
            "label": "16"
          },
          {
            "value": "32",
            "label": "32"
          },
          {
            "value": "64",
            "label": "64"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "baddr",
        "label": "Base address",
        "type": "string",
        "option": [
          "-B"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "run_cmd",
        "label": "Command to run first",
        "type": "string",
        "option": [
          "-c"
        ],
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "eval",
        "label": "Config variable (key=value)",
        "type": "string",
        "option": [
          "-e"
        ],
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "script",
        "label": "Script to run after load",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "-i"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "seek",
        "label": "Start address",
        "type": "string",
        "option": [
          "-s"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_analysis",
        "label": "Load raw file without analysis",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet, quit after commands",
        "type": "boolean",
        "option": [
          "-q"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "write",
        "label": "Open in write mode",
        "description": "Edits made in the session are written to the file.",
        "type": "boolean",
        "option": [
          "-w"
        ],
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "analyze",
        "label": "Open and analyze",
        "fields": [
          "file",
          "analyze"
        ],
        "required": [
          "file"
        ],
        "set": {
          "analyze": [
            true
          ]
        }
      },
      {
        "id": "batch",
        "label": "Run a command and quit",
        "fields": [
          "file",
          "run_cmd",
          "quiet"
        ],
        "required": [
          "file",
          "run_cmd"
        ],
        "set": {
          "quiet": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "file",
          "analyze",
          "run_cmd",
          "quiet",
          "write"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "arch",
          "bits",
          "baddr",
          "eval",
          "script",
          "seek",
          "no_analysis"
        ]
      }
    ]
  }
}
