Hex-Rays CLI Utility

0.17.2 · active · verified Sat Apr 11

ida-hcli (Hex-Rays CLI Utility) is a command-line interface tool designed to interact with Hex-Rays IDA Pro installations. It assists with managing IDA versions, plugins, and configurations programmatically or via the terminal. Currently at version 0.17.2, it sees frequent updates, typically with minor releases several times a month.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to invoke the `hcli` command-line utility programmatically using Python's `subprocess` module to check its installed version. `ida-hcli` is primarily a CLI tool, and this is the most common way to interact with it.

import subprocess

try:
    # Run a basic hcli command to check its version
    result = subprocess.run(['hcli', '--version'], capture_output=True, text=True, check=True)
    print(f"hcli version: {result.stdout.strip()}")

    # Example of checking IDA Pro installations
    # result = subprocess.run(['hcli', 'check'], capture_output=True, text=True, check=True)
    # print(f"hcli check output:\n{result.stdout}")

except FileNotFoundError:
    print("Error: 'hcli' command not found. Ensure ida-hcli is installed and in your PATH.")
except subprocess.CalledProcessError as e:
    print(f"Error running hcli command: {e.cmd}")
    print(f"Stdout: {e.stdout}")
    print(f"Stderr: {e.stderr}")

view raw JSON →