Metadata-Version: 2.4
Name: ghidractl
Version: 0.1.3
Summary: Ghidra installation manager and Python library
Project-URL: Homepage, https://github.com/monkeywave/ghidractl
Project-URL: Repository, https://github.com/monkeywave/ghidractl
Project-URL: Issues, https://github.com/monkeywave/ghidractl/issues
Author: Daniel Baier
License-Expression: MIT
License-File: LICENSE
Keywords: binary-analysis,ghidra,nsa,reverse-engineering,security
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: packaging>=23.0
Requires-Dist: platformdirs>=4.0
Requires-Dist: rich>=13.0
Requires-Dist: tomli-w>=1.0
Requires-Dist: tomli>=2.0; python_version < '3.11'
Requires-Dist: typer[all]>=0.12
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# GhidraCtl

[![PyPI version](https://badge.fury.io/py/ghidractl.svg)](https://badge.fury.io/py/ghidractl)
[![Publish status](https://github.com/monkeywave/ghidractl/actions/workflows/publish.yml/badge.svg?branch=main)](https://github.com/monkeywave/ghidractl/actions/workflows/publish.yml)
[![Lint](https://github.com/monkeywave/ghidractl/actions/workflows/lint.yml/badge.svg)](https://github.com/monkeywave/ghidractl/actions/workflows/lint.yml)
[![Tests](https://github.com/monkeywave/ghidractl/actions/workflows/test.yml/badge.svg)](https://github.com/monkeywave/ghidractl/actions/workflows/test.yml)

A Python library and CLI tool to effortlessly install, manage, and automate Ghidra environments.

Install, update, and manage multiple [Ghidra](https://ghidra-sre.org/) versions from the command line — or use it as an importable library in your Python tools.

## Features

- Install/update/uninstall multiple Ghidra versions side-by-side
- Auto-detect and manage Java/JDK dependencies (Adoptium Temurin)
- Cross-platform: macOS (ARM64 + x86-64), Linux, Windows
- Rich terminal UI with progress bars and tables
- Importable Python API for toolchain integration
- Extension and settings management

## Installation

```bash
pip install ghidractl
```

## CLI Usage

```bash
# Install the latest Ghidra
ghidractl install

# Install a specific version
ghidractl install 11.3

# List installed versions
ghidractl list

# List all available versions
ghidractl list --all

# Set active version
ghidractl use 11.3

# Launch Ghidra GUI
ghidractl run

# Update to latest
ghidractl update

# Uninstall a version
ghidractl uninstall 11.2.1

# Print install path
ghidractl locate
```

### Java Management

```bash
# Check Java status
ghidractl java check

# Install JDK via Adoptium
ghidractl java install

# Install a specific JDK version
ghidractl java install --version 17

# Manual install instructions
ghidractl java guide
```

### Extensions

```bash
# List extensions
ghidractl ext list

# Install from ZIP
ghidractl ext install ./my-extension.zip

# Remove an extension
ghidractl ext uninstall MyExtension
```

### Settings

```bash
# Backup Ghidra settings
ghidractl settings backup

# Restore from backup
ghidractl settings restore ghidra_settings_backup.zip
```

### Configuration

```bash
# Show config
ghidractl config show

# Set GitHub token (for higher API rate limits)
ghidractl config set github_token ghp_your_token_here
```

## Library API

```python
import ghidractl

# Install Ghidra
path = ghidractl.install("latest")

# List available versions
versions = ghidractl.list_versions()

# List installed versions
installed = ghidractl.installed()

# Set active version
ghidractl.use("11.3")

# Get install path
path = ghidractl.get_path()

# Launch Ghidra
ghidractl.run()

# Java management
java = ghidractl.java.check()
ghidractl.java.install(version=21)
```

## Requirements

- Python 3.10+
- Java/JDK (auto-installable via `ghidractl java install`)

