Skip to content

whisqjs/whisq

Repository files navigation

Whisq mascot
whisq

The AI-native JavaScript framework. Signals for state. Functions for UI. That's it.

CI npm License

Whisq is designed so large language models produce working code on the first try. The complete framework is ~5 KB gzipped and the full API fits in a prompt. No hooks rules. No reactivity caveats. No compile-time magic — just signals for state, functions for UI.

import { signal, component, div, button, span, mount } from "@whisq/core";

const App = component(() => {
  const count = signal(0);
  return div(
    button(
      { onclick: () => count.value++ },
      span(() => `Clicked ${count.value} times`),
    ),
  );
});

mount(App({}), document.getElementById("app")!);

For AI assistants

Point Claude, Cursor, Copilot, or any coding assistant at one of these before it writes Whisq:

Need deeper tooling? @whisq/mcp-server exposes scaffold, validate, query-API, and analyze tools via the Model Context Protocol.

Eight copy-paste prompts that exercise different surfaces of the framework (todo, signup form, chat UI, markdown editor, live dashboard, router SPA, SSR blog, Snake) live in docs/AI_TEST_PROMPTS.md.

For humans

  • ~5 KB gzipped — complete framework (core: 5.08 KB).
  • Zero build step — runs as plain JavaScript, works with any bundler.
  • 100% TypeScript — every element function fully typed, inferred through components.
  • One reactive wrapper — every reactive position accepts () => …. No hooks rules, no dependency arrays, no stale-closure tax. (Three read shapes inside the wrapper — signal / keyed-each accessor / resource field.)

Get started

npm create whisq@latest my-app
cd my-app
npm install
npm run dev

Four templates: minimal, full-app (router + pages + store), ssr, vite-plugin (file-based routing).

Packages

Package Description Size
@whisq/core Signals, elements, components, styling 5.08 KB
@whisq/router Signal-based client-side routing 2.85 KB
@whisq/ssr Server-side rendering + streaming 982 B
@whisq/testing Render, query, fireEvent, userEvent, waitFor
@whisq/vite-plugin File-based routing, HMR, code splitting
@whisq/mcp-server AI tool integration (MCP protocol)
@whisq/devtools Signal inspection and component viewer
@whisq/sandbox Isolated code execution
create-whisq Project scaffolding CLI

Documentation

Contributing

See CONTRIBUTING.md for guidelines. Bug reports and docs fixes are welcome. Code PRs by invitation during alpha.

License

MIT — Markot s.r.o.

About

The AI-native JavaScript framework — signals for state, functions for UI

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors