Git-native data modeling for dbt users
Project description
DataLex
AI-first dbt adoption, contracts, diagrams, and manifest publishing.
DataLex is a local-first OSS workflow for teams that already use dbt. It scans your existing dbt project, lets AI propose business domains and contracts from dbt evidence, and writes reviewed DataLex artifacts back to Git.
DataLex does not replace dbt. dbt remains the source of truth for SQL, model YAML, semantic metrics, tests, exposures, and enforced physical contracts. DataLex adds the business/domain layer above dbt.
Install from PyPI
Use this path when you want DataLex on your machine or inside an existing dbt repo.
python3 -m pip install -U 'datalex-cli[serve]'
datalex --version
datalex serve
Open http://localhost:3030.
To open DataLex directly on an existing dbt repo:
cd ~/path/to/your-dbt-project
datalex serve --project-dir .
For warehouse drivers, add the matching extra:
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]'
Requirements: Python 3.9+ and Git. The [serve] extra includes a portable Node
runtime for the local UI.
Run with Docker
Use Docker when you do not want to install Python packages on the host.
git clone https://github.com/duckcode-ai/DataLex.git
cd DataLex
docker build -t datalex:local .
docker run --rm -p 3030:3001 datalex:local
To use Docker with an existing dbt repo:
cd ~/path/to/your-dbt-project
docker run --rm -p 3030:3001 \
-v "$PWD":/workspace \
-e REPO_ROOT=/workspace \
-e DM_CLI=/app/datalex \
datalex:local
In the UI, choose /workspace as the dbt project path.
Core workflow
Connect dbt repo -> AI Setup -> Readiness -> Generate -> Review -> Contracts -> Publish
- Connect your dbt repo.
- Set up AI with OpenAI, Claude, or Ollama.
- Scan readiness from dbt manifest, YAML, metrics, tests, exposures, owners, and contracts.
- Generate focused proposal packs for one domain, model group, or metric family.
- Review and certify proposals before anything becomes trusted.
- Publish
datalex-manifest.jsonfrom certified contracts.
Generation requires a tested AI provider. Readiness works without AI, but DataLex will not create fake domains or placeholder contracts.
AI setup
DataLex uses your dbt evidence to generate proposals:
target/manifest.json- dbt model YAML
- semantic models and metrics
- tests and relationships
- exposures
- owners and descriptions
- existing dbt contracts
- existing DataLex artifacts
Provider settings are project-private and stored under:
<your-dbt-project>/.datalex/agent/provider-settings.json
They are not written under versioned DataLex/, and API responses redact
secrets.
Ollama example
ollama pull gemma4:12b
ollama serve
In DataLex, open AI Setup, choose Ollama, set:
Base URL: http://localhost:11434
Model: gemma4:12b
Then click Save and Test.
What DataLex writes
New OSS artifacts use this domain-first layout:
DataLex/
datalex.yaml
domains/
commerce.yaml
commerce/
conceptual/
logical/
physical/
contracts/
proposals/
glossary/
semantic/
imported/
dbt/
generated/
dbt/
generated-sql/
Skills/
DataLex still reads older layouts for compatibility, but new UI actions write lowercase canonical paths.
Only certified contracts and metric contracts enter datalex-manifest.json.
Draft, reviewed, and rejected proposals stay out of the publish manifest.
Publish a manifest
datalex datalex manifest build DataLex --out DataLex/datalex-manifest.json
The manifest is the stable OSS handoff for downstream tools and future cloud flows. DQL is not required in the OSS repo. DataLex only shows DQL readiness when a project explicitly enables that integration.
Tutorials
Start here:
- Install and run DataLex
- Connect an existing dbt repo
- Configure AI with OpenAI, Claude, or Ollama
- Generate, review, and certify a proposal pack
- Publish the DataLex manifest
- Run DataLex with Docker
For the full flow in one place, read Getting started.
For contributors
git clone https://github.com/duckcode-ai/DataLex.git
cd DataLex
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[serve,duckdb]'
npm --prefix packages/api-server install
npm --prefix packages/web-app install
datalex serve
Useful checks:
npm --prefix packages/api-server test
npm --prefix packages/web-app run build
python3 -m pytest tests/datalex packages/readiness_engine/tests
Links
- Docs: docs/index.md
- CLI reference: docs/cli.md
- Enterprise OSS workflow: docs/enterprise-oss-workflow.md
- DataLex layout: docs/datalex-layout.md
- Issues: GitHub Issues
- Community: Discord
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datalex_cli-1.11.0.tar.gz.
File metadata
- Download URL: datalex_cli-1.11.0.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08cc22ce485834ae972b1836fd419fd66476d0859680b48478b4c933f949193d
|
|
| MD5 |
63340258c0986930f97e0c98ac82789e
|
|
| BLAKE2b-256 |
bcbd1682a24aa7ea2b412750f1ac08277f233d3ea93a3c890f387da606dc2bfa
|
Provenance
The following attestation bundles were made for datalex_cli-1.11.0.tar.gz:
Publisher:
publish.yml on duckcode-ai/DataLex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datalex_cli-1.11.0.tar.gz -
Subject digest:
08cc22ce485834ae972b1836fd419fd66476d0859680b48478b4c933f949193d - Sigstore transparency entry: 1886669659
- Sigstore integration time:
-
Permalink:
duckcode-ai/DataLex@ea7737787e6e83b4dbdbc137994101a6b4b75a51 -
Branch / Tag:
refs/tags/v1.11.0 - Owner: https://github.com/duckcode-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ea7737787e6e83b4dbdbc137994101a6b4b75a51 -
Trigger Event:
push
-
Statement type:
File details
Details for the file datalex_cli-1.11.0-py3-none-any.whl.
File metadata
- Download URL: datalex_cli-1.11.0-py3-none-any.whl
- Upload date:
- Size: 6.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73a1206db77f3d15ad4dea4210c68b726e29555bae36d3ddffaaac02d0269643
|
|
| MD5 |
3c2e00d5ef947839d4b5290c60c8ce5e
|
|
| BLAKE2b-256 |
09bf70cfb807a3773c24e37d393068adadab90827dcd68e9eddbcc057122b52d
|
Provenance
The following attestation bundles were made for datalex_cli-1.11.0-py3-none-any.whl:
Publisher:
publish.yml on duckcode-ai/DataLex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datalex_cli-1.11.0-py3-none-any.whl -
Subject digest:
73a1206db77f3d15ad4dea4210c68b726e29555bae36d3ddffaaac02d0269643 - Sigstore transparency entry: 1886669704
- Sigstore integration time:
-
Permalink:
duckcode-ai/DataLex@ea7737787e6e83b4dbdbc137994101a6b4b75a51 -
Branch / Tag:
refs/tags/v1.11.0 - Owner: https://github.com/duckcode-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ea7737787e6e83b4dbdbc137994101a6b4b75a51 -
Trigger Event:
push
-
Statement type: