The wrnexus command-line tool that scaffolds, runs, builds, tests, and manages WRNexusJS apps.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/cli provides the wrnexus executable — the single entry point for developing a WRNexusJS app. It runs the HMR dev server, produces a self-contained production build, scaffolds apps/pages/components, drives database migrations, regenerates typed routes and queries, runs tests, and manages configuration profiles. It also scaffolds multi-app monorepos and serves them behind a domain-routing gateway. This is a CLI/build-time package (it shells out to the Bun binary for the dev child and tests) and it also exports the workspace config types via a subpath.
@@ -41,9 +41,14 @@ page wrnexuscli {
public/ — copied verbatim.
Before bundling, it regenerates typed queries for the default and every named database. Run the output with:
-bun dist/server.js # PORT env var optional
+bun dist/server.js # PORT env var optional
+# Generated apps also provide: npm start
+# Build and start together: npm run production
wrnexus create
-Scaffolds a new app from an inline (dependency-free) template — package.json, config, and starter app/ files. Run wrnexus dev in the new directory to start.
+Scaffolds a new app from an inline (dependency-free) template — package.json, .gitignore, config, and starter app/ files. Use npm run dev during development, npm run build && npm start for production, or npm run production to build and start in one command. The generated production server currently requires Bun even when npm is used to manage packages and scripts.
+wrnexus update
+wrnexus update --latest performs a complete project upgrade. It hands control to the exact target CLI, backs up important project files under .wrnexus/update-backups/, updates every @wrnexus/* dependency, refreshes framework-owned references, and applies every versioned syntax/config/file migration between the project version and target version. After installation it runs the project's check and build scripts; the new version is recorded only after verification succeeds.
+Use --dry-run to preview an upgrade or --no-verify when verification is intentionally handled elsewhere. Migrations never overwrite user-owned configuration wholesale: each release must provide a focused, idempotent transformation for any changed syntax or config contract.
wrnexus create my-app
wrnexus generate
Scaffolds a single file from a template, refusing to overwrite an existing file. Types (with aliases): page/p, component/c, api/a, schema/s. Nested names create nested paths.
@@ -105,10 +110,12 @@ export default config;
Reads wrnexus.config.ts for db / databases, theme, styles, seo, security, i18n, and profiles, and wrnexus.workspace.ts for the gateway.