Skip to main content

idare2

PyPI Python versions CI License: MIT

idare2 brings a radare2-style command line and output model to IDA Pro. It drives an IDA database through IDA Nexus, so analysis, disassembly, cross-references, types, strings, and decompilation come directly from IDA and Hex-Rays.

Use it interactively or from scripts. When attached to a running IDA instance, both clients share the same database.

Status: alpha. The command surface is broad, but interfaces may change before 1.0.

Requirements

  • IDA Pro 9.1 or newer, including idalib. IDA is commercial software and is not bundled with idare2.
  • Python 3.11 or newer.

Installation

Install the latest release from PyPI into a virtual environment that also has IDA's idalib bindings:

python -m venv .venv
source .venv/bin/activate

# 1. Install the idalib bindings shipped with IDA Pro.
pip install <IDA>/idalib/python/idapro*.whl
python <IDA>/py-activate-idalib.py -d <IDA>

# 2. Install idare2 and its dependencies.
pip install idare2

The idare2 and ir2 commands are available after activating the virtual environment.

To install the latest development version from source:

git clone https://github.com/fire3/idare2.git
cd idare2
uv venv --python 3.12
source .venv/bin/activate

# Install the idalib bindings into the same environment.
uv pip install <IDA>/idalib/python/idapro*.whl
python <IDA>/py-activate-idalib.py -d <IDA>

uv pip install -e '.[test]'

Usage

Interactive mode

Open an executable, a raw binary, or an existing IDB:

idare2 firmware.bin
idare2 --idb saved.i64

Commands use radare2 syntax:

[0x00015e10]> s main
[0x00015e10]> pd 6
[0x00015e10]> afl~main
[0x00015e10]> q

Use ? for command help and q to exit. Use wq to save the IDB and exit. Tab completion covers command names, e configuration keys, flags, function names, and $ variables/aliases; remote names are cached per editing cycle. Command history is kept in ${XDG_STATE_HOME:-~/.local/state}/idare2/history.

Startup files

At startup idare2 reads, in order:

  1. ~/.idare2rc
  2. ${XDG_CONFIG_HOME:-~/.config}/idare2/rc
  3. ${XDG_CONFIG_HOME:-~/.config}/idare2/rc.d/* (sorted)
  4. the nearest .idare2rc in the current directory or an ancestor

Set IDARE2_RCFILE to use a single alternate file instead. Pass -N (or -NN) to skip rc loading entirely.

Batch commands

Use -q to suppress the banner and -c to execute one or more commands:

idare2 -qc 's main; pd 10' firmware.bin
idare2 -q -c 'iI' -c 'axt' firmware.bin
idare2 -qc 'pd 20' firmware.bin | grep call

Multiple commands can be separated with ;. A non-zero exit code is returned if any batch command fails.

Scripts passed with -I run before -i scripts and -c commands; -i scripts run after the database is open and before -c commands.

JSON output

Use -j to make JSON-capable commands return JSON by default. Command-level j suffixes are also supported:

idare2 -j -qc 'afl' firmware.bin
idare2 -qc 'aflj' firmware.bin

Raw binaries

Specify the processor, bitness, byte order, and load address when importing a binary without an ELF or PE header:

idare2 -a arm -b 32 -B 0x1000 firmware.bin
idare2 -a mipsb -b 32 --endian big -B 0x1000 firmware.bin
  • -a is an IDA processor name, for example metapc, arm:ARMv7, arm:ARMv8, armb, mipsl, mipsb, ppc, riscv, s390x, 68000, sparcb, or sh4.
  • -b must be 16, 32, or 64.
  • --endian big|little overrides the byte order the raw loader would pick for that processor.
  • -B is the load base and must be non-negative and 16-byte aligned.

These options apply when a new IDB is created. When -B is set, it also becomes the initial entry point; otherwise idare2 uses the first valid address. tests/integration/test_arch_matrix.py exercises these hints on 22 configurations (the 19 supported machines, including both byte orders).

Existing databases and IDA GUI

List active databases, open an IDB directly, or attach to a running session:

idare2 -L
idare2 --idb saved.i64 -qc 'afl~main'
idare2 --attach <session-id> -qc 'axt'

Session IDs are shown by idare2 -L.

Writing changes

Sessions are read-only by default. Pass -w to allow writes:

idare2 -w -qc 's main; wx 9090; w' firmware.bin
idare2 -w -qc 'e io.cache=true; wx 90 @ main; wc+' firmware.bin

w saves the IDB. With e io.cache=true, writes are buffered until wc+ is used.

Command language

Common radare2 operators are supported, including @, ~, |, >, >>, !, ., repeat prefixes such as 3pd, and bare addresses for seeking. @@ iterates a command over addresses; @@@ also sets the block size for each item, including explicit @@@= addr size ... pairs.

idare2 -qc 'pd 8 @ main' firmware.bin
idare2 -qc 'afl~main' firmware.bin
idare2 -qc 'axt > refs.txt' firmware.bin

Command overview

Area Commands
Seeking s s+ s- sf sF sb sn so sp s= s: s*
Disassembly pd pd -N pd-- pD pdf pdb pdk pdr pi pdi pdl pdq pdj pdC pdJ pd, pdc pC pA
Assembly pa wa wa* wa+ waf waF
Memory px pxw pxq pxd pxu p8 p8j p8s p8, p8d p8x p8* p8b p8f pr pc p6 pj p= pt pu pf pfj pfs ps psw psz psp psW psu psx psn pv pvu pvd pvp pvj pp* po* ph pwd x x8 xw xq xj
Information i iI ij it itj iD ia iaj il ilj ilq iS iSj iSS iS. iSh iSm ii is iz izz izzj ir ih iH ie iee ies iE iM iC iV iv iT ig ic icj icq icl ics ic* CL CLu CLf CLL
Analysis aa aaa af aF afr afn afu afi afl aflj aflq afb afc afC afv afvj afvR afvW afx afxj ao aoj ab axt axf axj aflc afln afl+ a8 ad adk ah an agf agfj agfd
Search / /x /v /r /w /wi /a /p // /+
Writing w wq wx wa w0 wd wf wi[1248][+-][n] w6[d/e/x] wc wc+ wc- u U
Metadata C Cj C* C. CC CCr CCu CC* CC. CC- C- Cd Cd. Ch Ch- Cs Cs. Cs.j Cs- Cs*
Types t tj t* ts tu tp tpv tpx tc td tt tt- t- te tf tfj tfc tn tn- to dt
Flags f f* f, f- f? fq fn fnj fN fr fx
Sessions S Ps Po P- Pj P y yy yx yt yf cc c1
Other ? b e q L _ % T *

Most information commands support a j suffix for JSON output.

Behavior notes

  • IDA performs analysis when the database is opened, so aa is usually a no-op.
  • asm.arch and asm.bits are read-only. Set the architecture when creating a database with -a and -b.
  • Sessions are read-only unless -w is passed.
  • w with no arguments saves the IDB.
  • -j enables JSON output; it does not start a JavaScript engine as it does in radare2.
  • Flag names are written to the IDB by default. Set e ida.flags.write=false to keep them session-local.
  • Unsupported commands fail explicitly instead of falling back to a different command.
  • pa assembles an instruction to hexpairs; wa assembles and writes it. IDA's assembler is used first. When the processor module has no assembler, idare2 falls back to radare2's rasm2 if it is on PATH (or IDARE2_RASM2 points to it), which covers common ARM, AArch64, MIPS, PPC, RISC-V and m68k targets.
  • pf supports r2's scalar formats, inline [n] arrays, offset controls and session-local named formats; unsupported format characters fail explicitly.
  • wa* and waF* print the equivalent wx command without modifying the database, so they work in read-only sessions.
  • agf prints a compact ASCII function graph, agfj/agj return r2-shaped graph JSON, and agfd emits Graphviz DOT. agg/aggd are accepted aliases for the current function's DOT.
  • pd -N disassembles backwards and pd-- N prints context (N before and N from the current address). pdk disassembles every method of the class at the seek. The pxw/pxq/pxd/pxu argument is a byte count, defaulting to the block size, and their row layout matches r2. aflc, afln and afl+ count functions, print rename commands and sum sizes.
  • iS lists ELF sections (an algorithm name adds a hash column), iSS lists program-header memory maps, and izz scans the whole input file, including non-loaded debug sections. CL* exposes the DWARF source-line data IDA imported; ic reconstructs classes from IDA's UDTs and C++ symbols.
  • Command prefixes validate their suffixes: an unknown pd/i/b/... suffix is a usage error instead of silently running the base command.

Development

The default test suite is offline and does not need IDA:

uv sync --group dev
uv run pytest
uv run ruff check .

uv sync and uv run manage .venv exactly, so they can replace the idapro package that IDA's idalib wheel provides. For the IDA-backed suites, install idalib after syncing and disable the implicit sync:

uv pip install <IDA>/idalib/python/idapro*.whl
python <IDA>/py-activate-idalib.py -d <IDA>

uv run --no-sync pytest -m real_ida
uv run --no-sync pytest -m parity
uv run --no-sync pytest -m arch_matrix   # raw-binary import/disassembly matrix
uv run --no-sync tools/arch_matrix.py    # the same, one row per CPU

Build the distribution archives and validate the PyPI metadata with:

uv build
uv run twine check dist/*

The test suite covers offline unit tests, real IDB integration, radare2 output parity, and the architecture matrix in tests/integration/test_arch_matrix.py (22 configurations covering the 19 supported machines).

Releasing

See RELEASING.md for the version-bump checklist, TestPyPI dry run, and PyPI Trusted Publishing setup. Release notes live in CHANGELOG.md.

License

MIT. See LICENSE.

Metadata

Release files for idare2 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idare2 0.1.0
File Size Uploaded Provenance Actions
idare2-0.1.0.tar.gz 282.4 kB With provenance Details for idare2-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for idare2 0.1.0
File Interpreter ABI Platform Actions
idare2-0.1.0-py3-none-any.whl Python 3 none any Details for idare2-0.1.0-py3-none-any.whl

Total release size: 477.8 kB

Release files / idare2-0.1.0.tar.gz

Download URL idare2-0.1.0.tar.gz
Size 282.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1ebb4dd8855060b42d8a9639fd0880407834c5191116b2edf29003db18e239f9
BLAKE2b-256 checksum
How to use checksums
8b6a7a06209200354d367ef5e7092d0c8129ee6f01257ea1ce2c49bddf5e0e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / idare2-0.1.0-py3-none-any.whl

Download URL idare2-0.1.0-py3-none-any.whl
Size 195.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd1cd5f2a9d07c4f85901774081ac6da1c769392b148842769a573033708704f
BLAKE2b-256 checksum
How to use checksums
0ede3403f39a0515cb0a9b350601e8cfaad819389e54b4db8d11c4afc5912898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for idare2 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for idare2-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page