Releases: toratako/ghidra-cli
Release list
v0.9.0
Added
- Add
internal_program_nametoprogram infoso Ghidra's internal Program
name remains visible when it differs from the selected project file name. - Add
namespace rename,namespace move, andnamespace deletefor local
namespaces and classes. Deletion requires an empty namespace unless
--recursiveis explicit, and reports every removed symbol, including
descendant functions and variables. Namespace mutations accept--where
to disambiguate exact paths by ID. - Add repeated
--bind-type NAME PATHtofunction set-signatureand
function call-signature setto select exact data types for names in a
declaration without registering alias types. - Support standalone
ghidra.jarfiles generated by the official default
buildGhidraJar, selected withGHIDRA_JARorconfig set ghidra_jar.
Preserve directory installation detection, and use the selected runtime for
imports, project operations, bridge startup, and doctor checks. - Add
type archive inspect,type archive import, andtype archive exportfor
inspecting and transferring Ghidra data type archives. Explicit root selection
includes dependencies; imports reject definition, provenance, and ABI conflicts
atomically, and exports publish a validated new archive without overwriting files. - Add
decompile --with-addressesto relate C lines to native instruction
positions, with a structured JSON mapping, human-readable address gutters,
and inline address comments in C output. - Add
find function-candidatesto find unowned instruction starts backed by
effective CALL references. Candidates retain call-site evidence and distinct
call counts; destination bounds and scan completion support focused recovery
without disassembling code or creating functions. - Add
find virtual-callers FUNCTION --vtable ADDRESS --entries N --abi itanium|msvc
to search indirect calls through explicit absolute-pointer table slots. Optional
--within FUNCTIONrestricts the caller scope; results distinguish traced table
addresses, recovered types, and offset-only candidates, with incomplete-scan
diagnostics and no changes to references or types. - Add
function set-thunk FUNCTION --target FUNCTIONandfunction clear-thunk
to edit a function's direct forwarding relationship, with before/after
signatures, ABI storage, and direct/final targets. Clearing exposes the
function's own saved definition without copying the destination's signature. - Add
job result IDto recover completed bridge responses after a disconnect
or timeout, including structured failures and cancellation results. Bounded
in-memory retention ends with the bridge; unknown outcomes include a recovery
command without adding identifiers to normal command output. - Add
memory read-vtable TARGET --entries N --abi itanium|msvcfor explicit table
slots and ABI metadata, including LLVM relative32 encoding, and
find address-tablesfor Ghidra's native table candidates. - Add
function var infer-structto read Ghidra's structure recovery candidate
for one variable without registering a type or editing the program. Optional
bounded LOAD/STORE evidence retains native instruction locations. - Add
type uses TYPEto find registered types in applied data and database
function signatures, following typedefs, pointers, and arrays. Results retain
declaration paths, ABI and thunk provenance, and scan completion. - Add
type uses TYPE --kind variablefor decompiler parameters and locals,
andtype field uses TYPEfor semantic field accesses. Both support function
scope and report incomplete scans; field results distinguish read, write,
address-taking and unclassified uses with instruction evidence.
Removed
- Remove
ghidra-cli setup. Install Ghidra and a compatible full JDK separately;
select the installation through automatic detection,GHIDRA_INSTALL_DIR, or
config set ghidra_install_dir, and verify it withdoctor --runtime.
Changed
-
Reserve namespace/class rename and deletion for
namespacecommands;
symbol renameandsymbol deletereject these targets before editing any
selected symbol. Individual label/function moves remainsymbol set-namespace. -
Flatten
xref create memorytoxref create, retaining ordinary-memory
reference validation and explicit operand/type selection. -
Consolidate memory block attribute edits into
memory block set BLOCK_START
with--name,--permissions, and--volatile true|false. Multiple attributes
change atomically; omitted attributes are preserved. Block creation also takes
an explicit boolean for--volatile(default false). -
Move function tag operations from
tagtofunction tag. Keep shared
program-level definitions separate from function attachments through
createandattach; remove the top-level command. -
Move calling-convention discovery to
program list-calling-conventions [NAME],
matching its compiler-specification scope and supporting explicit program operands. -
Rename
memory maptomemory block list, grouping block queries and edits.
Preserve list output and query options; remove the old command. -
Move
type applytolisting define-data, preserving its arguments, data
definition behavior, and result fields. -
Include the current class/namespace, calling convention, and parameter type
when rejecting an automaticthisedit, with guidance for correcting class
membership through namespace operations. -
Use client-generated UUIDs as job IDs, available before the response arrives.
-
Extend current-memory pointer output with decoded targets, normalized code
entries, qualified symbols/functions, and direct/final thunk destinations. -
Use
initializedconsistently in memory map, info, and block edit receipts. -
Rename
program stats'ssectionsfield tomemory_blocks, counting all
Program memory blocks, including overlays and uninitialized blocks. -
Accept decimal and
0x-prefixed hexadecimal integer arguments consistently;
leading zeroes remain decimal, and each argument retains its sign and range
constraints. Addresses and byte patterns retain their separate syntax. -
Use
--wherefor target selection in symbolrename,delete,
set-namespace, andset-primary, and function variableget/set;
result queries keep--filter/-f. -
Use
xref from TARGET --whole-functionto inspect the containing function. -
Use named
--start,--end, and--valueoptions for processor context
operations;getdefaults its end to the start, whilesetandclear
require both endpoints. -
Make program management targets positional; export takes a program name and
--export-format, and rebase takes--base. Settings and memory operations
use named options for values, sizes, permissions, and categories. -
Select tags and equates before their function/address associations. Use
--text,--file, or--stdinfor notes and--codefor inline C declarations.
Comment and reference kinds use--type; no-return edits require--value. -
Accept repeated
--member NAME VALUEfor enum creation and
--loader-option NAME VALUEfor import. Select enum members with--member. -
Separate script artifact existence checks (
--expect PATH) from minimum row
counts (--expect-rows PATH MIN_ROWS), preserving literal artifact paths. -
Separate field inclusion and exclusion with
--fieldsand--exclude-fields.
Use--skipfor query pagination,--formatfor response format, and-o
only for output destinations.
Fixed
- Exclude stale call targets and inactive CALL overrides from
graph callers,
graph callees, andgraph callsby checking the instruction's effective flow.
Keep computed-call targets and symbolic external relocation calls visible. - Parse nested function-pointer parameters in function and call-site signatures,
and resolve existing type names with shared ambiguity checks and candidate paths. - Preserve Unicode JAR paths and headless arguments when launching standalone
Ghidra on Windows, including project paths outside the system code page. - Restrict named function targets to actual function names so entry aliases and
internal labels cannot redirect function edits or deletion. - Include nested structure/array strings in string listing, searches, and
reference queries, and continue exact byte/text searches across address-space
boundaries after matching the final address. - Include namespaces, classes, and variable symbols in symbol listings.
- Exclude equates and union-field annotations from decompiled local variables.
- Sort boolean fields and preserve integer precision when sorting numeric fields.
- Allow local project listing and information queries without a working Ghidra
installation or creating the project directory. - Bind program selection to each queued operation so concurrent clients cannot
redirect commands issued with--program, including guarded edits and import
follow-up requests. Batches retain each project's selection across nested rows
using the actual operation responses.
v0.8.0
Added
- Add
graph cfg FUNCTIONfor instruction blocks, control-flow edges, call
sites, and unresolved or out-of-body transitions, with explicit output budgets. - Structure
pcode function FUNCTION --highinto result-scoped operations,
values, ordered High CFG edges, and variable/symbol relationships, including
definition/use slots and incomplete-output information. - Add
project archive NAME --output FILEandproject restore ARCHIVE NAME
for standard Ghidra GAR snapshots and restoration into new projects. Archive
drains and saves a running bridge before stopping it; both operations refuse
destination collisions and report project-link dependencies. - Add
incoming_reference_counttodata list, counting references to the
whole object, including structure fields and array elements, for filtering
and sorting. - Add
type clonefor independent top-level definitions,type resizefor
non-packed structure tails, and category listing, creation, empty deletion,
and single-type moves. Type details include universal IDs and source archives. - Add explicitly placed bitfields with
type field create-bitfield, bounded
width/base-type edits, struct ordinal selectors, and bitfield annotation,
clearing, and deletion without losing neighboring components. - Add
function call-signature get/set/clearfor saved prototypes at one call
site, including overrides left stale by later instruction or body changes. - Add
function set-bodyto replace a function's complete body with repeated
inclusive ranges and report native annotation/reference losses from shrinking. - Add
listing flow get/set/clearfor instruction flow overrides and independent
fallthrough control, preserving bytes and leaving full analysis explicit. - Add
function get --with-framefor saved stack layout and expose both direct
thunk targets and final signature/frame owners. - Add
memory file-mappingsto list preserved-file mapping intervals and find
every direct mapping of--file-offset, with--source-atselecting one
saved input and metadata identifying excluded indirect mappings. - Add
memory block create/rename/set-permissions/set-volatile/move/delete,
with exact block-start targets, explicit initialization and permissions, and
named overlay spaces. Memory queries expose block type, spaces, and volatility. - Add
xref create memory,delete, andset-primarywith explicit operand
selection, source checks, and conflict preservation. - Add Equate definitions with
equate create/list/get/deleteand exact operand
associations withattach/detach, preserving 64-bit constant values. - Add
bookmark set/deletefor one address/type/category, with stdin and file
text input for setting notes. - Add
namespace list/get/create, including class namespaces, and
symbol set-namespace/set-primarywith single-target selection and native
function-change receipts. - Add
program context list/get/set/clearfor processor decoding context,
distinguishing recorded, default, and effective values with valid-bit masks.
Context edits do not replace existing instructions or run analysis. - Add
program rebase BASEto move the image base and default-space memory,
reporting moved blocks and unchanged overlays/other spaces. Rebasing leaves
memory bytes unchanged and does not reapply relocations or run analysis. - Add inclusive
analysis run --start START --end ENDto seed range reanalysis
and--pendingto process the currently open program's queued analysis.
The default remains full reanalysis; range analysis can affect other addresses. - Add exact
language_idandcompiler_spec_idtoprogram infofor reuse with
import settings.
Changed
- Render instruction CFG and High P-code results as dedicated human-readable
sections, including block/operation identities, relationships, and output
completeness in compact and full output. - Report logical size zero for empty structs in
type getandtype list. - Replace
function edit-varwithfunction var list/get/set. Variable reads
expose decompiler candidates and saved definitions separately; exact-name
selection with optional filtering resolves one target before an edit. - Rename
tag add/removetotag attach/detach. Attach requires existing tag
definitions; remove automatic creation and--no-create. Detach rejects
undefined names while leaving known, unattached tags unchanged. - Unify normal JSON as
datawith optional nonemptymeta, including management
commands and batch reports. Standalone results and batch entries now match;
lists retain context and effective paging metadata through field projection.
Classify result shapes by command, keeping single objects and graphs intact. - Emit every NDJSON list as one value per line, including project lists; empty
lists emit no lines. Count results remain unwrapped numbers in NDJSON. - Restrict
function get,type get, anddecompileto single-result output
controls. Keepsymbol deletetarget filtering and field projection, removing
list sorting, paging, and counting from its receipt. Count comments by row in
comment getand retain the target address as list context.
Fixed
- Require acknowledgement of the bridge's final save before completing shutdown;
a process exit without confirmation now reports failure and preserves project
state instead of allowing an archive to proceed with an uncertain save. - Fix
doctorbridge compilation on Windows when compiler arguments exceed the
command-line limit or temporary-directory paths contain Unicode characters. - Resolve GAR source and destination paths consistently across preflight,
bridge shutdown, and Ghidra locking when directory symlinks precede... - Keep
type import-c --categoryfrom replacing or moving same-named types
outside the destination category, including their existing uses. - Include references into defined strings in
string refs, with their actual
destination and byte offset from the string's start. - Report only function names in
xref to'sto_function, matchingxref from. - Reject missing
program open/deletetargets during batch preflight before
executing earlier commands, including nested batches. - Show excluded file-mapping ranges and reasons in compact/full output, and
avoid repeating fields in compact objects without a primary display field. - Include saved function definitions in
type get, with return and parameter
types, calling convention, variadic state, and no-return state. - Stop program statistics scans cooperatively when their job is cancelled.
- Select program exporters independently of the JVM locale for uppercase formats.
- Describe defined strings and supported comment types accurately in list help.
- Restore GAR archives created by Ghidra on Windows by normalizing entry path
separators before safety checks, collision detection, and extraction.
v0.7.0
This stable release includes all changes from
0.7.0-rc.1
plus the changes below.
Added
- Detect Ghidra through PATH and known Linux/macOS package layouts when no
installation is configured. Report the selected path, source, and version in
doctor, and report ambiguous installations with their candidate paths.
Changed
-
Validate explicit Ghidra paths and reject empty installation overrides without
falling back. Share installation validation with setup and preserve detection
diagnostics through command dispatch. -
Group instruction definition and range clearing under
listing define-code
andlisting undefine START --end END. Undefine requires an inclusive end
address; each endpoint is specified independently. Remove the top-level
define-codeandclearcommands.
v0.7.0-rc.1
Added
- Add
batch --from-line Nto resume an edited source file without replaying
earlier commands, with structured recovery guidance for rolled-back failures,
uncertain outcomes, and pending saves. Lost or malformed bridge responses now
stop batches even under--on-error continue. - Add
function get --with-signaturefor Program-defined return/parameter types,
storage, automatic arguments, indirect types, and thunk signature provenance. - Add
function set-stack-purge TARGET --bytes N | --unknownand expose
known, unknown, and invalid stack-purge states in function queries. - Add
data listand boundeddata read TARGETfor applied data types and
their values, including structures, arrays, pointers, and interior components. - Add
memory read --source originalfor preserved import bytes and file
provenance inmemory info; current-memory reads remain the default. - Add
bookmark list/getfor analysis diagnostics and user notes, and
memory info TARGETfor listing state and containing object boundaries. - Add
program list-relocationswith native relocation evidence and
function list-calling-conventionswith the selected program's default. - Expose disjoint body ranges in
function get, operand/source/primary metadata
in xrefs, original executable hashes inprogram info, and component ordinals
and bitfield layout intype get. - Add decompiler basic-block counts and
decompile --with-jump-tablesfor
recovered case destinations and default branches. - Add structured decompilation warnings with their source, message, and available
address. Successful decompilation remains successful when warnings are present. - Add
is_externalandentry_memoryto function queries and decompilation,
using the memory map's block names and permissions. - Add
analysis option list/get/setfor typed Program analysis settings,
including analyzer enablement, nested options, defaults and enum choices.
Setting values saves without running analysis. - Add
type create unionand union member addition, deletion, and editing through
type field append,type field delete, andtype field set --ordinal. - Add
type enum member delete TYPE --name MEMBERto remove one named enum member. - Add
find constant VALUEand inclusive--min/--maxsearches over numeric
instruction operands, with optional bit-width and address bounds. - Attach versioned skill ZIP archives to GitHub releases, including each skill's
SKILL.mdand supporting references. - Add Gitleaks pre-commit configuration and hook definitions for secret scanning.
Changed
- Validate all selected batch commands and their nested batches before execution,
retaining the checked input for execution. Syntax errors report all locations
and execute no commands;--on-errorcontrols execution-time failures. - Include actual artifact paths and sizes, exporter messages, and format
limitations inprogram exportresults. - Group field operations under
type field append/set/clear/deleteand enum
member deletion undertype enum member delete. Select existing fields with
--field NAME, struct--offset, or union--ordinal;--namesets a field's
new name. Struct deletion now accepts an exact starting offset, including for
unnamed fields. Named struct bit-field and zero-length field deletion remains
available; clear still preserves structure size and later offsets. - Return a common struct/union field receipt with canonical type identity,
changed, containing-type sizes, and component snapshots inbefore/after.
Appending reportsappended; set, clear, and delete retain distinct actions. - Move binary import to
program importand use--namefor the saved program
name. Import still creates projects as needed and runs analysis by default. - Replace top-level
analyzewithanalysis runand removeanalyzer list/set
in favor ofanalysis option. Analysis runs with saved Program settings. - Reuse the native decompiler across decompile, high P-code and variable edits
while the selected Program is unchanged. Reopen after Program changes and
release it on decompilation failure, cancellation, Program switch or close. - Make
xref from TARGETinspect one source address;--functionexplicitly
selects the whole containing function. Disassembly no longer rewinds from an
undefined address to the containing function's entry. - Require
comment deleteto select--comment-typeor--all, preserving
other comment types for a selective deletion. Bothcomment setand
comment deletereject unsupported comment types before mutation. - Rename label creation to
symbol create-label, external-symbol listing to
symbol externals, and external-entry-point listing tosymbol entry-points.
Rename their bridge adapters and result collections to match. - Clarify
string refs PATTERNas case-insensitive substring search followed by
reference lookup; its bridge argument ispattern. - Rename setup's Java prerequisite bypass to
--skip-java-check. - Make
tag get NAMEreturn tag details (name,comment,use_count). Use
function list --tag NAMEfor member functions.tag getretains target and
output options; filtering, sorting, pagination, and count options are removed. - Consolidate call queries under
graph callersandgraph callees; remove
find calls,function calls, and their bridge/client adapters. All call
graphs share instruction validation and thunk/typed-pointer resolution.
Traversal rows now contain both endpoints, call site, original reference
destination/type, and depth in a commoncallsarray. Keep undefined endpoints
and calls into function interiors; only recursive expansion needs a function.
Whole-program graph edges carry the same call details alongsidefrom/to. - Make
type field appendappend-only. Usetype field set --offsetfor creating
or updating a field at a specific position.field setnow accepts--size
with--type, preserving explicit-length field placement and returning
created/updated/unchanged receipts with before/after definitions. - Ordinary single-program commands now commit only on success and roll back the
current request on failure or cancellation. This includes C type import,
function/variable edits, memory writes, clear plus disassembly, and multi-symbol
deletion. Earlier successful commands remain saved. Errors identify completed
rollback withdetail.rolled_back; failed deletion receipts report
attempted_deleted, not committed deletions. Analysis, arbitrary scripts,
import/export, and program lifecycle operations retain separate partial-effect
semantics;batchremains a sequence of independently saved commands and stops
on transaction-boundary failures regardless of--on-error. - Require the running bridge to advertise
atomic_editsbefore program command
dispatch. Unsupported bridges require explicit restart, without an automatic
upgrade script.program saveremains available directly for recovery before
restart. Human-readable errors explain rollback and retained partial changes. - Dispatch bridge commands once, removing automatic bridge restarts and command
replay after unsupported-command errors or stale response shapes. - Replace
lengthinstring listandfind stringrows withchar_length
(Unicode code points in the decoded value) andbyte_length(occupied Ghidra
data bytes, including terminators/padding when defined). Update filters,
sorting and field selections to use the explicit unit. Both commands now
share string scanning and row generation; their response envelopes are unchanged. - Apply
find stringpaging in the bridge when the query permits it, after
matching both the search pattern and any supportedvalue~...filter.
Sorting, counts and unsupported filters retain complete-input processing. - Restore macOS release binaries for Intel and Apple Silicon, with macOS ARM64
included in the full test suite that gates release artifacts. - Mark GitHub releases from prerelease version tags as prereleases.
- Skip Ghidra integration CI for Markdown-only changes while retaining unit and
CLI checks. Run infrastructure suites in separate daemon and project jobs;
documentation pushes no longer cancel running Ghidra tests for code changes.
Removed
- Remove
--filter,--sort,--offset,--limit, and--countfrom
memory read,program info, andprogram stats. These commands return a
single object and retain target selection,--fields, and output formats.
memory read ADDRESS SIZEstill specifies the requested byte count withSIZE. - Remove the remaining
--targetoptions from function edits and queries,
decompile,disassemble,xref to/from, andgraph callers/callees.
Pass one required positionalTARGETinstead.
Supplying--targetnow fails during argument parsing instead of silently
overriding a positional target, including in batch commands. - Remove address-only symbol rename/delete bridge requests and their Rust client
adapters. Requests now require completetargetssnapshots, revalidated by
stable symbol ID before mutation. - Remove the fire-and-forget bridge
shutdowncommand and thenamefallback
fortype_create. Direct clients useshutdown_waitto confirm the final save
anddefinitionfor struct creation.
Fixed
- Preserve boolean, numeric, and null
valuefields in compact text output,
including typed analysis option values displayed beside their names. - Reject unknown bridge response statuses instead of treating their payloads as
successful results. Transport failures after sending starts, malformed replies,
and read timeouts exposedetail.outcome_unknownin structured diagnostics;
commands may already have taken effect. Read timeouts retain exit code 75 and
do not cancel the server job. - Preserve inferred parameters w...
v0.6.1
Fixed
- Preserve file modification times when installing Ghidra from its ZIP archive,
keeping compiled language definitions newer than their sources and avoiding
unnecessary recompilation during parallel imports. CI installation caches are
refreshed; existing installations can be recreated in a newsetup --dir.
v0.5.0
Added
find instruction PATTERNsearches existing Ghidra instruction text with
case-insensitive literal matching, optional--case-sensitive, and inclusive
--start/--endbounds. It supports the usual query options and cancellation;
it neither disassembles undefined bytes nor requires cross-references.disasm TARGET --end ENDlists existing instructions whose start addresses
lie in the inclusive range. It rejects--instructionstogether with--end,
reversed ranges, and bounds in different address spaces. Range queries honor
--limit(including zero), filtering, sorting, offsets, and counts.- Explicit
--format cand--format asmrender decompiled C and instruction
text, including addresses, bytes, mnemonics, and operands for disassembly.
Output defaults remain human-readable on TTY and compact JSON on non-TTY.
Results containing rows without the required code fields, including after
--fieldsprojection, retain a single JSON document. doctor --runtimecreates a disposable project, starts and pings the real
Ghidra bridge, verifies clean shutdown, and removes the project. It reports
Ghidra's settings/cache paths and retains the diagnostic project if shutdown
fails. Without--runtime, JVM startup is explicitly reported asnot_checked.
Changed
program listreports Ghidra's recorded analysis-completion flag instead of
estimating it from the function count. Missing or unreadable flags arenull.
Import analysis,analyze, andanalyzer runrecord successful completion;
a cancelled first analysis does not create a completed flag.- Function, symbol, type, string and comment lists push a single contains filter
and safe offset/limit into Ghidra, including query/dump aliases, reducing JSON
generation and transfer. Supported filter fields arenamefor functions,
symbols, and types,valuefor strings, andtextfor comments. Sort, count,
projection and other filters stay in Rust. Default limits, unlimited requests,
page counts and batch output retain their semantics. Restart running bridges
after upgrading; there is no old-bridge query fallback. Java/Rust Unicode
lowercasing differences can still miss contains matches or shift page results;
see query execution. batchwrites attempted results to stdout even on partial failure, preserving
nonzero exit codes and stop policies. Stderr no longer carriesdetail.results.find calls TARGETsearches the selected program for incoming call sites;
function calls TARGETretains outgoing calls. Resolved thunks and import
pointers are followed without treating ordinary data references as calls.
Incoming rows includecaller,caller_address, andviaalongside the call
site and callee; unresolved function-pointer calls are not inferred.doctorchecks storage create/write/rename/delete operations and loopback TCP
bind/connect, with resolved paths and configuration sources in its report.- Bridge lifecycle operations use persistent OS-backed
.startinglocks. Save
and stop every running bridge with the old CLI before upgrading: old and new lock
protocols cannot coordinate. The new CLI also refuses to stop a legacy bridge
that cannot confirm its final save throughshutdown_wait.
See upgrade instructions.
Recovery never deletes Ghidra project locks or force-terminates a discovery PID. - Shutdown uses one total timeout across lock acquisition, connection, response,
and process exit. Timeout errors retain exit code 75 and preserve discovery
and the live process instead of force-terminating it. Status checks no longer
remove discovery files; a live recorded PID prevents cleanup or replacement
startup even when its port is unreachable..startingfiles persist after
lock release and must not be deleted. - Rust library list APIs (
BridgeClient::list_functions,list_strings,
symbol_list,type_list, andcomment_list) now require anoffsetargument.
OneShotImportOptionsgainsprogramfor the saved file name, and
BridgeClient::find_callsnow requests incoming calls; usefunction_calls
for outgoing calls. Addedfunction_disasmandsymbol_get_by_nameadapters,
plusfind_string_with_limit,find_bytes_with_limit, and
find_interesting_with_limit; the existing search adapters remain available. - Moved the RE agent skill from
docs/skills/SKILL.mdto
docs/skills/ghidra-cli/SKILL.md, with
task-specific references for exploration, refinement, low-level analysis,
programs, scripting, and batch workflows. - Credited hitori-chan's downstream work in
LICENSEfor the instruction search,
bounded disassembly, and C/assembly output feature inspiration.
Fixed
- Explicit-offset
type add-field --sizerejects sizes Ghidra cannot honor
before changing the structure, matching append behavior. - Symbol deletion rejects generated dynamic labels and the global namespace
before mutation, checks each deletion result, and reportsdeleted,failed,
andnot_attemptedtargets on partial failure. Successful receipts include the
deleted symbol snapshots. Save failures retain those details. Target-selection
filters no longer erase deletion receipts in standalone or batch output. find cryptouses correct SHA-256 and MD5 round constants in both little- and
big-endian word order. SHA-512 constants are no longer mislabeled as SHA-256.graph callersandfind callsshare call-site validation and thunk/pointer
traversal. Argument references and non-call instructions are not callers.diff functions --formatuses the shared output formats and flag precedence;
unknown formats fail during argument parsing.setup --versionresolves release numbers to officialGhidra_VERSION_build
tags.config set java_home PATHnow saves the configured JDK.script run -uses the JDK parser to require exactly one top-level public
class, accepting modifiers and ignoring apparent declarations in comments,
strings, and nested classes. Invalid syntax reports its line and column before
execution; compilation and loading still use Ghidra's script bundle.statuscounts project files in subfolders consistently withprogram list.- Function lookup errors recommend an executable help command instead of an
invalid bare-word filter. - Search and list output share one query limit plan.
find bytes, raw-memory
find string, andfind interestingno longer truncate at 100/50 matches,
so counts, filters, sorts and offsets can use the complete result set.
Long searches check cancellation. Commands without bridge-side limits now
honordefault_limitwith omitted query options or--fieldsalone, including
in batches; explicit--limit 0remains unlimited. function disasmlists only the selected function's instructions, including
disjoint body ranges and when selected by an interior address. It honors query
limits, filtering, sorting, pagination, and counts without a hidden ten-instruction
cap or spillover into neighboring functions. A distinctfunction_disasm
bridge request prevents older bridges from silently returning a partial body.disasm-atand incompleteclear --disasm-atnow fail with retained
diagnostics, sobatch --on-error stopstops before dependent edits. Successful
clearing is still saved and reported as a partial change when redisassembly fails.strings refsapplies counts, field selection, filters, sorting, and pagination
to reference rows instead of its response envelope.- Symbol lookup prefers exact names over bare hexadecimal addresses; rename/delete
use name-only lookup so names such asdeadremain editable. Explicit0x/0X
addresses remain available tosymbol get. Mutations use the distinct
symbol_get_by_namebridge request so older bridges fail before editing. program listincludes nested project folders and correctly identifies the
current program among files sharing the same name.project infohonors the global project and configured default when its name
is omitted, and recognizes empty reservations created byproject create.--projects-dirtakes precedence overGHIDRA_PROJECT_DIRwithout changing
environment variables or saved configuration, including per-line batch overrides.- Script artifact examples use JSONL for minimum-row checks. Help documents
.jsonl/.ndjsonsupport and marks CSV row counting as WIP. - Table, CSV, and TSV columns include keys from every output row, so fields
present only in later rows are no longer silently dropped. Missing cells stay
empty; existing column order and CSV/TSV escaping are preserved. - CLI tests without Ghidra cover reservation deletion and preservation of project
files when Ghidra is unavailable; real project deletion runs in Ghidra integration tests. - Windows import tests normalize Ghidra's
/C:/...executable paths before
comparing them with native filesystem paths. - Project deletion holds the CLI lifecycle lock through removal and acquires
Ghidra's project lock, refusing deletion while an external Ghidra owner is active.
Deleting.gpr/.repartifacts now requires a working Ghidra/JDK installation;
missing prerequisites preserve project files. Empty reservations can still be
deleted without Ghidra, and unrelated files in the bare project directory remain. - Stop, restart, and project deletion report final save failures and retain the
JVM/program for recovery. Successful shutdown waits for accepted jobs and saving. - Import rejects unsupported loader option names before loading or saving a
program, reportingimport_status: not_started.--compiler-specnow requires
--language, and an explicit--programmust be a single nonempty file name. - Program metadata, status, operation responses, and artifact man...
v0.4.0
Added
type set-field STRUCT --offset OFFSETcreates or updates a field's name,
type, and comment without moving other fields.type clear-fieldleaves
undefined bytes while preserving the structure size and later offsets.
Results include before/after definitions, sizes, and whether anything changed.type import-c --file PATHand--stdinaccept C definitions alongside the
existing inline input, with exactly one source per invocation.- Type expressions support fixed-length arrays, including pointer arrays and
multidimensional arrays, using the target program's pointer width. Ambiguous
short type names return full-path candidates instead of selecting a match. batch FILE --on-error continue|stopselects whether ordinary command errors
allow subsequent lines to run. The default iscontinue; nested batches
inherit the policy unless they override it. Completed edits are not rolled back.
Changed
- Renamed the executable from
ghidratoghidra-cli, with no compatibility
alias. Update command invocations in scripts and automation. Command examples
below use the new executable name. - Bridge discovery and startup locking now identify the project's
.rep
directory, so equivalent paths share one bridge, including directory aliases
and Windows case variations on case-insensitive filesystems. Old discovery
keys are not migrated: before upgrading from v0.3.0, stop each running project
with the old executable (ghidra stop --project P), using the same project path
used to start it. Start the bridges again after updating. - Struct offsets accept decimal and
0xhexadecimal.add-field --offset
shares the new placement checks, rejecting interior offsets, overlaps with
other defined fields, and packed layouts before editing the database.
type getincludes field comments, full type paths, generated display names,
and the structure's packing status. - Replaced
function set-var-typewithfunction edit-var FUNCTION --var NAME [--name NEW_NAME] [--type TYPE]. Rename and type changes share one request;
either attribute can be changed alone. Results include the variable kind and
before/after definitions. The old CLI and bridge command are removed. - Batch failures now return nonzero status and retain successful results and
structured error details. Save failures and timeouts stop subsequent commands;
timeouts retain exit code 75. - Program edits, analysis, and scripts now save automatically before reporting
success.program saveretries pending saves without restarting the bridge;
save failures return an error with the original command result. Failed or
cancelled operations can retain partial changes, which are also saved.
Switching or closing a program saves first and keeps it open if saving fails.
Saving a stopped bridge remains a no-op. - Local, setup, and bridge-management commands now follow the shared output
defaults: human-readable on TTY and compact JSON on non-TTY.--jsonselects
compact JSON,--prettyselects indented JSON, and an explicit output format
takes precedence. Progress and verbose diagnostics go to stderr; JSON-mode
errors includestatus,message,exit_code, and available bridge details.
Argument errors retain exit code 2, command failures 1, and timeouts 75. - CLI help lists supported query types, output formats, and
set-defaultchoices;
invalid choices fail during argument parsing before bridge startup. - Split Rust CLI definitions by command family, isolated guarded symbol edits
and script preparation, and separated bridge startup from discovery/liveness.
Integration tests are organized by behavior domain, with new routing and
target-layout memory coverage in CI. Local CLI suites no longer require Ghidra;
Ghidra-dependent suites still fail when prerequisites are unavailable.
Fixed
- Batch commands preserve quoted arguments, empty strings, escapes, and trailing
escaped whitespace without evaluating shell syntax. Malformed quoting is
reported for the affected line. Each line honors its project/program targets
and query options through the same routing as standalone commands. - List commands fetch all required rows before client-side filtering, sorting,
counting, and pagination. Field selection now runs after sorting and pagination,
so omitting a sort field from--fieldsno longer changes the selected rows. - Filters reject incomplete expressions and trailing input, honor
NOT/AND/OR
precedence and parentheses, and correctly evaluate existence checks,IN,
nested fields, and quoted values. Integer and address comparisons preserve all
bits instead of rounding through floating point. - CSV and TSV correctly escape delimiters, quotes, and embedded newlines.
Compact output truncates strings at UTF-8 boundaries; NDJSON and other framed
output no longer gain an extra blank line. Closed output pipes no longer panic
or turn completed operations into failures. doctorreturns a nonzero status when readiness checks fail, including in JSON
mode. Handler diagnostics survive bridge error conversion, including failed
scripts' captured stdout, artifact checks, and partial-save details.- Bridge connection attempts and retry backoff obey one overall deadline. Socket
timeout setup failures are reported before sending a request. An unexpected
EOF reports that the command outcome is unknown and directs callers to inspect
state before repeating edits. program deletecan delete the initial/current program and closed programs
without selecting the deletion target. Deleting another program preserves the
current selection; save failures and other consumers prevent unsafe deletion.
Stopped bridges, empty projects, and batch deletion use the same ownership rules.- Project management and imports share artifact and persisted-data checks,
preserve dotted project names, and resolve relative project paths consistently.
--projects-dirandGHIDRA_INSTALL_DIRoverrides apply to management, doctor,
and execution. Project listing returns actual project names; deletion removes
.gpr/.repartifacts while preserving a nonempty same-named directory. - Import, export, and patch-export paths resolve relative to the CLI's working
directory, including when a bridge was started elsewhere. JDK detection follows
executable symlinks while keepingJAVA_HOMEusable by Windows launchers. memory readdecodes pointers using the target program's pointer width, byte
order, and address spaces. Function-pointer detection handles high addresses,
overlays, and partial reads instead of assuming 64-bit little-endian pointers
within a fixed address range.graph callersandgraph calleestraverse by shortest distance so a longer
path cannot hide nodes reachable within the depth limit through a shortcut.
Traversal retains reference rows, result limits, and cancellation checks.function set-signaturechecks Ghidra's application result and reports its
diagnostic when a parsed signature cannot be applied, instead of returning
success. Decompilation, high PCode, variable inspection, and program diff
initialize decompiler options explicitly.patch bytesvalidates complete hexadecimal byte pairs before editing memory;
patch noprejects non-x86 processors. Program and patch exports report file
write failures, exporter rejection, and underlying reflective errors.- Test fixtures prefer exact function names before decorated-name fallbacks and
honor installation overrides. Windows lifecycle output capture and test path
handling no longer hang or misinterpret separators, spaces, or apostrophes.
v0.3.0
Changes since upstream 0.2.2 (10019ba),
including the electricazimuth integration in
a6a4103,
selected nonsleepr and encounter changes, and subsequent work in this repository.
Added
ghidra pcode at ADDRESSandpcode function TARGET [--high]expose raw
instruction PCode and decompiler high PCode, including operands, outputs,
address spaces, and register names.ghidra analyzer list|set|runlists analyzer settings, enables or disables a
named analyzer, and explicitly re-runs analysis. Changing a setting with
analyzer set NAME true|falsedoes not itself start analysis.ghidra type import-c CODE [--category PATH](aliasestype importand
type parse-c) parses C declarations, including structs, unions, enums,
typedefs, and function definitions. Results include type names, paths, sizes,
categories, and parser messages. Category placement applies to the parsed
types without moving unrelated existing types with the same name.- Explicit import controls:
--loader,--language(alias--processor),
--compiler-spec(alias--cspec), and repeatable
--loader-option NAME=VALUE. Raw binary options--base-address,
--block-name,--file-offset, and--lengthimplyBinaryLoaderwhen no
loader is specified. Explicit loader imports stop any running project bridge,
import throughanalyzeHeadless, and reopen the imported program. ghidra disasm-at ADDRESS [--count N]creates instructions at an unanalyzed
address and reports both Ghidra'sokresult and whether an instruction
actuallylandedat the target.ghidra clear START:END [--to-data | --disasm-at ADDRESS]clears overlapping
code units, optionally re-disassembling at a specified address in the same
request.ghidra function set-noreturn TARGET [--value true|false]controls a
function's no-return flag.function getandfunction listnow include
no_return.- Function-scoped tag commands:
function tag add|remove TARGET TAG_NAMEand
function tag list TARGET, complementing the top-leveltagcommands and
function tag filters introduced in 0.2.2. ghidra script run -reads Java source from stdin and stages it for the same
compilation and execution path used by script files.ghidra comment set ADDRESS --stdinand--text-file PATHaccept comment
text without exposing it to shell argument expansion.ghidra type apply ADDRESS TYPE --force(alias--clear-conflicting) clears
overlapping instructions or data before applying a type. Replacing a function
entry point reports a warning that its code was cleared.ghidra program saveflushes pending edits by stopping the bridge, reopening
the same program, and checking its function count. This works around the
headless harness's lifetime transaction, which prevents an in-place save.
Changed
- Temporarily paused macOS CI jobs and release builds while decompiler and
fixture symbol failures are investigated. CI and release binaries now target
Linux and Windows. - Updated the GitHub Release action and use the tagged version's changelog
section as release notes. crates.io publishing requires the repository
variablePUBLISH_CRATES_IO=trueand a configuredCARGO_REGISTRY_TOKEN. function create ADDRESS [NAME]attempts disassembly first when the target
has no instruction.find calls TARGETnow returns calls made by the target function, scanning
its entire body. Rows usecall_site,callee,callee_address, andtype
instead of the previous incoming-calladdress/callerfields.patch nop --count Nstops at the first missing instruction after a
successful patch and reports the actual count and patched instructions.
A missing instruction at the starting address still fails; reaching a gap
later no longer rolls back the preceding patches.- Separated Rust CLI workflows, bridge transport, headless import, and bridge
diagnostics into dedicated modules. Split the Java bridge into runtime,
scheduling, program-session, and command components; startup anddoctor
compile the same complete source bundle. Handlers resolve the current
program and per-job monitor through the shared session. - Rust library APIs now carry import/export limits in
BridgeClient::list_imports/list_exportsand analysis/loader settings in
bridge::import_oneshotviaOneShotImportOptions. cargo test-runshares a closed, analyzed fixture across test executables
within one invocation, giving each suite an independent project copy.
Fixture creation uses file locks and atomic publication; setup failures are
cached for that run. Prerequisite checks run once per suite, and fixture
import avoids starting a throwaway bridge. Plaincargo testretains a
fixture local to each test executable.- Integration tests build a host-native fixture from Rust source, use isolated
temporary projects, and derive test addresses from the imported program.
CI no longer reuses mutable Ghidra project caches. Integration jobs use
cargo test-run, include tag and fixture coverage, and release validation
runs the full test set. Added regression coverage for cancellation followed
by another job, program switching, and persistence after a failed mutation. - Reorganized agent guidance under
docs/skills/SKILL.md, with runtime and
recovery guidance indocs/runtime.mdand implementation documentation beside
its modules. Replaced the old.claude-specific guidance and separated future
plans from the command reference. - Updated Cargo dependencies and adapted output formatting, hashing, HTTP/TLS,
and ZIP extraction to their current APIs. - Package metadata now points to
toratako/ghidra-cliand liststoratako
alongside original author Alexander Kiselev. Recorded incorporated upstream
contributions inLICENSE.
Fixed
- Fresh imports no longer run auto-analysis twice.
import --no-analyzenow
also disables analysis in the one-shot importer; imports through an existing
bridge still run analysis when requested. - Failed headless imports include recent stdout and stderr in their
diagnostics, including errors that Ghidra reports on stdout. - Program switching resolves the project's file path rather than comparing
internal program names.--program,program open,analyze, and the
current-program marker now distinguish copied programs with identical names,
including files in project subfolders. - Failed nested mutation transactions no longer roll back earlier successful
commands in the headless session. Partial changes from the failed request can
remain; this does not provide atomic rollback per request. Standalone
transactions retain commit/rollback behavior. - Clean bridge shutdown persists pending edits.
program closenow reports
that closing did not save them to disk; useprogram saveorstopto flush
edits before closing. - Java scripts load from the exact OSGi bundle registered for their directory,
preventing broader registered script paths from shadowing it. Removed a
reflective class-name literal that made the OSGi analyzer add an unwireable
package import and break bridge startup. symbol rename, top-levelrename, andsymbol deletereject ambiguous
names unless scoped with--address/--filteror explicitly applied to all
matches with--all.symbol delete --filternow scopes the deletion.
function rename OLD NEW --address ADDRESShonors the exact entry address
and rejects anOLDname mismatch.type createrejects C declarations and other non-identifier names instead
of silently creating an empty struct named after the entire input. Use
type import-cfor declarations ortype add-fieldto populate an empty struct.function createandtype applyerrors include structured details about
owning functions, missing instructions, overlapping code units, and conflicting
data types/ranges. Error detail is printed as JSON on stderr with-vvor
--json.- Address-field filters accept quoted hexadecimal values with or without a
0x/0Xprefix.memory readand patch operations resolve overlay-qualified
addresses;clearparses ranges such asrom1::5512:551dand inherits the
start address's space for an unqualified end address. xref toresolves external import names and their local thunk targets,
collecting references to all matching addresses without duplicate rows.strings refs PATTERNsearches matching defined string values and returns
their references instead of treating the pattern as an address.graph callersrecognizes parameter and indirection references as well as
direct calls.graph callers/calleeshonor--limitduring recursive
traversal, avoiding an exhaustive walk before truncating the output;
--limit 0remains unlimited.dump imports|exportsandquery imports|exportspass row limits to the
bridge, including the unlimited--limit 0case.patch bytesandpatch noptemporarily enable writes to read-only memory
blocks and restore the original permission afterward.analyzer set NAME true|falseaccepts an explicit boolean and displays
--helpwithout panicking. Missing or invalid values produce argument errors.- Socket read timeouts report
Timeout:with exit code 75 (EX_TEMPFAIL),
distinct from bridge failures with exit code 1. A client timeout does not
cancel the server-side job; inspectghidra jobsbefore retrying.
Removed
- The legacy
typeargument alias for the bridge'scomment_setrequest.
Direct protocol clients must sendcomment_type; the CLI continues to expose
--comment-type.