> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# gable data-asset create-contract

Creates the YAML contract specification for a list of data assets. If a regex
pattern (`--data-asset-id-pattern`) is provided, the command will create contracts
for all data assets that match the pattern as well as the data assets provided in.

The specification that is produced is based off the registered data asset but the
user will need to fill in places marked with 'PLACEHOLDER:' such as field
descriptions and ownership information.

## Usage

```bash theme={null}
gable data-asset create-contract [DATA_ASSET_IDS] [OPTIONS]
```

## Options

| Option                    | Type | Required | Default | Description                                                                                                      |
| ------------------------- | ---- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
| `--data-asset-id-pattern` | text |          |         | Regex pattern to match data asset IDs. Contracts will be created for all data asset IDs that match this pattern. |
| `--output-dir`            | path |          |         | Directory to output contracts. This directory must exist                                                         |

## Arguments

**`DATA_ASSET_IDS`** — Optional

## Example

```bash theme={null}
gable data-asset create-contract postgres://sample.host:5432:db.public.table --output-dir contracts

gable data-asset create-contract --data-asset-id-pattern "postgres://*" --output-dir contracts
```
