{"id":4047,"library":"ida-hcli","title":"Hex-Rays CLI Utility","description":"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.","status":"active","version":"0.17.2","language":"en","source_language":"en","source_url":"https://github.com/HexRaysSA/ida-hcli","tags":["cli","ida","hex-rays","reverse-engineering","security"],"install":[{"cmd":"pip install ida-hcli","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"While primarily a CLI tool, core components like HCLISettings can be imported for programmatic configuration.","symbol":"HCLISettings","correct":"from hcli.settings import HCLISettings"}],"quickstart":{"code":"import subprocess\n\ntry:\n    # Run a basic hcli command to check its version\n    result = subprocess.run(['hcli', '--version'], capture_output=True, text=True, check=True)\n    print(f\"hcli version: {result.stdout.strip()}\")\n\n    # Example of checking IDA Pro installations\n    # result = subprocess.run(['hcli', 'check'], capture_output=True, text=True, check=True)\n    # print(f\"hcli check output:\\n{result.stdout}\")\n\nexcept FileNotFoundError:\n    print(\"Error: 'hcli' command not found. Ensure ida-hcli is installed and in your PATH.\")\nexcept subprocess.CalledProcessError as e:\n    print(f\"Error running hcli command: {e.cmd}\")\n    print(f\"Stdout: {e.stdout}\")\n    print(f\"Stderr: {e.stderr}\")","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade to v0.17.0 or newer for clarified help messages related to IDA installation directories.","message":"Prior to v0.17.0, the help message for the `HCLI_CURRENT_IDA_INSTALL_DIR` environment variable on macOS was misleading, potentially causing confusion during setup.","severity":"gotcha","affected_versions":"<0.17.0"},{"fix":"Update to v0.16.0 or later to benefit from improved Python executable detection logic, ensuring better compatibility with various IDA Pro setups.","message":"Versions before v0.16.0 had a less robust algorithm for detecting the correct Python executable associated with IDA Pro, which could lead to runtime errors or incorrect interpreter usage.","severity":"gotcha","affected_versions":"<0.16.0"},{"fix":"Upgrade to v0.16.0 or higher. This version explicitly sets UTF-8 encoding for files and subprocesses, mitigating potential encoding issues.","message":"Before v0.16.0, explicit UTF-8 encoding was not consistently used across the library and for subprocesses. This could cause encoding-related errors or unexpected behavior when dealing with non-ASCII characters in paths, filenames, or output.","severity":"breaking","affected_versions":"<0.16.0"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}