The CLI installs as both datalex and dm. Use datalex in new docs.
datalex --help
datalex datalex --helpdatalex serve
datalex serve --project-dir ~/path/to/your-dbt-projectUse this path for the OSS UI workflow:
Connect -> AI Setup -> Readiness -> Generate -> Review -> Contracts -> Publish
datalex datalex manifest build DataLex --out DataLex/datalex-manifest.jsonUseful flags:
--out <path>writes the manifest to a specific file.--output-jsonprints the manifest JSON to stdout.--datalex-version <version>writes an explicit producer version.
Only certified contracts and metric contracts enter the manifest.
datalex datalex validate DataLexUse this before committing generated artifacts.
datalex datalex info DataLexThis summarizes discovered domains, entities, contracts, policies, and related artifacts.
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/dbtUse dbt parse first when possible so target/manifest.json is fresh.
datalex datalex diff DataLex-main DataLex --exit-on-breaking
datalex datalex mesh check DataLex --strictThese commands are useful in CI after proposals are certified.
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"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]'