Skip to content

Releases: toratako/ghidra-cli

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 01:10

Added

  • Add internal_program_name to program info so Ghidra's internal Program
    name remains visible when it differs from the selected project file name.
  • Add namespace rename, namespace move, and namespace delete for local
    namespaces and classes. Deletion requires an empty namespace unless
    --recursive is 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 PATH to function set-signature and
    function call-signature set to select exact data types for names in a
    declaration without registering alias types.
  • Support standalone ghidra.jar files generated by the official default
    buildGhidraJar, selected with GHIDRA_JAR or config 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, and type archive export for
    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-addresses to 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-candidates to 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 FUNCTION restricts 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 FUNCTION and function 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 ID to 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|msvc for explicit table
    slots and ABI metadata, including LLVM relative32 encoding, and
    find address-tables for Ghidra's native table candidates.
  • Add function var infer-struct to 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 TYPE to 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 variable for decompiler parameters and locals,
    and type field uses TYPE for 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 with doctor --runtime.

Changed

  • Reserve namespace/class rename and deletion for namespace commands;
    symbol rename and symbol delete reject these targets before editing any
    selected symbol. Individual label/function moves remain symbol set-namespace.

  • Flatten xref create memory to xref 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 tag to function tag. Keep shared
    program-level definitions separate from function attachments through
    create and attach; 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 map to memory block list, grouping block queries and edits.
    Preserve list output and query options; remove the old command.

  • Move type apply to listing define-data, preserving its arguments, data
    definition behavior, and result fields.

  • Include the current class/namespace, calling convention, and parameter type
    when rejecting an automatic this edit, 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 initialized consistently in memory map, info, and block edit receipts.

  • Rename program stats's sections field to memory_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 --where for target selection in symbol rename, delete,
    set-namespace, and set-primary, and function variable get/set;
    result queries keep --filter/-f.

  • Use xref from TARGET --whole-function to inspect the containing function.

  • Use named --start, --end, and --value options for processor context
    operations; get defaults its end to the start, while set and clear
    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 --stdin for notes and --code for inline C declarations.
    Comment and reference kinds use --type; no-return edits require --value.

  • Accept repeated --member NAME VALUE for enum creation and
    --loader-option NAME VALUE for 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 --fields and --exclude-fields.
    Use --skip for query pagination, --format for response format, and -o
    only for output destinations.

Fixed

  • Exclude stale call targets and inactive CALL overrides from graph callers,
    graph callees, and graph calls by 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

Choose a tag to compare

@github-actions github-actions released this 23 Sep 08:28

Added

  • Add graph cfg FUNCTION for instruction blocks, control-flow edges, call
    sites, and unresolved or out-of-body transitions, with explicit output budgets.
  • Structure pcode function FUNCTION --high into 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 FILE and project 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_count to data list, counting references to the
    whole object, including structure fields and array elements, for filtering
    and sorting.
  • Add type clone for independent top-level definitions, type resize for
    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/clear for saved prototypes at one call
    site, including overrides left stale by later instruction or body changes.
  • Add function set-body to replace a function's complete body with repeated
    inclusive ranges and report native annotation/reference losses from shrinking.
  • Add listing flow get/set/clear for instruction flow overrides and independent
    fallthrough control, preserving bytes and leaving full analysis explicit.
  • Add function get --with-frame for saved stack layout and expose both direct
    thunk targets and final signature/frame owners.
  • Add memory file-mappings to list preserved-file mapping intervals and find
    every direct mapping of --file-offset, with --source-at selecting 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, and set-primary with explicit operand
    selection, source checks, and conflict preservation.
  • Add Equate definitions with equate create/list/get/delete and exact operand
    associations with attach/detach, preserving 64-bit constant values.
  • Add bookmark set/delete for 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-primary with single-target selection and native
    function-change receipts.
  • Add program context list/get/set/clear for 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 BASE to 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 END to seed range reanalysis
    and --pending to process the currently open program's queued analysis.
    The default remains full reanalysis; range analysis can affect other addresses.
  • Add exact language_id and compiler_spec_id to program info for 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 get and type list.
  • Replace function edit-var with function 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/remove to tag 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 data with optional nonempty meta, 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, and decompile to single-result output
    controls. Keep symbol delete target filtering and field projection, removing
    list sorting, paging, and counting from its receipt. Count comments by row in
    comment get and 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 doctor bridge 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 --category from 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's to_function, matching xref from.
  • Reject missing program open/delete targets 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

Choose a tag to compare

@github-actions github-actions released this 21 Sep 18:12

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
    and listing undefine START --end END. Undefine requires an inclusive end
    address; each endpoint is specified independently. Remove the top-level
    define-code and clear commands.

v0.7.0-rc.1

v0.7.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 Sep 16:05

Added

  • Add batch --from-line N to 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-signature for Program-defined return/parameter types,
    storage, automatic arguments, indirect types, and thunk signature provenance.
  • Add function set-stack-purge TARGET --bytes N | --unknown and expose
    known, unknown, and invalid stack-purge states in function queries.
  • Add data list and bounded data read TARGET for applied data types and
    their values, including structures, arrays, pointers, and interior components.
  • Add memory read --source original for preserved import bytes and file
    provenance in memory info; current-memory reads remain the default.
  • Add bookmark list/get for analysis diagnostics and user notes, and
    memory info TARGET for listing state and containing object boundaries.
  • Add program list-relocations with native relocation evidence and
    function list-calling-conventions with the selected program's default.
  • Expose disjoint body ranges in function get, operand/source/primary metadata
    in xrefs, original executable hashes in program info, and component ordinals
    and bitfield layout in type get.
  • Add decompiler basic-block counts and decompile --with-jump-tables for
    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_external and entry_memory to function queries and decompilation,
    using the memory map's block names and permissions.
  • Add analysis option list/get/set for typed Program analysis settings,
    including analyzer enablement, nested options, defaults and enum choices.
    Setting values saves without running analysis.
  • Add type create union and union member addition, deletion, and editing through
    type field append, type field delete, and type field set --ordinal.
  • Add type enum member delete TYPE --name MEMBER to remove one named enum member.
  • Add find constant VALUE and inclusive --min/--max searches over numeric
    instruction operands, with optional bit-width and address bounds.
  • Attach versioned skill ZIP archives to GitHub releases, including each skill's
    SKILL.md and 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-error controls execution-time failures.
  • Include actual artifact paths and sizes, exporter messages, and format
    limitations in program export results.
  • Group field operations under type field append/set/clear/delete and enum
    member deletion under type enum member delete. Select existing fields with
    --field NAME, struct --offset, or union --ordinal; --name sets 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 in before/after.
    Appending reports appended; set, clear, and delete retain distinct actions.
  • Move binary import to program import and use --name for the saved program
    name. Import still creates projects as needed and runs analysis by default.
  • Replace top-level analyze with analysis run and remove analyzer list/set
    in favor of analysis 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 TARGET inspect one source address; --function explicitly
    selects the whole containing function. Disassembly no longer rewinds from an
    undefined address to the containing function's entry.
  • Require comment delete to select --comment-type or --all, preserving
    other comment types for a selective deletion. Both comment set and
    comment delete reject unsupported comment types before mutation.
  • Rename label creation to symbol create-label, external-symbol listing to
    symbol externals, and external-entry-point listing to symbol entry-points.
    Rename their bridge adapters and result collections to match.
  • Clarify string refs PATTERN as case-insensitive substring search followed by
    reference lookup; its bridge argument is pattern.
  • Rename setup's Java prerequisite bypass to --skip-java-check.
  • Make tag get NAME return tag details (name, comment, use_count). Use
    function list --tag NAME for member functions. tag get retains target and
    output options; filtering, sorting, pagination, and count options are removed.
  • Consolidate call queries under graph callers and graph 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 common calls array. Keep undefined endpoints
    and calls into function interiors; only recursive expansion needs a function.
    Whole-program graph edges carry the same call details alongside from/to.
  • Make type field append append-only. Use type field set --offset for creating
    or updating a field at a specific position. field set now 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 with detail.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; batch remains a sequence of independently saved commands and stops
    on transaction-boundary failures regardless of --on-error.
  • Require the running bridge to advertise atomic_edits before program command
    dispatch. Unsupported bridges require explicit restart, without an automatic
    upgrade script. program save remains 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 length in string list and find string rows with char_length
    (Unicode code points in the decoded value) and byte_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 string paging in the bridge when the query permits it, after
    matching both the search pattern and any supported value~... 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 --count from
    memory read, program info, and program stats. These commands return a
    single object and retain target selection, --fields, and output formats.
    memory read ADDRESS SIZE still specifies the requested byte count with SIZE.
  • Remove the remaining --target options from function edits and queries,
    decompile, disassemble, xref to/from, and graph callers/callees.
    Pass one required positional TARGET instead.
    Supplying --target now 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 complete targets snapshots, revalidated by
    stable symbol ID before mutation.
  • Remove the fire-and-forget bridge shutdown command and the name fallback
    for type_create. Direct clients use shutdown_wait to confirm the final save
    and definition for struct creation.

Fixed

  • Preserve boolean, numeric, and null value fields 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 expose detail.outcome_unknown in 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...
Read more

v0.6.1

Choose a tag to compare

@github-actions github-actions released this 20 Sep 19:58

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 new setup --dir.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 16 Sep 17:55

Added

  • find instruction PATTERN searches existing Ghidra instruction text with
    case-insensitive literal matching, optional --case-sensitive, and inclusive
    --start/--end bounds. It supports the usual query options and cancellation;
    it neither disassembles undefined bytes nor requires cross-references.
  • disasm TARGET --end END lists existing instructions whose start addresses
    lie in the inclusive range. It rejects --instructions together with --end,
    reversed ranges, and bounds in different address spaces. Range queries honor
    --limit (including zero), filtering, sorting, offsets, and counts.
  • Explicit --format c and --format asm render 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
    --fields projection, retain a single JSON document.
  • doctor --runtime creates 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 as not_checked.

Changed

  • program list reports Ghidra's recorded analysis-completion flag instead of
    estimating it from the function count. Missing or unreadable flags are null.
    Import analysis, analyze, and analyzer run record 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 are name for functions,
    symbols, and types, value for strings, and text for 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.
  • batch writes attempted results to stdout even on partial failure, preserving
    nonzero exit codes and stop policies. Stderr no longer carries detail.results.
  • find calls TARGET searches the selected program for incoming call sites;
    function calls TARGET retains outgoing calls. Resolved thunks and import
    pointers are followed without treating ordinary data references as calls.
    Incoming rows include caller, caller_address, and via alongside the call
    site and callee; unresolved function-pointer calls are not inferred.
  • doctor checks 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 .starting locks. 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 through shutdown_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. .starting files persist after
    lock release and must not be deleted.
  • Rust library list APIs (BridgeClient::list_functions, list_strings,
    symbol_list, type_list, and comment_list) now require an offset argument.
    OneShotImportOptions gains program for the saved file name, and
    BridgeClient::find_calls now requests incoming calls; use function_calls
    for outgoing calls. Added function_disasm and symbol_get_by_name adapters,
    plus find_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.md to
    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 LICENSE for the instruction search,
    bounded disassembly, and C/assembly output feature inspiration.

Fixed

  • Explicit-offset type add-field --size rejects 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 reports deleted, failed,
    and not_attempted targets 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 crypto uses 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 callers and find calls share call-site validation and thunk/pointer
    traversal. Argument references and non-call instructions are not callers.
  • diff functions --format uses the shared output formats and flag precedence;
    unknown formats fail during argument parsing.
  • setup --version resolves release numbers to official Ghidra_VERSION_build
    tags. config set java_home PATH now 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.
  • status counts project files in subfolders consistently with program 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, and find interesting no 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
    honor default_limit with omitted query options or --fields alone, including
    in batches; explicit --limit 0 remains unlimited.
  • function disasm lists 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 distinct function_disasm
    bridge request prevents older bridges from silently returning a partial body.
  • disasm-at and incomplete clear --disasm-at now fail with retained
    diagnostics, so batch --on-error stop stops before dependent edits. Successful
    clearing is still saved and reported as a partial change when redisassembly fails.
  • strings refs applies 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 as dead remain editable. Explicit 0x/0X
    addresses remain available to symbol get. Mutations use the distinct
    symbol_get_by_name bridge request so older bridges fail before editing.
  • program list includes nested project folders and correctly identifies the
    current program among files sharing the same name.
  • project info honors the global project and configured default when its name
    is omitted, and recognizes empty reservations created by project create.
  • --projects-dir takes precedence over GHIDRA_PROJECT_DIR without changing
    environment variables or saved configuration, including per-line batch overrides.
  • Script artifact examples use JSONL for minimum-row checks. Help documents
    .jsonl/.ndjson support 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/.rep artifacts 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, reporting import_status: not_started. --compiler-spec now requires
    --language, and an explicit --program must be a single nonempty file name.
  • Program metadata, status, operation responses, and artifact man...
Read more

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 15 Sep 20:25

Added

  • type set-field STRUCT --offset OFFSET creates or updates a field's name,
    type, and comment without moving other fields. type clear-field leaves
    undefined bytes while preserving the structure size and later offsets.
    Results include before/after definitions, sizes, and whether anything changed.
  • type import-c --file PATH and --stdin accept 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|stop selects whether ordinary command errors
    allow subsequent lines to run. The default is continue; nested batches
    inherit the policy unless they override it. Completed edits are not rolled back.

Changed

  • Renamed the executable from ghidra to ghidra-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 0x hexadecimal. add-field --offset
    shares the new placement checks, rejecting interior offsets, overlaps with
    other defined fields, and packed layouts before editing the database.
    type get includes field comments, full type paths, generated display names,
    and the structure's packing status.
  • Replaced function set-var-type with function 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 save retries 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. --json selects
    compact JSON, --pretty selects indented JSON, and an explicit output format
    takes precedence. Progress and verbose diagnostics go to stderr; JSON-mode
    errors include status, 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-default choices;
    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 --fields no 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.
  • doctor returns 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 delete can 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-dir and GHIDRA_INSTALL_DIR overrides apply to management, doctor,
    and execution. Project listing returns actual project names; deletion removes
    .gpr/.rep artifacts 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 keeping JAVA_HOME usable by Windows launchers.
  • memory read decodes 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 callers and graph callees traverse 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-signature checks 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 bytes validates complete hexadecimal byte pairs before editing memory;
    patch nop rejects 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

Choose a tag to compare

@github-actions github-actions released this 13 Sep 07:06

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 ADDRESS and pcode function TARGET [--high] expose raw
    instruction PCode and decompiler high PCode, including operands, outputs,
    address spaces, and register names.
  • ghidra analyzer list|set|run lists analyzer settings, enables or disables a
    named analyzer, and explicitly re-runs analysis. Changing a setting with
    analyzer set NAME true|false does not itself start analysis.
  • ghidra type import-c CODE [--category PATH] (aliases type import and
    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 --length imply BinaryLoader when no
    loader is specified. Explicit loader imports stop any running project bridge,
    import through analyzeHeadless, and reopen the imported program.
  • ghidra disasm-at ADDRESS [--count N] creates instructions at an unanalyzed
    address and reports both Ghidra's ok result and whether an instruction
    actually landed at 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 get and function list now include
    no_return.
  • Function-scoped tag commands: function tag add|remove TARGET TAG_NAME and
    function tag list TARGET, complementing the top-level tag commands 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 --stdin and --text-file PATH accept 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 save flushes 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
    variable PUBLISH_CRATES_IO=true and a configured CARGO_REGISTRY_TOKEN.
  • function create ADDRESS [NAME] attempts disassembly first when the target
    has no instruction.
  • find calls TARGET now returns calls made by the target function, scanning
    its entire body. Rows use call_site, callee, callee_address, and type
    instead of the previous incoming-call address/caller fields.
  • patch nop --count N stops 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 and doctor
    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_exports and analysis/loader settings in
    bridge::import_oneshot via OneShotImportOptions.
  • cargo test-run shares 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. Plain cargo test retains 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 in docs/runtime.md and 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-cli and lists toratako
    alongside original author Alexander Kiselev. Recorded incorporated upstream
    contributions in LICENSE.

Fixed

  • Fresh imports no longer run auto-analysis twice. import --no-analyze now
    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 close now reports
    that closing did not save them to disk; use program save or stop to 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-level rename, and symbol delete reject ambiguous
    names unless scoped with --address/--filter or explicitly applied to all
    matches with --all. symbol delete --filter now scopes the deletion.
    function rename OLD NEW --address ADDRESS honors the exact entry address
    and rejects an OLD name mismatch.
  • type create rejects C declarations and other non-identifier names instead
    of silently creating an empty struct named after the entire input. Use
    type import-c for declarations or type add-field to populate an empty struct.
  • function create and type apply errors 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 -vv or
    --json.
  • Address-field filters accept quoted hexadecimal values with or without a
    0x/0X prefix. memory read and patch operations resolve overlay-qualified
    addresses; clear parses ranges such as rom1::5512:551d and inherits the
    start address's space for an unqualified end address.
  • xref to resolves external import names and their local thunk targets,
    collecting references to all matching addresses without duplicate rows.
  • strings refs PATTERN searches matching defined string values and returns
    their references instead of treating the pattern as an address.
  • graph callers recognizes parameter and indirection references as well as
    direct calls. graph callers/callees honor --limit during recursive
    traversal, avoiding an exhaustive walk before truncating the output;
    --limit 0 remains unlimited.
  • dump imports|exports and query imports|exports pass row limits to the
    bridge, including the unlimited --limit 0 case.
  • patch bytes and patch nop temporarily enable writes to read-only memory
    blocks and restore the original permission afterward.
  • analyzer set NAME true|false accepts an explicit boolean and displays
    --help without 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; inspect ghidra jobs before retrying.

Removed

  • The legacy type argument alias for the bridge's comment_set request.
    Direct protocol clients must send comment_type; the CLI continues to expose
    --comment-type.