Table of Contents
Live mode: an AI assistant working in the open project
Normally an AI assistant connected through the MCP server
works on files: it reads a .qet, tests changes on copies, and never touches
the drawing you have open. Live mode adds a second way of working: the
assistant on one screen, QElectroTech on the other, and each thing it does
happens in front of you, in the project you have open — where you can watch
it, refuse it, undo it, or carry on by hand.
Status: merged on 2 October 2026. Everything on this page is in development builds made since then; it is not in a release yet. The pull requests:
PR What it adds Builds on #1222 the setting, the startup warning, the status-bar indicator, running scripts live #1221 (script buttons) #1223 the Assistant panel, ask-first, the allowed commands, the screenshot #1222 #1225 the qet_live_*MCP tools#1224 The proposal is discussion #1226.
Menu and option names are given in French, as QElectroTech shows them until the translations are updated, with an English gloss in italics.
The two ways an assistant works
| Headless (the usual way) | Live | |
|---|---|---|
| works on | .qet files and copies of them |
the project open in your QElectroTech |
| QElectroTech running? | no — started in the background for each call | yes, your own window |
| MCP tools | qet_*, qet_script_* |
qet_live_* only |
| what you must switch on | QET_ENABLE_SCRIPTING=1 |
that, and the live setting, and the warning at this start |
| undo | nothing of yours changed | one Ctrl+Z per assistant action |
A script tested headless runs the same way live; only where it runs changes. The tools are kept apart so one can never be taken for the other.
Switching it on: three switches
-
The MCP server is started with
QET_ENABLE_SCRIPTING=1, as for the editing tools (see Scripting gate). -
The setting. In Configurer QElectroTech > Général (Settings > General): Autoriser un assistant IA à agir sur le projet ouvert (mode direct) (Allow an AI assistant to act on the open project (live mode)). Off by default. It takes effect at the next start; unticking it cuts the connection at once.
-
The warning, at every start. While the setting is on, each time QElectroTech starts it shows, before anything can connect:
Le mode direct est activé : un assistant IA connecté pourra exécuter des scripts sur le projet ouvert. Chaque action s'annule d'un Ctrl+Z, et le bouton « Arrêter » de la barre d'état coupe la connexion.
(Live mode is on: a connected AI assistant will be able to run scripts on the open project. Each action is undone with Ctrl+Z, and the "Stop" button on the status bar cuts the connection.)
Button Does Continuer (Continue) opens the connection for this session Pas pour cette session (Not this session) stays closed until the next start Désactiver (Turn off) stays closed and turns the setting off So a setting you forgot about can never leave the door open silently.
With the setting off, QElectroTech opens nothing at all and behaves exactly as
it does without this feature; the qet_live_* tools answer that live mode is
off and do nothing. When they cannot connect, they say which of the three
switches is missing.
While the assistant is connected
The status bar
Shows Mode direct : en attente d'un assistant (Live mode: waiting for an assistant) or Mode direct : assistant connecté (assistant connected), then the last thing it did, with ✓ or ✗ and the time. Hover it for the error, if there was one.
Arrêter (Stop) beside it cuts the connection for the rest of the session.
The Assistant panel
A panel called Assistant opens on the right while live mode is open. It lists every action, newest first: the time, ✓ or ✗, and its undo step's name. Hover an entry, or double-click it, for the details: the error, what the script logged, and the script itself.
At the top: Demander avant d'exécuter un script écrit par l'assistant (Ask before running a script the assistant wrote), ticked at every start. While it is ticked, a script the assistant wrote on the spot is shown to you first, in a box titled L'assistant veut exécuter un script (The assistant wants to run a script):
| Button | Does |
|---|---|
| Exécuter (Run) | runs it |
| Refuser (Refuse) | nothing happens; the assistant is told you refused |
| Toujours pour cette session (Always this session) | runs it and stops asking until the next start |
Stored scripts — the script buttons you already have — run without asking: you put them there.
Undo
Each assistant action is one undo step, named Assistant : <what it did>, in the same undo history as your own work. Ctrl+Z takes it back.
The assistant can undo too (qet_live_undo_last), but only its own last
step. If the newest step is something you did, it is refused: what you do by
hand stays yours to undo.
What the assistant can do
| Tool | Does | Needs QET_ENABLE_SCRIPTING=1 |
|---|---|---|
qet_live_status |
is QElectroTech there and live mode open; the project and sheet on screen, how many sheets, what is selected, the last undo step; the stored scripts; whether a macro recording is under way | no |
qet_live_run_script |
runs script text on the open project (asks you first, see above); returns what it logged, its error, and the undo step's name | yes |
qet_live_run_stored |
presses one of your stored script buttons, by its id | yes |
qet_live_command |
runs one editor command from a fixed list (below) | no |
qet_live_show_folio |
shows another sheet of the open project | no |
qet_live_undo_last |
undoes the newest step, only if it was the assistant's | no |
qet_live_screenshot |
an image of the sheet on screen, so the assistant sees what you see | no |
The commands it may use
Only commands that open no window, so nothing can end up waiting for an answer nobody gives. Everything else — saving, deleting, exporting, printing — is refused; for edits it runs a script, which you can undo.
Command id (diagrameditor.…) |
|
|---|---|
select_all, select_nothing, select_invert, select_all_conductors, select_all_text_fields |
selection |
zoom_in, zoom_out, zoom_content, zoom_fit, zoom_reset |
view |
rotate_selection, rotate_texts, snap_selection_to_grid |
arrange |
group_selection, ungroup_selection |
groups |
conductor_reset |
redraw the selected wires' path |
What it cannot do
- Click on the screen. Clicking at coordinates breaks at every layout change and can be steered by anything drawn on a sheet. The assistant acts only through the same calls a script button uses.
- Open a dialog.
qet.showMessage()in a live script goes to the log instead of opening a box. - Run two things at once. One request at a time; a second one meanwhile is answered "busy". A script still stops after 30 seconds.
- Reach you over the network. The connection is a local socket (a named pipe on Windows), on your own machine only.
How the assistant finds QElectroTech
When you press Continuer, QElectroTech adds the connection's name and a
random token to qet-assistant.json (see
script buttons), readable only by you, and
removes them on Arrêter or when it closes. The MCP server reads them from
there; a connection without the token is closed.
The token keeps out other users of the computer and stale connections. A program already running as you could read your projects anyway, which is why what you can see — the indicator, the panel, ask-first, undo — matters more than the token.
The risk, stated plainly
Live mode is the one place an assistant changes the project you have open. The risk it adds: text inside a project you received (a label, a note, a title-block field) could try to steer the assistant into editing your drawing. The answers are ask-first for anything the assistant writes itself, the log, and one Ctrl+Z per action. If you do not need it, leave the setting off.
A session, start to finish
- Tick the live setting, restart QElectroTech, press Continuer. The status bar says en attente d'un assistant; the Assistant panel opens.
- Open your project. In the assistant's chat: "number the wires on the sheet I'm looking at, starting at 100".
- The assistant calls
qet_live_status, sees the project and sheet, and may take aqet_live_screenshot. - It writes a script and sends it with
qet_live_run_script. The ask-first box shows it; you press Exécuter. - The wires are numbered; the panel shows Assistant : … with ✓. Not what you wanted? Ctrl+Z.
- Arrêter when you are done.
Limitations
- macOS has not been tested. Linux, and a Windows build under Wine with a Windows-side client, have.
- No questions back. A live script cannot ask you for a value; the assistant asks in its chat instead.
See also
- Script buttons — the stored scripts live mode can press
- Macro recorder — show the assistant a task instead of describing it
- MCP server and Connecting an AI assistant
- JavaScript Scripting — what a script can do
- Discussion #1226 — the proposal
Getting Started
🌐 Languages — English · Français · Deutsch
Windows without admin rights — the portable archive, no installer
Guides
Conductors — wire properties, what feeds which export, cables, and hops where wires cross
Wires per terminal — limit the wires on a terminal, list the crowded ones (partly pending)
Printing and exporting — paper, PDF, images, and what each path does differently
Linking elements — master, slave, terminal
PLC modules — I/O tables and linking a wire to a specific point
Using the element editor — drawing tools, saving, checks
Grid size and element size — why symbols aren't all the same scale
Preferences reference — what each settings page does
Keyboard-only control — mouseless QET, and what still needs a mouse
Mouse modifiers — what Shift, Ctrl and Alt change while you drag
3D mouse — SpaceMouse pan, zoom and buttons
Aligning items — snap symbols back to the grid, or line them up
Pictures on a sheet — labels, crop, transparency, what they cost in the file
Arcs and curved wires — the Arc tool, pulling an arc in or out, rounding a corner with a fillet, dashed arcs for lighting layouts
Grouping items — select, move and copy several items as one
Finding your place on a sheet — go to a cell like B13 or 4-B7, keep the headers in sight, show the cell limits, zoom and pan
Drawing faster — place without dragging, the S shortcut bar, command search, gestures
Managing collections — folders, writability, building your own shortlist
Templates — reusable multi-element blocks, and why clicking one does nothing
Search & Replace — bulk property changes
Building a nomenclature query — the BOM/summary table builder
Linking wires across pages — sheet reports
Variables & formulas — %f, %{label}, sequences
Auto-numbering — schemes, sequences, freezing
Terminal strips — strips, levels, bridges
Title block templates — the .titleblock format
Importing EPLAN parts (.edz) — EPLAN Data Portal
DXF import & export — two unrelated features, one format; command-line export and layers
The project database — the in-memory SQLite cache
Development
Automating QET — CLI, XML formats, external tools
CLI Reference — command line usage
JavaScript Scripting — --run, geometry editing, undo
MCP server — let an AI assistant read, verify and edit projects
Connecting an AI assistant — setup for Claude, Copilot, Gemini, Codex, Cursor, LM Studio
Script buttons — stored scripts with an icon, by hand or by an assistant
Live mode — an assistant working in the open project while you watch
Macro recorder — record a task by hand, for an assistant to script
Vision — proposal, under discussion



