Search documentation of Metastatic

# mix metastatic.gen.supplemental (Metastatic v0.13.2)

View Source

Generates a new supplemental module scaffold.

## Usage

    mix metastatic.gen.supplemental NAME --language LANG [options]

## Arguments

- `NAME` - Module name (e.g., `python.requests`, `javascript.axios`)
- `--language` or `-l` - Target language (required)

## Options

- `--constructs` or `-c` - Comma-separated list of constructs to support
- `--library` - Name of the library being wrapped
- `--library-version` - Version requirement for the library

## Examples

    # Generate Python supplemental for requests library
    mix metastatic.gen.supplemental python.requests --language python \
      --constructs http_get,http_post --library requests --library-version ">=2.28.0"

    # Generate JavaScript supplemental for axios
    mix metastatic.gen.supplemental javascript.axios --language javascript \
      --constructs http_get,http_post --library axios

    # Generate with minimal options
    mix metastatic.gen.supplemental ruby.httparty --language ruby

## Generated Files

The generator creates:

- `lib/metastatic/supplemental/{language}/{name}.ex` - Main supplemental module
- `test/metastatic/supplemental/{language}/{name}_test.exs` - Test file

The generated module includes:

- Behaviour implementation (@behaviour Metastatic.Supplemental)
- info/0 function with metadata
- transform/3 function scaffold for each construct
- Comprehensive documentation
- Example tests