{"id":27814,"library":"ghidrecomp","title":"ghidrecomp","description":"Python command-line Ghidra decompiler that automates decompilation of binary files and generates call graphs, BSim signatures, and SAST reports. Version 0.5.9 supports Ghidra 12 and requires Python 3.10+. Release cadence is irregular, with updates aligning with Ghidra version releases.","status":"active","version":"0.5.9","language":"python","source_language":"en","source_url":"https://github.com/clearbluejar/ghidrecomp","tags":["ghidra","decompiler","reversing","static-analysis","binary-analysis"],"install":[{"cmd":"pip install ghidrecomp","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Required for Ghidra integration (replaced pyhidra in v0.5.6)","package":"pyghidra","optional":false},{"reason":"Required for SAST functionality (v0.5.9+)","package":"semgrep","optional":true}],"imports":[{"note":"Top-level module does not expose classes directly; must use explicit import from submodules. Common mistake leads to AttributeError.","wrong":"import ghidrecomp","symbol":"Ghidrecomp","correct":"from ghidrecomp import Ghidrecomp"}],"quickstart":{"code":"from ghidrecomp import Ghidrecomp\n\ng = Ghidrecomp()\ng.decompile(\"/path/to/binary\", output_dir=\"./output\")","lang":"python","description":"Initialize Ghidrecomp and decompile a binary file. Requires Ghidra and pyghidra to be installed separately."},"warnings":[{"fix":"Update imports from pyhidra to pyghidra, and ensure pyghidra is installed.","message":"v0.5.6 replaced pyhidra with pyghidra. Existing scripts using pyhidra will break unless updated.","severity":"breaking","affected_versions":"<0.5.6 -> >=0.5.6"},{"fix":"Use Python 3.10 or later.","message":"v0.5.3 dropped Python 3.8 support. Python 3.10+ is required.","severity":"breaking","affected_versions":"<0.5.3 -> >=0.5.3"},{"fix":"Download Ghidra from https://ghidra-sre.org/ and ensure 'ghidra' is in PATH or set GHIDRA_INSTALL_DIR environment variable.","message":"Ghidrecomp requires Ghidra to be installed separately. The pip package only provides the Python bindings; Ghidra must be manually downloaded and configured.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install pyghidra: pip install pyghidra","cause":"pyghidra is not installed or the environment is missing Ghidra integration.","error":"ModuleNotFoundError: No module named 'pyghidra'"},{"fix":"Use 'from ghidrecomp import Ghidrecomp'","cause":"Incorrect import pattern (import ghidrecomp instead of from ghidrecomp import Ghidrecomp).","error":"AttributeError: module 'ghidrecomp' has no attribute 'Ghidrecomp'"},{"fix":"Set GHIDRA_INSTALL_DIR to Ghidra installation path, e.g., export GHIDRA_INSTALL_DIR=/opt/ghidra","cause":"Ghidra is not installed or environment variable is missing.","error":"RuntimeError: Ghidra not found. Ensure Ghidra is installed and GHIDRA_INSTALL_DIR is set."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}