Skip to content

Add module dump command for bulk export #130

@engalar

Description

@engalar

Problem

Understanding a module currently requires many sequential queries:

  1. SHOW ENTITIES IN Module → get entity list
  2. DESCRIBE ENTITY Module.X × N → get each entity definition
  3. SHOW MICROFLOWS IN Module → get microflow list
  4. DESCRIBE MICROFLOW Module.Y × M → get each microflow definition
  5. Same for pages, snippets, enumerations...

For a module with 10 entities, 20 microflows, and 15 pages, this is 45+ separate commands.

Proposal

A single command that exports all definitions in a module:

./mxcli dump -p app.mpr --module Sales
./mxcli dump -p app.mpr --module Sales --json
./mxcli dump -p app.mpr --module Sales --format mdl > sales-dump.mdl

Scope options

# Full module dump (default)
./mxcli dump -p app.mpr --module Sales

# Selective dump
./mxcli dump -p app.mpr --module Sales --only entities,microflows
./mxcli dump -p app.mpr --module Sales --exclude pages

Output

The dump would include complete MDL definitions for all elements in the module — essentially running DESCRIBE on every entity, microflow, page, snippet, enumeration, and association, concatenated into a single output.

Benefits

  • 1 command replaces 45+ — dramatic reduction in round-trips
  • Complete context in one shot — AI agents can load an entire module into context at once
  • Exportable — MDL format output can be version-controlled or diffed
  • Pairs well with --json output (#N) for structured consumption

Priority

Medium-high — highest single-command impact for AI exploration efficiency, but depends on --json (#N) for maximum benefit.


Copied from engalar#51

Comments from original issue

@ako (2026-04-08T04:46:17Z):
Did you look into:

  • describe module with all
  • structure: https://www.mxcli.org/appendixes/quick-reference.html?highlight=structure#project-structure
    @ako (2026-04-08T04:53:32Z):
    The structure command is easiest if you want to understand what a module provides without getting the actual source code: it lists modules, document types and signature. Claude often uses this to first understand what is available, and then get the source for relevant documents. This is similar how claude uses treesitter to get the structure of a large source code application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions