mxgpt
v0.1.1
Published
Ask technical questions about your Mendix project in a local AI chat. Uses your own AI (Claude / Codex / API key) + mxcli to analyze the model.
Downloads
287
Maintainers
Readme
mxgpt — by Orangeleaf Consulting
Ask technical questions about your Mendix project in a local AI chat.
npx mxgptRun it from your Mendix project folder. mxgpt opens a chat web app in your browser where you can ask things like:
"In this project, can a Mechanic belong to more than one Workshop?" "Which microflows have the most activities?" "What associations does the Customer entity have?"
It answers by inspecting your model with mxcli
and reasoning with your own AI — no project data leaves your machine unless
you choose an API provider.
🪵 Logs tab
A Logs tab in the web app shows exactly what's happening behind the scenes —
the AI provider being used, each mxcli command run, its output, and any errors.
If an answer ever looks empty or stuck, the Logs tab tells you why.
📊 Live diagrams
When an answer describes something structural or procedural, mxgpt renders it as a Mermaid diagram right inside the chat — entity associations & cardinality (ER diagrams), microflow/algorithm flowcharts, state machines, and sequence diagrams. Click ⤢ Expand to enlarge, or </> Source to see the diagram code. Mermaid is served from your local install, so diagrams work fully offline.
How it works
┌────────────┐ asks ┌──────────────┐ runs ┌────────┐ reads ┌────────┐
│ Chat UI │ ───────▶ │ mxgpt server │ ───────▶ │ AI │ ───────▶ │ mxcli │ ─▶ .mpr
│ (browser) │ ◀─────── │ (local) │ ◀─────── │ brain │ ◀─────── │ │
└────────────┘ streams └──────────────┘ answers └────────┘ model └────────┘mxgpt is a thin local web UI in front of your AI. It picks a "brain" in this priority order:
- Claude Code CLI (
claude) — uses your existing Claude login, no API key. - Codex CLI (
codex) — uses your existing Codex login. - Anthropic API key — entered during setup.
- OpenAI API key — entered during setup.
With the agentic CLIs (Claude / Codex), the AI runs mxcli itself to explore
the model. With an API key, mxgpt runs a guarded read-only mxcli tool-loop
on the AI's behalf.
Prerequisites
- Node.js 18+
- mxcli on your
PATH - At least one AI provider: the Claude Code CLI, the Codex CLI, or an Anthropic / OpenAI API key.
Usage
npx mxgpt # start the chat app (runs setup on first use)
npx mxgpt setup # reconfigure provider / API key / port
npx mxgpt doctor # show detected mxcli, project file and providers
npx mxgpt --helpOptions:
| Option | Description |
| ------------------- | ------------------------------------------------------ |
| --port <n> | Port for the local web app (default 4477) |
| --provider <id> | claude | codex | anthropic-api | openai-api |
| --no-open | Don't auto-open the browser |
Configuration
mxgpt reads config from (highest priority last):
~/.mxgpt.json— home config (API keys live here, never in your project)./.mxgpt.json— per-project config (provider, port, project file)- Environment variables:
ANTHROPIC_API_KEY,OPENAI_API_KEY,MXGPT_PORT,MXGPT_PROVIDER
Example ./.mxgpt.json:
{
"provider": "claude",
"port": 4477,
"projectFile": "MyApp.mpr"
}The setup wizard adds
.mxgpt.jsonto your project. If you don't pin aprojectFile, mxgpt auto-discovers the.mprin the current folder.
Safety
- Only read-only mxcli commands are allowed when mxgpt drives mxcli itself
(API-key mode). Write commands (
create/update/delete/execute…) are refused. - Claude Code is restricted to
Bash(mxcli:*); Codex runs in aread-onlysandbox. - The web app binds to
127.0.0.1only.
Development
npm install
npm run build # bundle to dist/ with tsup
npm run typecheck
node dist/cli.js doctorLicense
MIT
