The flua VS Code extension

Everything flua does on the command line now has a home in the editor: install flua from the VS Code marketplace (GsonSoft-development.flua) and the explorer grows a flua menu — pack a QA into a .fqa, unpack one into a project, upload files or whole QAs to the HC3, scaffold from the 30 type templates, run Setup, and register the flua-mcp server with Copilot. Saving a .lua file runs flua --check into the Problems panel. And .fqa packages stop being raw JSON: they open in a viewer with the package's name, type, interfaces, variables, and a syntax-highlighted preview per file.

Underneath, the extension only shells out to the flua executable — it auto-detects your workspace's .venv/bin/flua (or takes the flua.executable setting). So everything in this post also works from the terminal; that is where the naming story starts.

Packages named after the QA, not the file

--tool pack and flua export now name the output after the QA's --%%name — MyQA.fqa when there is no name — instead of blindly copying the file name. A QA called "Hall lamp" packs like this:

-- hall.lua
--%%name:Hall lamp
--%%file:lib.lua,lib
print(LIB)
# lib.lua
LIB = "ok"
.venv/bin/flua --tool pack hall.lua
# packed Hall lamp (2 files) to Hall_lamp.fqa

Unpacking keeps the naming symmetric

Downloaded QAs were always named <QA>_<file>_<id>.lua so several QAs can share a directory and the HC3 id rides along. Plain unpacking now follows the same pattern, minus the id:

.venv/bin/flua --tool unpack Hall_lamp.fqa -d project
# unpacked to project/ (main: project/Hall_lamp_main.lua)

ls project/
# Hall_lamp_lib.lua   Hall_lamp_main.lua

The unpacked project runs like any other — the generated header points --%%file at the renamed files, so nothing needs fixing:

.venv/bin/flua project/Hall_lamp_main.lua
# [Hall lamp5000]: ok

In the editor, the same tools hang off the explorer's flua submenu: right-click hall.lua → Pack QA into .fqa; right-click the .fqa → Unpack into project or Upload as new QA. The .fqa viewer shows the metadata block — name, type, interfaces, the variables, one line each — and every file's Lua preview. The identity properties you declare (--%%manufacturer, --%%model, --%%build, --%%uid, deviceRole) now travel in packages, so a round-trip pack → upload → download keeps them.

Next time: your QuickApp gets a test suite — flua test runs *_test.lua files with timeouts and a PASS/FAIL report.

Extension: GsonSoft-development.flua on the marketplace · vscode/README.md · pip: fibaro-flua 0.1.83 · flua: https://github.com/jangabrielsson/flua