vukem new renders one of five starters. On a terminal without a stack flag it asks which one you want; in scripts pass the flag.
vukem new blog # HTMX + html/template (default)
vukem new blog --templ # HTMX + templ components
vukem new blog --inertia react # Inertia + React (also: vue, svelte)
vukem new shop --api # JSON-only REST API
vukem new blog --no-install # skip npm install| Starter | Views | Frontend | Node.js |
|---|---|---|---|
| HTMX (default) | html/template in resources/views | htmx 4 (vendored), Vite 8, Tailwind CSS v4 | for Vite builds |
| HTMX + templ | templ components in resources/views (package views) | same as HTMX | for Vite builds |
| Inertia | React, Vue or Svelte pages in resources/js/pages | Vite 8, TypeScript, Tailwind CSS v4 | required |
| API | none | none | not used |
Every starter ships SQLite, migrations, a posts CRUD example and tests that pass with go test ./.... vukem new runs go mod tidy, writes APP_KEY, runs npm install when npm is on PATH (frontend starters) and git init.
HTMX on Vite#
The default starter vendors htmx 4.0.0 (served by the static middleware, SHA-256 pinned), and builds CSS and scripts with Vite 8 and Tailwind CSS v4 (@tailwindcss/vite):
package.json, vite.config.ts
resources/css/app.css @import "tailwindcss" + starter styles in @layer base
resources/js/app.ts
resources/vite/vukem.js hot-file plugin (writes public/hot while the dev server runs)
resources/public/build/ vite build output, embedded in the binaryThe layout loads assets with {{ vite "resources/css/app.css" "resources/js/app.ts" }} (Vite). Without a dev server or a build, the tag renders an HTML comment in development, so Go tests never need Node. Starter views have no inline scripts or handlers and run under the default CSP. See HTMX for the request and response helpers.
templ#
vukem new app --templ is the HTMX starter with the same pages and tests written as templ components:
- templ is pinned as a Go tool (
toolline ingo.mod); run it withgo tool templ generate. - The generated
*_templ.gofiles are committed, sogo buildandgo testwork without running templ. vukem serverunsgo tool templ generatebefore every build when.templfiles exist and watches them;vukem buildgenerates beforevite build.resources/views/helpers.gowraps the context helpers (route,asset,viteTags,script,flash,old,fieldError,csrfField). Scripts go through helpers that add the CSP nonce, so components contain no raw<script>tags.
return c.View(views.PostsIndex(posts), web.Partial(views.PostList(posts)))web.Partial renders the fragment for htmx partial requests and the page otherwise. Components read request data through web.FlashFrom(ctx, key), web.OldInput(ctx, field), web.ErrorsFrom(ctx), csrf.Token(ctx) and middleware.CSPNonce(ctx).
Inertia (React, Vue, Svelte)#
vukem new app --inertia react # or vue, svelte
vukem install:inertia --force --vue # convert an existing HTMX starterThe app gets vukem.WithInertia(inertia.Config{}), controllers that call inertia.Render, the root view resources/views/app.html, TypeScript pages in resources/js/pages, a default layout in resources/js/layouts and tests with AssertInertia. npm run typecheck runs tsc (React), vue-tsc or svelte-check. vukem install:auth on an Inertia app adds Auth/* and Dashboard pages. See Inertia.
API#
vukem new shop --api is a JSON-only app: /api/v1 routes, token guard, CORS, rate limiting and problem+json errors, no views or Node. See REST APIs.
Add-ons#
These scaffolds work on top of any web starter:
| Command | Adds |
|---|---|
vukem install:auth [--social …] [--2fa] | Authentication, social login, two-factor |
vukem install:admin | Admin panel at /admin |
vukem install:billing | Stripe subscriptions |
vukem install:api | Token-authenticated /api/v1 routes |
vukem boost:install | Guidelines, skills and an MCP server for AI coding agents |