# Commands

> Reference for every Data Contract CLI command.

# Commands

{/* AUTOGENERATED from `datacontract --help`: do not edit by hand; regenerate with update_command_docs.py */}

The `datacontract` CLI groups its functionality into the commands below. Run `datacontract --help` or `datacontract <command> --help` at any time to see the same information in your terminal.

```bash
datacontract [OPTIONS] COMMAND [ARGS]...
```

## Global options

| Option | Default | Description |
|---|---|---|
| `--version` | — | Prints the current version. |
| `--system-truststore` | off | Verify TLS using the operating system's certificate trust store instead of the bundled CA certificates (e.g. behind a corporate proxy or internal CA). |
| `--config-file` | — | Path to a YAML file with credentials and connection options (sections per data source, $\{VAR\} references resolve from the environment). Defaults to ./datacontract-config.yaml or ~/.datacontract/config.yaml if present. |

Most commands additionally accept `--debug` for verbose logging.

## Commands

| Command | Description |
|---|---|
| [`init`](./init.md) | Create an empty data contract. |
| [`edit`](./edit.md) | Edit a data contract file in the Data Contract Editor (web UI). |
| [`lint`](./lint.md) | Validate that the datacontract.yaml is correctly formatted. |
| [`changelog`](./changelog.md) | Show a changelog between two data contracts. |
| [`test`](./test.md) | Run schema and quality tests on configured servers. |
| [`dbt`](./dbt/index.md) | Work with data contracts in your dbt project. |
| [`ci`](./ci.md) | Run tests for CI/CD pipelines. |
| [`export`](./export/index.md) | Convert a data contract to a target format. |
| [`import`](./import/index.md) | Create a data contract from a source format. |
| [`catalog`](./catalog.md) | Create an HTML catalog of data contracts. |
| [`publish`](./publish.md) | Publish the data contract to Entropy Data. |
| [`api`](./api.md) | Start the datacontract CLI as server application with REST API. |

## Common usage

```bash
datacontract init datacontract.yaml
datacontract edit datacontract.yaml
datacontract lint datacontract.yaml
datacontract changelog datacontract-v1.yaml datacontract-v2.yaml
datacontract test datacontract.yaml --server production
datacontract dbt sync orders.odcs.yaml --project-dir ./warehouse
datacontract ci datacontract.yaml --output test-results.xml --output-format junit
datacontract export html datacontract.yaml --output datacontract.html
datacontract import sql --source ddl.sql --dialect postgres --output datacontract.yaml
datacontract catalog --files "**/*.yaml" --output catalog/
datacontract publish datacontract.yaml
datacontract api --port 4242 --host 0.0.0.0
```
