Skip to content

Latest commit

 

History

History
109 lines (76 loc) · 2.61 KB

File metadata and controls

109 lines (76 loc) · 2.61 KB

CLI Reference

The CLI installs as both datalex and dm. Use datalex in new docs.

datalex --help
datalex datalex --help

Start the local app

datalex serve
datalex serve --project-dir ~/path/to/your-dbt-project

Use this path for the OSS UI workflow:

Connect -> AI Setup -> Readiness -> Generate -> Review -> Contracts -> Publish

Build the DataLex manifest

datalex datalex manifest build DataLex --out DataLex/datalex-manifest.json

Useful flags:

  • --out <path> writes the manifest to a specific file.
  • --output-json prints the manifest JSON to stdout.
  • --datalex-version <version> writes an explicit producer version.

Only certified contracts and metric contracts enter the manifest.

Validate a DataLex project

datalex datalex validate DataLex

Use this before committing generated artifacts.

Inspect a DataLex project

datalex datalex info DataLex

This summarizes discovered domains, entities, contracts, policies, and related artifacts.

dbt import and emit

DataLex OSS now recommends the UI enterprise workflow for dbt adoption, but the CLI still exposes dbt round-trip commands.

datalex dbt import target/manifest.json --out-root DataLex/imported/dbt
datalex datalex dbt sync . --out-root DataLex/imported/dbt
datalex datalex dbt emit DataLex --out-dir build/dbt

Use dbt parse first when possible so target/manifest.json is fresh.

Diffs and package checks

datalex datalex diff DataLex-main DataLex --exit-on-breaking
datalex datalex mesh check DataLex --strict

These commands are useful in CI after proposals are certified.

AI provider setup

AI provider settings for the enterprise workflow are configured in the UI under AI Setup. Settings are stored under:

<project>/.datalex/agent/provider-settings.json

Environment variables can supplement local settings:

export OPENAI_API_KEY="..."
export ANTHROPIC_API_KEY="..."
export OLLAMA_BASE_URL="http://localhost:11434"

Install extras

python3 -m pip install -U 'datalex-cli[serve]'
python3 -m pip install -U 'datalex-cli[serve,duckdb]'
python3 -m pip install -U 'datalex-cli[serve,postgres]'
python3 -m pip install -U 'datalex-cli[serve,snowflake]'
python3 -m pip install -U 'datalex-cli[serve,all]'

Tutorials