Skip to content

Flatten the datalex datalex <sub> CLI nesting #9

Description

@KKranthi6881

Problem

The DataLex-spec subcommand tree is currently wired under a nested group, so users type things like:

datalex datalex validate my-project/
datalex datalex dbt sync my-project/

The doubled word is a transitional artifact — it was there to avoid collisions with legacy flat commands (validate, pull, generate, etc.) during the DataLex rollout.

Goal

Register the DataLex subcommands at the top level so users type:

datalex validate my-project/
datalex dbt sync my-project/

Suggested approach

  1. Read packages/cli/src/datalex_cli/datalex_cli.py (DataLex subcommand tree) and packages/cli/src/datalex_cli/main.py (legacy flat commands).
  2. Enumerate the name collisions between the two sets (validate, diff, info, emit, migrate, …).
  3. Pick a resolution per conflict: the DataLex-spec command wins, and the legacy version is renamed to datalex legacy <sub> or removed if clearly unused.
  4. Update docs/cli.md, README.md, the tutorial, and any test invocations of datalex datalex ….
  5. Add a short datalex --help golden test to pin the flattened tree.

Acceptance criteria

  • datalex validate, datalex dbt sync, datalex diff, datalex emit ddl, etc. all work at the top level.
  • All existing tests still pass.
  • Docs no longer say datalex datalex … anywhere.

Why this is a good first issue

Well-scoped, touches one file mostly, gives you a tour of the CLI surface, and the test suite will catch most regressions. No schema or semantics changes required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions