Metadata-Version: 2.1
Name: agent-plugin-builder
Version: 0.3.0
Summary: Builder for Agent Plugins.
Home-page: https://github.com/guardicode/agent-plugin-builder
License: GPLv3
Author: Ilija Lazoroski
Author-email: ilija.lazoroski@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: docker (>=7.1.0,<8.0.0)
Requires-Dist: monkey-types (>=0.7.0,<0.8.0)
Requires-Dist: monkeyevents (>=0.4.0,<0.5.0)
Requires-Dist: pip (>=24.0,<25.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Project-URL: Repository, https://github.com/guardicode/agent-plugin-builder
Description-Content-Type: text/markdown

# Agent Plugin Builder

A package which with a help of `infectionmonkey/agent-builder` and `infectionmonkey/plugin-builder`
Docker images, builds an Agent Plugin archive which can be installed in Monkey Island and
used in the simulation over your network.

It uses an Python Docker API client to connect to your local Docker environment and
run with the mentioned Docker Images needed docker commands.

## Getting started

### Installation

Install Agent Plugin Builder with `pip install .`

### Running Agent Plugin Builder

After installation, if pip installed it somewhere in your `$PATH` Agent Plugin Builder
can be started by simply invoking:

    build_agent_plugin <PLUGIN_PATH>

where:

    Required:
        PLUGIN_PATH: The path where you have the Agent Plugin code.

    Optional:
        -b/--build-dir-path: The path where all needed build artifacts will be stored.
        If the directory is not empty, it will delete it using `shutil.rmtree`
        Default: <current_working_directory>/build

        -d/--dist-dir-path: The path where resulting Agent Plugin archive will be stored.
        Default: <current_working_directory>/dist

        -s/--source-dir: The name of the source directory.
        Default: <plugin_name>_<plugin_type>

        -v/--verbose: Multiple occurrences increases the logging level of the console logging.
        Example: -v means CRITICAL, -vvvvv means DEBUG.
        Default: if not specific, the logging level will be INFO.

### Using Poetry

Alternatively one may use Agent Plugin Builder without installing it by
cloning this repository and invoking:

    poetry install
    poetry run build_agent_plugin <PLUGIN_PATH>

## Development

### Setting up your development environment

Run the following commands to install the necessary prerequisites:

    pip install poetry pre-commit
    poetry install
    pre-commit install -t pre-commit -t prepare-commit-msg

