SkillAgentSearch skills...

Mxcli

Mendix cli tool, a headless way to work with Mendix projects. Enables Mendix projects for use with 3rd party agentic coding tools like Claude Code and Copilot. Includes a starlark linter for quality validation.

Install / Use

/learn @mendixlabs/Mxcli
About this skill

Quality Score

0/100

Supported Platforms

Claude Code
Claude Desktop
GitHub Copilot

README

mxcli - Mendix CLI for AI-Assisted Development

WARNING: Alpha-quality software. This project is in early stages and has been largely vibe-engineered with AI coding assistants. Expect bugs, missing features, and rough edges. mxcli can corrupt your Mendix project files — always work on a copy or use version control. Use at your own risk. This has been developed and tested against Mendix 11.6, other versions are currently not validated.

Do not edit a project with mxcli while it is open in Studio Pro. Studio Pro maintains in-memory caches that cannot be updated externally. Close the project in Studio Pro first, run mxcli, then re-open the project.

A command-line tool that enables AI coding assistants (Claude Code, GitHub Copilot, OpenCode, Cursor, Continue.dev, Windsurf, Aider, and others) to read, understand, and modify Mendix application projects.

Read the documentation | Try it in the Playground -- no install needed, runs in your browser

Why mxcli?

Mendix projects are stored in binary .mpr files that AI agents can't read directly. mxcli bridges this gap by providing:

  • MDL (Mendix Definition Language) - A SQL-like syntax for querying and modifying Mendix models
  • Multi-tool support - Works with Claude Code, GitHub Copilot, OpenCode, Cursor, Continue.dev, Windsurf, Aider, and more
  • Full-text search - Search across all strings, messages, and source definitions
  • Code navigation - Find callers, callees, references, and impact analysis
  • Catalog queries - SQL-based querying of project metadata
  • Linting - Check projects for common issues
  • Unix pipe support - Output formats designed for scripting and chaining

What is mxcli?

Mxcli is a tool that enables some of the following use cases.

A textual DSL for mendix models

MDL, Mendix Definition Language, is a DSL that provides textual models at the same abstraction level as the visual models in Studio Pro.

Mxcli MDL

Command line tool to work with Mendix projects

Mxcli command line tool allows you to run commands against your project to investigate your project and make changes.

Mxcli

A REPL to work with Mendix projects

In repl mode mxcli allows you to interactively work with a Mendix project. This is similar to psql or sqlplus when working with databases. You can list the available Mendix documents, view the MDL source, and make changes.

Mxcli repl

Skills and configuration to enable Agentic Coding on Mendix projects

Running mxcli init will install configuration files for agentic coding tools like AGENTS.md, CLAUDE.md, and Mendix specific skills. It will also configure a devcontainer that you can use when opening the project in Vscode, so you limit what your agentic coder can impact and see.

Mxcli skills

This screenshot shows how Claude uses mxcli command to do agentic search on your Mendix project to understand what is available. It gets a list of pages that are in the specified module, it uses structure to get an overview of all the documents in the module, and then it describes the soure of a specifc page. Based on this info it can make a plan how to modify your project.

Mxcli claude

A set of extensible skills

The skills documents teach agentic coding tools how to build Mendix projects. You can add your own skills with design patterns and best practices. Using MDL you can be very specific how the agent should generate the required Mendix documents.

Mxcli skills

Metadata Catalog

Mxcli builds up a set of database tables with information about your project. This allows for flexible agentic search on your project documents.

Mxcli catalog

A Mendix project linter

The catalog tables are exposed as Starlark APIs so you can use the available data in custom Mendix linter rules.

Mxcli lint

VSCode for Mendix projects

The easiest way to use mxcli is in vscode. You can run Claude Code inside vscode, mxcli installs a Mendix vscode extension that helps you review and understand your Mendix project.

mxcli vscode claude code

The project structure shows you all modules with document, similar to the app explorer in Mendix Studio Pro. The VSCode extension also provides visualizations for some Mendix document types, ensuring you can review the generated documents without leaving VSCode.

mxcli vscode mendix extions

Run and test your Mendix projects

Claude code can start your Mendix project using PAD (portable application distribution). This will run the Mendix runtime in a docker container, and postgres in another docker container. This allows you to test your Mendix project without leaving vscode.

mxcli docker portable application distribution

Automated Playwright-cli testing for Mendix projects

The devcontainer is configured for use with playwright-cli so Claude Code can test your running application.

Data migration for Mendix projects

Claude code can migrate existing data, or generate demo data in the postgres container when you run your application.

Edit your Mendix Project in the browser with GitHub Codespaces

GitHub codespaces

Quick Start

The recommended way to use mxcli is inside a Dev Container. This sandboxes the AI agent so it can only access your project files, preventing unintended changes to your system. mxcli init sets up a .devcontainer/ configuration automatically.

# Initialize a Mendix project for your AI assistant
mxcli init /path/to/my-mendix-project

# Or specify your tool(s)
mxcli init --tool cursor /path/to/my-mendix-project
mxcli init --tool claude --tool cursor /path/to/my-mendix-project

# This creates:
#   AGENTS.md and .ai-context/ with universal skills
#   .devcontainer/ for sandboxed development
#   Tool-specific config files (.cursorrules, .continue/config.json, etc.)

# Open the project in VS Code / Cursor and reopen in Dev Container,
# then start your AI assistant:
claude  # or use Cursor, Continue.dev, etc.

Supported AI Tools

| Tool | Config File | Description | |------|------------|-------------| | Claude Code | .claude/, CLAUDE.md | Full integration with skills and commands | | OpenCode | .opencode/, opencode.json | Skills, commands, and lint rules | | Cursor | .cursorrules | Compact MDL reference and command guide | | Continue.dev | .continue/config.json | Custom commands and slash commands | | Windsurf | .windsurfrules | Codeium's AI with MDL rules | | Aider | .aider.conf.yml | Terminal-based AI pair programming | | Universal | AGENTS.md | Works with all tools |

# List supported tools
mxcli init --list-tools

# Add tool to existing project
mxcli add-tool cursor

Installation

Download the latest release for your platform from the releases page, or build from source:

git clone https://github.com/mendixlabs/mxcli.git
cd mxcli
make build
# Binary is at ./bin/mxcli

Core Features

Explore Project Structure

# List all modules
mxcli -p app.mpr -c "SHOW MODULES"

# List entities in a module
mxcli -p app.mpr -c "SHOW ENTITIES IN MyModule"

# Describe an entity, microflow, page, or workflow
mxcli describe -p app.mpr entity MyModule.Customer
mxcli describe -p app.mpr microflow MyModule.ProcessOrder
mxcli describe -p app.mpr page MyModule.CustomerOverview
mxcli describe -p app.mpr workflow MyModule.MyWorkflow

Full-Text Search

Search across validation messages, log messages, captions, labels, and MDL source:

# Search for validation-related content
mxcli search -p app.mpr "validation"

# Pipe-friendly output (type<TAB>name per line)
mxcli search -p app.mpr "error" -q --format names

# JSON output for processing with jq
mxcli search -p app.mpr "Customer" -q --format json

Pipe to describe:

# Describe the first matching microflow
mxcli search -p app.mpr "validation" -q --format names | head -1 | awk '{print $2}' | \
  xargs mxcli describe -p app.mpr microflow

# Process all matches
mxcli search -p app.mpr "error" -q --format names > results.txt
while IFS=$'\t' read -r type name; do
  mxcli describe -p app.mpr "$type" "$name"
done < results.txt

Code Navigation

# Find what calls a microflow
mxcli callers -p app.mpr MyModule.ProcessOrder
mxcli callers -p app.mpr MyModule.ProcessOrder --transitive

# Find what a microflow calls
mxcli callees -p app.mpr MyModule.ProcessOrder

# Find all references to an element
mxcli refs -p app.mpr MyModule.Customer

# Analyze impact of changing an element
mxcli impact -p app.mpr MyModule.Customer

# Assemble context for understanding code
mxcli context -p app.mpr MyModule.ProcessOrder --depth 3

Widget Discovery and Bulk Updates

EXPERIMENTAL: These commands are an untested proof-of-concept. Always use DRY RUN first and backup your project before applying changes.

Find and update widget properties across pages and snippets:

# Discover widgets by type
mxcli -p app.mpr -c "SHOW WIDGETS WHERE WidgetType LIKE '%combobox%'"

# Filter by module
mxcli -p app.mpr -c "SHOW WIDGETS IN MyModule"

# Preview changes (dry run)
mxcli -p app.mpr -c "UPDATE WIDGETS SET 'showLabel' = false WHERE WidgetType LIKE '%DataGrid%' DRY RUN"

# Apply changes
mxcli -p app.mpr -c "UPDATE WIDGETS SET 'showLabel' = false, 'labelWidth' = 4 WHERE WidgetType LIKE '%combobox%' IN MyModule"

Requires `REFRESH CATALOG F

View on GitHub
GitHub Stars58
CategoryDevelopment
Updated8h ago
Forks14

Languages

Go

Security Score

100/100

Audited on Apr 2, 2026

No findings