Command-line reference
The complete reference for the scriptweaver command — every flag and every
subcommand. For a gentle first run, see Install & run; for the
sealing/packaging workflow behind the build subcommands, see
Packaging apps.
Synopsis
scriptweaver [flags] [script.js | app.zip | project-dir]
scriptweaver <subcommand> ...
- With a script,
.zip, or project directory, the Player runs that app. - With no argument, it starts the interactive shell.
- With a subcommand (
pack,bake,sign,license-mint), it runs that build-time task headlessly and exits — no window.
Flags
| Flag | Effect |
|---|---|
--light |
Use the default light theme, cerculean (alias for --theme light). |
--dark |
Use the default dark theme, superhero — the default (alias for --theme dark). |
--theme <name> |
Start in a named theme: light/dark or any ttkbootstrap theme. |
--list-themes |
Print the available theme names and exit. |
--ui-scale <factor> |
Scale the whole UI by a density factor (default 1.0; <1 is denser, >1 is larger), applied on top of automatic DPI scaling. An end-user override of an app's own sw.app.uiScale — see Theming. |
--trace |
Print the underlying Tk commands to stderr — handy when debugging. |
--help, -h |
Open the help viewer (these docs). Pass a .zip or project directory to view that app's bundled help instead. |
scriptweaver --theme cosmo myapp.js
scriptweaver --ui-scale 0.85 myapp.js # denser UI — more content per screen
scriptweaver --list-themes
scriptweaver --help myapp.zip # preview an app's bundled help/
Environment variables
Two environment variables configure the Player itself at launch:
| Variable | Effect |
|---|---|
SCRIPTWEAVER_THEME |
A standing default theme — the environment-variable form of --theme, used when no --theme/--dark/--light flag is given (a flag wins for that launch). Takes the same theme names and is validated the same way (an unknown name errors), and it also sets the follow-system darkness preference. See Theming. |
SCRIPTWEAVER_DEBUG |
host:port the Player dials back to on startup to attach its JavaScript debugger, pausing at entry so the editor can set breakpoints first. Normally set for you by the VS Code / VSCodium adapter — you rarely set it by hand. See Debugging. |
Individual apps may read their own environment variables too (for example the
bundled todo and preferences
demos honour $SW_TODO_FILE / $SW_PREFS_FILE); those are app conventions, not
Player features.
The interactive shell (REPL)
Start the Player with no file and no subcommand and you get an interactive JavaScript shell plus an empty window — the quickest way to explore the widget API live:
scriptweaver
See Install & run for an example session.
Build & distribution subcommands
These run headlessly and exit. They're how you turn an app into something you can hand to someone else — a compiled bundle or a standalone executable. See Packaging apps for the full workflow.
| Subcommand | Synopsis | What it does |
|---|---|---|
pack |
pack <dir> [-o out.swx] [--seal-all] |
Compile an app directory to a sealed bytecode .swx bundle (compiled, not human-readable — not encryption). |
bake |
bake <app.swx|dir> [-o out] |
Staple a .swx (or a packed directory) onto a copy of the Player to produce a standalone executable. |
sign |
sign <artifact> --key <privkey> [--signer name] [-o out] |
Append an ed25519 signature to a .swx or baked exe. ScriptWeaver's own signing tool — verification is advisory (an honesty signal, never a lock). |
license-mint |
license-mint --key <privkey> --subject <s> [--product p] [--note n] [--entitled-through YYYY-MM-DD] [--seats n] [-o token] |
Mint a signed license token. Advisory metadata only — the Player never gates on it. |
scriptweaver pack ./myapp -o myapp.swx
scriptweaver bake myapp.swx -o myapp # → ./myapp (or myapp.exe on Windows)
Sealing is compiled, not encrypted — there is no DRM, phone-home, or telemetry. It makes the honest path the easy one; it isn't a cage.
See also
- Install & run — get the Player and run your first app
- Packaging apps —
.zipbundles,.swx, standalone exes - Debugging — breakpoints and stepping from VS Code / VSCodium
- Theming — the theme names
--themeaccepts