.vak is a beginner-first language with multiple runtime targets:
python(default)js(Node.js)electron(desktop app runtime)
Quick docs:
vak-core/docs/AI_EXPERT_GUIDE.md- full maintainer-level handoff for AI and humansvak-core/docs/PHRASES.md- phrase catalogvak-core/docs/JS_ELECTRON_TARGET.md- JS + Electron architecture/securityvak-core/docs/VAK_LANGUAGE_GROWTH_IDEAS.md- prioritized roadmap for expanding VAKvak-core/docs/PROJECT_STRUCTURE.md- organizedvak-corefile mapvak-core/docs/AI_SYSTEM_PROMPT.md- copy/paste AI system prompt
vak.py- root compatibility launcher (callsvak-core/vak.py)vak-core/vak.py- main CLI entrypoint (run,transpile,init)vak-core/vak_runtime/engine.py- runtime facadevak-core/vak_runtime/compiler/- transpiler core (python,js,electron)vak-core/vak_runtime/js_target.py- JS/Electron build + run integrationvak-core/vak.spec- PyInstaller spec for Windows buildvak-core/installer/- Windows installer scripts/assetsvak-core/vak_js_runtime/- Node.js runtime helpers for JS targetvak-core/vak_runtime/runtime_env.py- runtime environment + module import bridgevak-core/vak_runtime/modules/- phrase function packsvak-core/vak_runtime/ui.py- desktop UI engine (windows, canvas, shell, timers, sprites)vak-core/templates/electron/- generated Electron app templatevak-core/vak-console-extension/- editor syntax + diagnosticsvak-core/examples/- ready-to-run.vakprogramsvak-core/docs/- architecture and phrase documentationworkspace/- generated build artifacts and temporary outputs
python vak.py vak-core\examples\hello.vak
python vak.py vak-core\examples\snake.vak --check
python vak.py vak-core\examples\snake.vak --show-pythonpython vak.py run vak-core\examples\hello.vak --target python
python vak.py run vak-core\examples\include_app\main.vak --target python
python vak.py run vak-core\examples\template_fill_demo.vak --target python
python vak.py run vak-core\examples\state_persistence_demo.vak --target python
python vak.py run vak-core\examples\task_background_demo.vak --target python
python vak.py run vak-core\examples\cpp_style.vak --target js
python vak.py run vak-core\examples\task_background_demo.vak --target js
python vak.py run vak-core\examples\electron_counter.vak --target electron
python vak.py run vak-core\examples\electron_app_controls_demo.vak --target electron
python vak.py run vak-core\examples\electron_full_demo.vak --target electron
python vak.py run vak-core\examples\vakterm.vak --target electron
python vak.py run vak-core\examples\electron_file_viewer\file_viewer.vak --target electronpython vak.py run vak-core\examples\snake.vak --check --target python
python vak.py run vak-core\examples\data_web_file.vak --check --target js
python vak.py run vak-core\examples\electron_canvas_demo.vak --check --target electron
python vak.py run vak-core\examples\electron_app_controls_demo.vak --check --target js --capabilities
python vak.py run vak-core\examples\electron_app_controls_demo.vak --check --target electron --capabilitiesCapability preflight notes:
--capabilitiesis only valid with--check.- It reports phrase starters that are unsupported for the selected target and exits with
VAK-CAP-001when mismatches are found.
python vak.py run vak-core\examples\snake.vak --show-python --target python
python vak.py run vak-core\examples\cpp_style.vak --show-js --target js
python vak.py run vak-core\examples\electron_counter.vak --show-js --target electronpython vak.py transpile vak-core\examples\hello.vak --target python --out build\hello.py
python vak.py transpile vak-core\examples\cpp_style.vak --target js --out build\cpp_style.mjspython vak.py init electron my_vak_app
python vak.py init electron my_vak_app --dir C:\projectspython vak.py build vak-core\examples\electron_full_demo.vak --target electron --platform win
python vak.py build vak-core\examples\electron_full_demo.vak --target electron --platform linux
python vak.py build vak-core\examples\electron_full_demo.vak --target electron --platform macBuild output is written under:
workspace\.vak-build\<program>\electron\dist\
python vak.py run vak-core\examples\snake.vak --explain-line 12 --target pythonCanvasShelf- canvas drawing/events/timers/game loopSpriteShelf- image sprites and frame animationSoundShelf- sound playback/beeps (Windows)TutorShelf- line explanations and hint utilitiesCppShelf,DataShelf,FileShelf,MathShelf,SystemShelf,NetShelf,UiShelf
contextIsolation: truenodeIntegration: falsesandbox: true- preload bridge only (
window.vakBridge) run commanddisabled by default invak.config.json- file operations restricted to
fsRoot(default".") - renderer crash/runtime problems are reported with VAK line + snippet context
- Electron apps run on HTML/CSS/JS under the hood.
- VAK drives UI through phrase APIs (windows/controls/canvas/shell/sprites/sound/html blocks).
- HTML support is phrase-based via:
add html ... to <window> as <control>set html of <control> to ...load html file ... into <window> as <control>
- For a single-file Electron app, prefer inline HTML with:
remember panel_html as "<div>...</div>"add html panel_html to app as panel
vak-core/examples/vakterm.vaknow uses this one-file pattern (no external dashboard HTML file required).- Injected HTML is sanitized in renderer (scripts and inline JS handlers are removed).
- Companion asset files (
assets/,.html, images, sounds) next to a.vakfile are copied into generated Electron projects automatically.
Errors now provide:
- what went wrong
- where (line + source snippet)
- likely cause
- concrete fix
- extra tutor hint
- phrase-parser suggestions for unknown statements (closest valid phrase starters)
- clearer block-order diagnostics (
otherwise/if it fails asplacement) - clearer indentation diagnostics (tabs vs 2-space steps)
- Source composition:
include "path/to/file.vak" - Package phrase stub (friendly guidance):
bring package "name" - Main auto-discovery: exactly one top-level
to main with:auto-runs - Multiline templates:
remember dashboard_html as text block: ... finishedfill template dashboard_html with {"name": user_name}
- Error codes in friendly output (
VAK-*) and optional raw trace mode:python vak.py run <file.vak> --debug-errors
- Electron app controls:
set app icon to "assets/icon.png"set app menu to [...]open external url "https://..."show message box titled "..." as "..."
- State shortcuts:
save state app_state to "state.json"load state from "state.json" as app_stateremember settings as persistent notebook "settings.json"
- Task/background phrases:
run task fetch_news using url as news_taskwhen task news_task completes use handle_newscancel task news_task
Use the organizer script to keep root clean for contributors and users:
powershell -ExecutionPolicy Bypass -File vak-core\scripts\organize-explorer.ps1This moves legacy generated folders (.vak-build, build, dist, __pycache__) into:
workspace\legacy-artifacts\
vak-core/examples/electron_counter.vakvak-core/examples/electron_canvas_demo.vakvak-core/examples/electron_shell_demo.vakvak-core/examples/electron_full_demo.vakvak-core/examples/electron_html_demo.vakvak-core/examples/electron_app_controls_demo.vakvak-core/examples/vakterm.vak(single-file Electron terminal demo with inline HTML dashboard)vak-core/examples/electron_file_viewer/file_viewer.vak(single-file Electron file viewer app in its own example folder)
To use Vak like an installed language on Windows:
- Run
dist\VakSetup.exe(installsvak.exeruntime). - In the installer, optionally check:
Add Vak to PATHAssociate .vak files with Vak
- Install the VS Code extension separately from:
vak-core\vak-console-extension\vak-language-tools-0.1.2.vsix- VS Code -> Extensions ->
...->Install from VSIX...
Important: .vak is not auto-recognized by VS Code from the runtime installer alone.
Reason: VS Code language support is provided by a VS Code extension (.vsix), which is managed separately from system/runtime installers for security and per-user profile isolation.