# Commands

> Reference for every Data Contract CLI command.

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`](https://cli.datacontract.com/commands/init.md) | Create an empty data contract. |
| [`edit`](https://cli.datacontract.com/commands/edit.md) | Edit a data contract file in the Data Contract Editor (web UI). |
| [`lint`](https://cli.datacontract.com/commands/lint.md) | Validate that the datacontract.yaml is correctly formatted. |
| [`changelog`](https://cli.datacontract.com/commands/changelog.md) | Show a changelog between two data contracts. |
| [`breaking`](https://cli.datacontract.com/commands/breaking.md) | Show compatibility impact between two data contracts. |
| [`test`](https://cli.datacontract.com/commands/test.md) | Run schema and quality tests on configured servers. |
| [`dbt`](https://cli.datacontract.com/commands/dbt.md) | Work with data contracts in your dbt project. |
| [`ci`](https://cli.datacontract.com/commands/ci.md) | Run tests for CI/CD pipelines. |
| [`export`](https://cli.datacontract.com/commands/export.md) | Convert a data contract to a target format. |
| [`import`](https://cli.datacontract.com/commands/import.md) | Create a data contract from a source format. |
| [`catalog`](https://cli.datacontract.com/commands/catalog.md) | Create a catalog of data contracts, as HTML or Markdown. |
| [`publish`](https://cli.datacontract.com/commands/publish.md) | Publish the data contract to Entropy Data. |
| [`api`](https://cli.datacontract.com/commands/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 breaking 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
```
