ScriptWeaver Documentation
ScriptWeaver lets you build native desktop apps in plain JavaScript — no web browser, no heavy runtime. You write standard JS, lay out real native widgets, and ship a tiny cross-platform bundle that runs on the free Player.
New here? Start with the Hello, World tutorial.
Getting started
- Introduction — what ScriptWeaver is and how the pieces fit
- Install & run — get the Player; run a script or a
.zipapp - Command-line reference — every flag and the
pack/bakesubcommands - Tutorial: Hello, World — a clickable button in 60 seconds
Guides
- Widget basics — creating widgets, options-as-properties, the common methods
- Layout —
pack,grid,place, and theFlex/Gridhelpers - Docking — a dockable-panel workbench: split / tab / float / redock panels and save the layout
- Drag & drop — draggable widgets, drag-and-drop payloads, and reorderable lists
- High-DPI & scaling — resolution independence across platforms; when fixed-pixel sizes need scaling
- Accessibility —
accessibleLabel, roles,app.announce(); the native screen-reader story - Events & binding —
onClick,.bind(), keyboard and mouse events - Variables & reactivity —
StringVar/IntVar/ … two-way binding - Dialogs — native message boxes and file pickers (
sw.dialog) - System & files —
sw.sys,sw.fs,sw.app - Theming —
app.setTheme(), semantic colours viabootstyle, the palette - Icons — 116 bundled Feather icons via
sw.icons - Packaging apps — bundle your app as a
.zip - Debugging — breakpoints, stepping and inspection from VS Code / VSCodium
- MarkView: in-app Markdown — render Markdown help inside your app
Widget reference
- Buttons — Button · CheckButton · RadioButton · ToggleSwitch
- Inputs — Entry · Combobox · Spinbox · Scale · DateEntry · TimePicker · AutocompleteEntry · TagEntry
- Containers — Frame · TkFrame · LabelFrame · Card · CollapsingFrame · ScrolledFrame · Sidebar · Notebook · PanedWindow · DockManager · TopLevel
- Display — Label · Badge · Message · Listbox · Treeview · Tableview · Text · ScrolledText · Notepad · Progressbar · Meter · Floodgauge · WebView (experimental)
- Drawing — Canvas — vector scene graph (tkpath)
- Menus & images — Menu · MenuButton · Photo
- Scrolling & decoration — Scrollbar · Separator · Sizegrip · StatusBar
Reactive variables (StringVar, IntVar, BoolVar, DoubleVar) are covered in
the Variables & reactivity guide.
The standard controls — Button, Entry, Scale, and friends — are the
themed (ttk / ttkBootstrap) widgets, styled to match the active theme. The
redundant classic Tk twins were retired for a coherent look; their raw Tk
commands remain reachable via __native_tcl. One classic survives as a named
widget — TkFrame, whose direct background / relief has no themed
equivalent (Frame is the themed frame). The widgets with no themed twin —
Text, Listbox, Canvas, Menu, Message — keep their plain names too.
ScriptWeaver bundles the Bootstrap-flavoured ttkbootstrap theme family — 17 light and dark themes, switchable at runtime with
app.setTheme(). The themed widgets are the default; the few classic Tk widgets (prefixedTk, e.g.TkFrame) keep their native platform look.
System API
The sw.* system namespace is covered in the guides:
- System & files —
sw.fs(files),sw.sys(processes, paths, environment),sw.app - Dialogs —
sw.dialog(message boxes and file / directory / colour pickers) - Reflection —
sw.reflect(introspect widgets, options and commands; intended for tool authors)
Data
- SQLite — an embedded SQL database via
new Database(path); the API mirrors better-sqlite3
Examples
Annotated walk-throughs of the bundled demos: a notes editor, a file browser, a todo list, a preferences dialog, and a Markdown help viewer.