Edit your contract

The Data Contract Editor is a web-based visual editor for ODCS data contracts. It is hosted at editor.datacontract.com, and the CLI can launch it locally against a file on your machine.

Edit a local file

datacontract edit odcs.yaml

This starts a local web server and opens the Data Contract Editor for the given file in your browser. The editor is bundled with the CLI, so no internet access is required. Saving in the editor writes directly back to the local file.

Key behaviors:

Requirements

The edit command requires the api extra:

pip install 'datacontract-cli[api]'

The editor assets (JS/CSS) are bundled with the CLI and work offline by default. You can change where they are loaded from:

Options

Option Default Description
--port 4243 Bind the local server to this port.
--host 127.0.0.1 Bind to this host. For Docker, set it to 0.0.0.0.
--editor-version bundled Version of the datacontract-editor npm package to load from the CDN.
--editor-assets-url Base URL to load editor assets from (e.g. a self-hosted build).
--open / --no-open --open Open the editor in the default browser.
--debug / --no-debug --no-debug Enable debug logging.

Example

datacontract edit datacontract.yaml

See the edit command reference for the full signature.