# `mix opencode.gen.client`
[🔗](https://github.com/UtkarshUsername/opencode-sdk-elixir/blob/v0.1.84/lib/mix/tasks/opencode.gen.client.ex#L1)

Generates Elixir client code from OpenCode CLI OpenAPI specification.

This task:
1. Fetches the OpenAPI spec from the OpenCode CLI (or uses a local spec file)
2. Generates Elixir client code using oapi_generator

## Usage

    mix opencode.gen.client

## Options

    --spec PATH    Path to local OpenAPI spec JSON file (optional)

## Examples

    # Generate from running OpenCode CLI
    mix opencode.gen.client

    # Generate from local spec file
    mix opencode.gen.client --spec priv/opencode_openapi.json

---

*Consult [api-reference.md](api-reference.md) for complete listing*
