Skip to main content

CLI tool for reverse engineering with IDA's idalib

Project description

ida-cli

CLI tool for reverse engineering with IDA's idalib (ida-domain).

Features

  • Subcommand-based CLI for all common IDA operations
  • JSON output for easy automation and agent integration
  • Invisible daemon for fast repeated commands (no repeated IDB loading)
  • Auto-detection of existing IDB files

Installation

Requires IDA Pro 9.1+ with idalib. ida-cli auto-detects IDA in /opt/ida-pro-*, /Applications/IDA*.app, or set IDADIR.

# No install needed - just run with uvx
uvx ida-cli -i binary.exe info

# Or install globally
pip install ida-cli

Usage

# Get binary info
uvx ida-cli -i binary.exe info

# List functions
uvx ida-cli -i binary.exe functions list
uvx ida-cli -i binary.exe functions list --filter "main|start"

# Decompile a function
uvx ida-cli -i binary.exe decompile main
uvx ida-cli -i binary.exe decompile 0x401000

# Disassemble
uvx ida-cli -i binary.exe disassemble main

# Cross-references
uvx ida-cli -i binary.exe xrefs 0x401000 --direction to
uvx ida-cli -i binary.exe callgraph main --depth 3

# Search
uvx ida-cli -i binary.exe strings --pattern "password|key"
uvx ida-cli -i binary.exe search "48 8B 05" --type bytes

# Mutation
uvx ida-cli -i binary.exe rename sub_401000 my_function
uvx ida-cli -i binary.exe comment 0x401000 "This is the entry point"
uvx ida-cli -i binary.exe set-type my_function "int __fastcall my_function(int a, char *b)"

# Daemon management
uvx ida-cli --shutdown        # Stop daemon for current target
uvx ida-cli --shutdown-all    # Stop all daemons

Daemon Behavior

The CLI automatically spawns a background daemon when first accessing an IDB. The daemon:

  • Keeps the IDB loaded in memory for fast subsequent commands
  • Auto-terminates after 15 minutes of inactivity (configurable via --timeout)
  • Uses Unix sockets for IPC (/tmp/ida-cli-{hash}.sock)
  • Logs to ~/.cache/ida-cli/daemon-{hash}.log

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run type checking
mypy src/

# Run linting
ruff check src/
ruff format src/

# Run tests
pytest

Agent Integration

ida-cli includes skills for AI coding assistants like Claude Code, Codex, and others. To add reverse engineering capabilities to your agent, install the skill: curl -sL https://raw.githubusercontent.com/irrigationreal/ida-cli/main/skills/ida-cli.md -o your/skills/directory/ida-cli.md. The skill teaches agents how to use ida-cli for binary analysis: decompiling functions, tracing cross-references, searching strings, and annotating findings. All commands output JSON for easy parsing.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ida_cli-0.1.1.tar.gz (103.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ida_cli-0.1.1-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file ida_cli-0.1.1.tar.gz.

File metadata

  • Download URL: ida_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 103.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ida_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a59c9859970c18af5f853cac8fe0f17d72e861784d67e2008511a3bf153f9c4e
MD5 0476db15a8d53655c61bfdc00c8403f5
BLAKE2b-256 3228f1f9322e8fc48517851064a06e38a3a43eb0b6bd2a44eca963b709e0062b

See more details on using hashes here.

File details

Details for the file ida_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ida_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ida_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7a507a59c6662f7e9f2b24a2ad6879dbcefdf9d2f2ea92905c285a061da24bb
MD5 1bd673aff5d40e174ecfd56e24edab89
BLAKE2b-256 b70adaddfd5b14d6d0faf3d8c872aecd9a4cffab13ab35eab5eee7e75d4276ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page