Files
ghidra-cli/AGENTS.md
T

17 lines
795 B
Markdown
Raw Normal View History

2026-01-26 06:58:39 -08:00
# Agent Instructions
2026-01-25 22:37:32 -08:00
2026-01-26 06:58:39 -08:00
## Critical Rules
1. **NEVER SKIP TESTS!** If Ghidra is not installed, the tests MUST fail.
2. **DEFAULT OUTPUT FORMAT** should be human and agent readable, NOT JSON. Use `--json` and `--pretty` for JSON output.
## Architecture
2026-02-04 14:26:33 -08:00
ghidra-cli uses a **direct bridge architecture**:
- CLI connects directly to a Java bridge running inside Ghidra's JVM via TCP
- The bridge is a GhidraScript (`GhidraCliBridge.java`) started via `analyzeHeadless -postScript`
- Bridge binds `ServerSocket(0)` on localhost, writes port/PID files for discovery
- One bridge per project, identified by `~/.local/share/ghidra-cli/bridge-{md5}.port`
- Import/Analyze/Quick commands auto-start the bridge if not running
- No separate Rust daemon process — the Java bridge IS the persistent server