docs: add verified package usage examples

This commit is contained in:
2026-07-13 20:51:04 +05:30
parent 7a1c6c0041
commit 4ce087b238
67 changed files with 592 additions and 136 deletions
+41
View File
@@ -188,6 +188,47 @@ Runs the app's tests with `bun test`. Defaults to the `test` profile (config + `
wrnexus test . --watch
```
## Usage
### Create and run a single application
```bash
bunx @wrnexus/cli create customer-portal
cd customer-portal
bun install
bun run dev
```
### Add routes and shared UI to an existing app
```bash
wrnexus generate page reports/monthly
wrnexus generate api reports/export
wrnexus generate component report-filter
wrnexus generate routes
```
### Create a multi-app workspace and add another app
```bash
wrnexus workspace company-suite
cd company-suite
wrnexus workspace add reports --domain=reports.localhost
bun install
wrnexus gateway --port=3000
```
Open `http://reports.localhost:3000`; the gateway selects `apps/reports` from the
request host.
### Upgrade with migrations and verification
```bash
wrnexus update --latest --dry-run
wrnexus update --latest
wrnexus doctor
```
## Profiles
Pass `--profile=<name>` to `dev`, `build`, `db` (or set `WRNEXUS_PROFILE`) to select a config profile. The CLI publishes `WRNEXUS_PROFILE` so config loaders and the dev child pick it up, and loads that profile's `.env` cascade (`.env`, `.env.local`, `.env.<profile>`, `.env.<profile>.local`) into `process.env`.
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/cli",
"version": "0.2.23",
"version": "0.2.24",
"type": "module",
"description": "@wrnexus/cli — part of the WrNexus framework.",
"license": "MIT",
@@ -28,16 +28,16 @@
"wrnexus": "./dist/index.js"
},
"dependencies": {
"@wrnexus/core": "^0.2.23",
"@wrnexus/router": "^0.2.23",
"@wrnexus/csr": "^0.2.23",
"@wrnexus/compiler": "^0.2.23",
"@wrnexus/styles": "^0.2.23",
"@wrnexus/dev-server": "^0.2.23",
"@wrnexus/ui": "^0.2.23",
"@wrnexus/validation": "^0.2.23",
"@wrnexus/i18n": "^0.2.23",
"@wrnexus/db": "^0.2.23"
"@wrnexus/core": "^0.2.24",
"@wrnexus/router": "^0.2.24",
"@wrnexus/csr": "^0.2.24",
"@wrnexus/compiler": "^0.2.24",
"@wrnexus/styles": "^0.2.24",
"@wrnexus/dev-server": "^0.2.24",
"@wrnexus/ui": "^0.2.24",
"@wrnexus/validation": "^0.2.24",
"@wrnexus/i18n": "^0.2.24",
"@wrnexus/db": "^0.2.24"
},
"files": [
"dist"