Use annotated JavaScript scene files with __verb__, __section__, __doc__, and the dynamic `loupedeck verbs ...` command tree.
Loupedeck scene scripts can now be authored in two distinct styles:
loupedeck run <file.js>loupedeck verbs ...That split is intentional.
run is the plain-file runner.verbs is the annotated-scene runner.doc remains the extraction/export surface.Use run for ordinary scene files:
loupedeck run ./examples/js/01-hello.js --duration 5s
Use verbs when the script declares explicit jsverbs metadata:
loupedeck verbs documented configure OPS --theme light --duration 5s
The old transitional run --verb / verbs list / verbs help flow has been removed. Annotated commands now live directly in the command tree.
__package__({ name: "documented" });
__section__("display", {
fields: {
theme: { type: "choice", choices: ["dark", "light"], default: "dark" }
}
});
__doc__("configureScene", {
summary: "Configure the scene"
});
function configureScene(title, display, meta) {
const ui = require("loupedeck/ui");
ui.page("home", page => {
page.tile(0, 0, tile => tile.text(title));
});
ui.show("home");
return { title, theme: display.theme, rootDir: meta.rootDir };
}
__verb__("configureScene", {
name: "configure",
parents: ["documented"],
sections: ["display"],
fields: {
title: { argument: true },
display: { bind: "display" },
meta: { bind: "context" }
}
});
doc`---
symbol: configureScene
---
Long-form prose for the scene.`;
Important details:
__verb__ takes a string function name, not an identifier reference.run remains filename-oriented and is not the annotated-scene UX.The verbs tree is built from repositories discovered before command registration.
Loupedeck always includes one embedded built-in repository. That means the documented example command is always available:
loupedeck verbs documented configure OPS
You can add more repositories in three ways:
Supported app-config locations come from the standard Glazed config-plan app config sources:
/etc/loupedeck/config.yaml$XDG_CONFIG_HOME/loupedeck/config.yaml~/.loupedeck/config.yamlRepository config shape:
verbs:
repositories:
- name: team-scenes
path: ~/code/acme/loupedeck-scenes
- name: local-scenes
path: ~/.loupedeck/verbs
export LOUPEDECK_VERB_REPOSITORIES=/path/to/repo-a:/path/to/repo-b
loupedeck --verbs-repository ./examples/js --verbs-repository ~/.loupedeck/verbs verbs documented configure OPS
Repository precedence is:
LOUPEDECK_VERB_REPOSITORIES--verbs-repositoryDuplicate repository paths are deduped. Duplicate full jsverb command paths across repositories are a hard startup error.
Once a repository is loaded, explicit verbs appear as normal nested commands:
loupedeck verbs documented configure OPS --theme light --refreshRate 60 --duration 5s
The generated command help comes from jsverbs metadata, while the session/device flags come from loupedeck. Runtime commands now default to --duration 0s, meaning they keep running until interrupted unless you opt into a timeout:
title, theme, and refreshRate--device, --duration, --flush-interval, and --queue-sizeInspect help directly on the generated command:
loupedeck verbs documented configure --help
Documentation extraction remains file-oriented:
loupedeck doc --script ./examples/js/12-documented-scene.js --format json
or Markdown:
loupedeck doc --script ./examples/js/12-documented-scene.js --format markdown
See:
examples/js/12-documented-scene.jsThat file is the canonical loupedeck example for:
__package____section____verb____doc__doc\...``