Installation

Get hyperfixi running in your project in under a minute.

Quick Start Options

Option 1: CDN (Fastest)

Add this script tag to your HTML:

<script src="https://unpkg.com/@hyperfixi/core/dist/hyperfixi-browser.js"></script>

Then use hyperscript anywhere:

<button _="on click toggle .active on me">Click me</button>

Option 2: Vite Plugin (Recommended)

The Vite plugin automatically generates minimal bundles based on what commands you actually use.

npm install @hyperfixi/core @hyperfixi/vite-plugin
// vite.config.js
import { hyperfixi } from '@hyperfixi/vite-plugin';

export default {
  plugins: [hyperfixi()],
};
// main.js
import 'hyperfixi';

That's it. The plugin scans your files and includes only the commands you need.

Option 3: npm (Manual Setup)

npm install @hyperfixi/core
import { hyperscript } from '@hyperfixi/core';

// Process all elements with _="..." attributes
hyperscript.processNode(document.body);

// Or execute hyperscript programmatically
await hyperscript.eval('toggle .active on me', element);

Verify Installation

Add this to your HTML:

<button _="on click put 'It works!' into the next <div/>">Test hyperfixi</button>
<div>Click the button</div>

Click the button. If the text changes, you're all set.

Next Steps