Dev tools & Ecosystem
Everything here comes built into Kreft v2.4. Zero external plugins required.
Hot reload (State-Preserving HMR)
While npm run dev runs, save a .kreft file and only that component is swapped on the page. Its state stays intact. Try it: count up, then change this file's text and save.
A .css file reloads its styles only; other files reload the page. Mistakes show in an interactive overlay on the page.
Kreft DevTools & Interactive Error Monitor
The K button (or Alt+Shift+D) opens a panel with the component tree, props, state, derived values, stores, current route, and a timeline of store actions and bus messages.
Security-Hardened Package Manager (kreft add)
Sandboxes lifecycle scripts (--ignore-scripts), blocks typosquatting, checks package age on the npm registry, and warns when a capability is already built into Kreft.
kreft add dayjs nanoid # installs with exact version lock & script sandboxing kreft add --dry-run lodash # inspect security & redundancy report without installing kreft update --check # check outdated packages & refresh embedded kreftjs.js
Auto Garbage Collector & Memory Watchdog
Keeps long-running Node.js servers at a lean 40–60 MB footprint by pruning stale caches and triggering V8 major GC cycles when heap usage crosses your threshold.
kreft dev --gc # enable V8 --expose-gc & memory watchdog in dev AUTO_GC=1 kreft serve dist # enable in production (default threshold: 250 MB)
Desktop Apps (Electron) & Vite Bundling
kreft electron:init && kreft electron:dev # run your .kreft app as a native desktop window kreft electron:build # package .dmg, .exe, and .AppImage installers npm run electron:build:mac | :win | :linux | :all # one system, or all ELECTRON_MENU=hide kreft electron # show | auto | hide the window menu # app icon: build/icon.png (square PNG, 512x512 or bigger) kreft vite:init && kreft vite:dev # optional Vite HMR + Rollup build pipeline
In your editor & When you ship
kreft vscodeadds syntax highlighting, folding and snippets for.kreftfiles to VS Code, Cursor and VSCodium.kreftjs.d.tsandserver.d.tsprovide full TypeScript and IntelliSense definitions.
kreft build # .kreft files compiled ahead of time, works under strict CSP kreft build --prerender # prerenders every route as static HTML for SEO