···255255256256## Parking Lot
257257258258+### IIFE Build Support
259259+260260+Provide an IIFE (Immediately Invoked Function Expression) build target for VoltX.js to support direct `<script>` tag usage without module systems.
261261+262262+**Deliverables:**
263263+264264+- IIFE build output (voltx.iife.js) alongside ESM build
265265+- Global `Volt` namespace for browser environments
266266+- CDN-friendly distribution (unpkg, jsdelivr)
267267+- Update build pipeline to generate IIFE bundle
268268+- Document usage: `<script src="voltx.iife.min.js"></script>`
269269+- Ensure plugins work with IIFE build
270270+- Add IIFE examples to documentation
271271+258272### Evaluator & Binder Hardening
259273260274All expression evaluation now flows through a cached `new Function` compiler guarded by a hardened scope proxy, with the binder slimmed into a directive registry so plugins self-register while tests verify the sandboxed error surfaces.
+83
cli/README.md
···11+# create-voltx
22+33+CLI for creating and managing VoltX.js applications.
44+55+## Usage
66+77+### Create a New Project
88+99+```bash
1010+# Using pnpm (recommended)
1111+pnpm create voltx my-app
1212+1313+# Using npm
1414+npm create voltx@latest my-app
1515+1616+# Using npx
1717+npx create-voltx my-app
1818+```
1919+2020+### Commands
2121+2222+#### `init [project-name]`
2323+2424+Create a new VoltX.js project with interactive template selection.
2525+2626+```bash
2727+voltx init my-app
2828+```
2929+3030+**Templates:**
3131+3232+- **Minimal** - Basic VoltX.js app with counter
3333+- **With Router** - Multi-page app with routing
3434+- **With Plugins** - All plugins demo
3535+- **Styles Only** - Just HTML + CSS, no framework
3636+3737+#### `dev`
3838+3939+Start Vite development server.
4040+4141+```bash
4242+voltx dev [--port 3000] [--open]
4343+```
4444+4545+#### `build`
4646+4747+Build project for production.
4848+4949+```bash
5050+voltx build [--out dist]
5151+```
5252+5353+#### `download`
5454+5555+Download VoltX.js assets from CDN.
5656+5757+```bash
5858+voltx download [--version latest] [--output .]
5959+```
6060+6161+## Documentation
6262+6363+See the [CLI Guide](https://stormlightlabs.github.io/volt/cli) for complete documentation.
6464+6565+## Development
6666+6767+```bash
6868+# Install dependencies
6969+pnpm install
7070+7171+# Build CLI
7272+pnpm build
7373+7474+# Run tests
7575+pnpm test
7676+7777+# Type check
7878+pnpm typecheck
7979+```
8080+8181+## License
8282+8383+MIT
···11+# CLI
22+33+The VoltX.js CLI provides tools for creating and managing VoltX.js applications. Use it to scaffold new projects, run development servers, build for production, and download framework assets.
44+55+## Installation
66+77+The CLI is available as `create-voltx` on npm:
88+99+```bash
1010+# Use with pnpm (recommended)
1111+pnpm create voltx my-app
1212+1313+# Use with npm
1414+npm create voltx@latest my-app
1515+1616+# Use with npx
1717+npx create-voltx my-app
1818+```
1919+2020+For ongoing development commands, install the CLI in your project:
2121+2222+```bash
2323+pnpm add -D create-voltx
2424+```
2525+2626+## Commands
2727+2828+### `init`
2929+3030+Create a new VoltX.js project with an interactive template selector.
3131+3232+```bash
3333+# Interactive mode - prompts for project name and template
3434+pnpm create voltx
3535+3636+# Specify project name
3737+pnpm create voltx my-app
3838+3939+# Using the voltx command
4040+voltx init my-app
4141+```
4242+4343+**Templates:**
4444+4545+- **Minimal** - Basic VoltX.js app with a counter demo
4646+- **With Router** - Multi-page app with client-side routing
4747+- **With Plugins** - Demonstration of all VoltX.js plugins
4848+- **Styles Only** - HTML + CSS using VoltX.js styles without the framework
4949+5050+The init command:
5151+5252+- Creates project directory
5353+- Generates HTML, CSS, package.json, and README
5454+- Downloads latest VoltX.js assets from CDN
5555+- Sets up development scripts
5656+5757+**Generated Structure:**
5858+5959+```sh
6060+my-app/
6161+├── index.html # Main HTML file
6262+├── styles.css # Custom styles
6363+├── package.json # Project configuration
6464+├── README.md # Getting started guide
6565+├── voltx.min.js # VoltX.js framework
6666+└── voltx.min.css # VoltX.js base styles
6767+```
6868+6969+### `dev`
7070+7171+Start a Vite development server for your VoltX.js project.
7272+7373+```bash
7474+voltx dev
7575+```
7676+7777+**Options:**
7878+7979+- `-p, --port <port>` - Port to run the dev server on (default: 3000)
8080+- `-o, --open` - Open browser automatically
8181+8282+**Examples:**
8383+8484+```bash
8585+# Start dev server on default port (3000)
8686+voltx dev
8787+8888+# Use custom port
8989+voltx dev --port 8080
9090+9191+# Open browser automatically
9292+voltx dev --open
9393+```
9494+9595+The dev server provides:
9696+9797+- Hot module replacement (HMR)
9898+- Fast refresh for development
9999+- Automatic browser reload
100100+- HTTPS support (via Vite)
101101+102102+### `build`
103103+104104+Build your VoltX.js project for production.
105105+106106+```bash
107107+voltx build
108108+```
109109+110110+**Options:**
111111+112112+- `--out <dir>` - Output directory (default: dist)
113113+114114+**Examples:**
115115+116116+```bash
117117+# Build to default dist/ directory
118118+voltx build
119119+120120+# Build to custom directory
121121+voltx build --out public
122122+```
123123+124124+The build command:
125125+126126+- Minifies HTML, CSS, and JavaScript
127127+- Optimizes assets for production
128128+- Generates source maps
129129+- Creates optimized bundle
130130+131131+### `download`
132132+133133+Download VoltX.js assets (JS and CSS) from the CDN.
134134+135135+```bash
136136+voltx download
137137+```
138138+139139+**Options:**
140140+141141+- `--version <version>` - VoltX.js version to download (default: latest)
142142+- `--no-js` - Skip downloading JavaScript file
143143+- `--no-css` - Skip downloading CSS file
144144+- `-o, --output <dir>` - Output directory (default: current directory)
145145+146146+**Examples:**
147147+148148+```bash
149149+# Download latest JS and CSS
150150+voltx download
151151+152152+# Download specific version
153153+voltx download --version 0.5.0
154154+155155+# Download only CSS
156156+voltx download --no-js
157157+158158+# Download to custom directory
159159+voltx download --output assets
160160+```
161161+162162+This command downloads minified assets from the jsDelivr CDN.
163163+164164+## Workflows
165165+166166+### Creating a New Project
167167+168168+```bash
169169+# Create new project
170170+pnpm create voltx my-app
171171+172172+# Navigate to project
173173+cd my-app
174174+175175+# Install dependencies
176176+pnpm install
177177+178178+# Start dev server
179179+pnpm dev
180180+```
181181+182182+### Development
183183+184184+```bash
185185+# Start dev server (watches for changes)
186186+pnpm dev
187187+188188+# In another terminal, run tests if available
189189+pnpm test
190190+```
191191+192192+### Production Build
193193+194194+```bash
195195+# Build for production
196196+pnpm build
197197+198198+# Preview production build locally
199199+npx vite preview --outDir dist
200200+```
201201+202202+### Updating VoltX.js Assets
203203+204204+```bash
205205+# Download latest version
206206+voltx download
207207+208208+# Or download specific version
209209+voltx download --version 0.5.1
210210+```
211211+212212+## Project Scripts
213213+214214+All generated projects include these npm scripts:
215215+216216+```json
217217+{
218218+ "scripts": {
219219+ "dev": "voltx dev",
220220+ "build": "voltx build"
221221+ }
222222+}
223223+```
224224+225225+Run them with your package manager:
226226+227227+```bash
228228+pnpm dev
229229+pnpm build
230230+```
231231+232232+## Templates
233233+234234+### Minimal
235235+236236+A basic VoltX.js application demonstrating:
237237+238238+- Declarative state with `data-volt-state`
239239+- Reactive bindings
240240+- Event handlers
241241+- Counter example
242242+243243+Best for: Learning VoltX.js basics, simple interactive pages.
244244+245245+### With Router
246246+247247+A multi-page application featuring:
248248+249249+- Client-side routing with History API
250250+- Multiple routes (home, about, contact, 404)
251251+- Navigation with `data-volt-navigate`
252252+- Route matching with `data-volt-url`
253253+254254+Best for: Multi-page applications, documentation sites, dashboards.
255255+256256+### With Plugins
257257+258258+A comprehensive demo showcasing:
259259+260260+- Persist plugin (localStorage sync)
261261+- Scroll plugin (smooth scrolling)
262262+- URL plugin (URL parameter sync)
263263+- Surge plugin (animations)
264264+- Navigate plugin (routing)
265265+266266+Best for: Learning all VoltX.js features, reference implementation.
267267+268268+### Styles Only
269269+270270+HTML and CSS using VoltX.js styles without the reactive framework:
271271+272272+- VoltX.js CSS utilities
273273+- Semantic HTML
274274+- No JavaScript required
275275+276276+Best for: Static sites, progressively enhanced pages, CSS-only projects.
277277+278278+## Configuration
279279+280280+### Vite Configuration
281281+282282+The CLI uses Vite as the dev server and build tool. To customize Vite, create a `vite.config.js` in your project root:
283283+284284+```js
285285+import { defineConfig } from 'vite';
286286+287287+export default defineConfig({
288288+ // Custom Vite configuration
289289+ server: {
290290+ port: 3000,
291291+ },
292292+ build: {
293293+ outDir: 'dist',
294294+ },
295295+});
296296+```
297297+298298+See the [Vite documentation](https://vitejs.dev/config/) for all available options.
299299+300300+## Troubleshooting
301301+302302+### Dev Server Won't Start
303303+304304+Ensure you're in a VoltX.js project directory with an `index.html` file:
305305+306306+```bash
307307+ls index.html
308308+```
309309+310310+If `index.html` is missing, you may not be in a VoltX.js project.
311311+312312+### Download Fails
313313+314314+Check your internet connection and try again. The CLI downloads assets from:
315315+316316+```text
317317+https://cdn.jsdelivr.net/npm/voltx.js@{version}/dist/
318318+```
319319+320320+If jsDelivr is blocked, manually download from the [npm package](https://www.npmjs.com/package/voltx.js).
321321+322322+### Build Fails
323323+324324+Ensure all dependencies are installed:
325325+326326+```bash
327327+pnpm install
328328+```
329329+330330+Check for syntax errors in your HTML, CSS, or JavaScript files.
331331+332332+## Next Steps
333333+334334+- Read the [Installation Guide](./installation) for framework setup
335335+- Explore [Usage Patterns](./usage/state) for state management
336336+- Check the [API Reference](./api) for detailed documentation
337337+- Learn about [Plugins](./plugins) for extended functionality
+13
docs/installation.md
···2626</script>
2727```
28282929+## CLI (Recommended)
3030+3131+The fastest way to create a new VoltX.js project is with the CLI:
3232+3333+```bash
3434+pnpm create voltx my-app
3535+cd my-app
3636+pnpm install
3737+pnpm dev
3838+```
3939+4040+This scaffolds a complete project with development server, build tools, and framework assets. See the [CLI Guide](./cli) for all available commands and templates.
4141+2942## Package Manager
30433144For applications using node based tools, install VoltX.js via npm or JSR: