Skip to content
 
 

Repository files navigation

Ghidra CLI

⚠️ This project is under very active development and all types of backward compatibility are not being considered. ⚠️

Check this repository and frequently update executable and skills for the better experience!

A Rust CLI for AI agents automating native-binary reverse engineering with Ghidra: decompilation, queries, types, scripts, and patches. One persistent Java bridge per project keeps analysis state in Ghidra's JVM between commands.

See ghidra-cli command tree!


Install

Install Ghidra and a compatible full JDK (JDK 21 for Ghidra 12.x) separately.
Building the CLI requires a stable Rust toolchain.
See runtime installation for platform-specific requirements.

git clone https://github.com/toratako/ghidra-cli.git
cd ghidra-cli
cargo install --path .
ghidra-cli doctor

or download a prebuilt binary from releases.
Windows/Linux/macOS binaries are available.

Ghidra is detected from PATH and known installation locations.
If it is not found, set GHIDRA_INSTALL_DIR or run ghidra-cli config set ghidra_install_dir /path/to/ghidra, then rerun doctor.

To use a standalone ghidra.jar built by Ghidra's official buildGhidraJar, set GHIDRA_JAR or run ghidra-cli config set ghidra_jar /path/to/ghidra.jar.
See standalone JAR setup for build requirements.
Use ghidra-cli doctor --runtime to also verify bridge startup.

Skills

There is already an optimized ghidra-cli skill for strong agents.
This skill is thin and does not include RE workflow, just usage and examples of the CLI commands.

Install ghidra-cli skill (If you download from releases, use ghidra-cli-<version>-skill.zip) to your agents:
Claude Code, Codex, Cursor, Gemini CLI, OpenCode

Web

Tested with ChatGPT Web Chat on September 24, 2026.

ChatGPT Web Chat provides a Linux sandbox with OpenJDK 21.0.11 preinstalled.
Since ChatGPT supports file uploads of up to 512 MB per file (source), the approximately 229 MiB ghidra.jar from Ghidra 12.1.4 can be uploaded directly.

Upload the zipped skills, the ghidra-cli executable, and ghidra.jar to the web chat.

To build ghidra.jar, download the official Ghidra release and run ./support/buildGhidraJar.

Prompt:

Click to expand

Use the uploaded ghidra-cli executable and the uploaded ghidra.jar to verify that ghidra-cli works in this Linux sandbox.

Also inspect the uploaded skills ZIP and follow its relevant instructions where applicable.

Set GHIDRA_JAR to the absolute path of the copied standalone ghidra.jar. Then run: ghidra-cli doctor --runtime

At the end, report the full ghidra-cli doctor --runtime output.


Uninstall

cargo uninstall ghidra-cli
rm -rf ~/.config/ghidra-cli/
rm -rf ~/.local/share/ghidra-cli/

Documentation

Development: AGENTS.md, tests, documentation map, and release history.

License

Licensed under GPL-3.0.
This project is based on akiselev/ghidra-cli. Thanks a lot!

About

The **best** agent-native Ghidra CLI — headless analysis, decompilation, and structured JSON built for AI agents.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages